Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

android inappbrowser is not opening #10

Open
nissarcs opened this issue Oct 19, 2015 · 16 comments
Open

android inappbrowser is not opening #10

nissarcs opened this issue Oct 19, 2015 · 16 comments

Comments

@nissarcs
Copy link

nissarcs commented Oct 19, 2015

I could not able to display the self signed url from inappbrowser

function onDeviceReady(){
ref = window.open('test url /self signed, '_blank', ); }

getting the below error


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@hypery2k
Copy link
Owner

what cordova and android version are you using?

@nissarcs
Copy link
Author

cordova 5.3.3 and android api 22

@nissarcs
Copy link
Author

my logcat error actually this

10-20 13:54:42.979 5695-5695/? D/dalvikvm: Late-enabling CheckJNI
10-20 13:54:43.199 5695-5695/cbl.cblife I/dalvikvm: Could not find method android.webkit.WebView.setWebContentsDebuggingEnabled, referenced from method org.apache.cordova.engine.SystemWebViewEngine.enableRemoteDebugging
10-20 13:54:43.199 5695-5695/cbl.cblife W/dalvikvm: VFY: unable to resolve static method 268: Landroid/webkit/WebView;.setWebContentsDebuggingEnabled (Z)V
10-20 13:54:43.199 5695-5695/cbl.cblife D/dalvikvm: VFY: replacing opcode 0x71 at 0x0001
10-20 13:54:43.339 5695-5695/cbl.cblife I/webclipboard: clipservice: android.sec.clipboard.ClipboardExManager@4227aa40
10-20 13:54:43.499 5695-5695/cbl.cblife I/dalvikvm: Could not find method android.webkit.CookieManager.setAcceptThirdPartyCookies, referenced from method org.apache.cordova.engine.SystemCookieManager.
10-20 13:54:43.499 5695-5695/cbl.cblife W/dalvikvm: VFY: unable to resolve virtual method 206: Landroid/webkit/CookieManager;.setAcceptThirdPartyCookies (Landroid/webkit/WebView;Z)V
10-20 13:54:43.499 5695-5695/cbl.cblife D/dalvikvm: VFY: replacing opcode 0x6e at 0x0016
10-20 13:54:43.499 5695-5695/cbl.cblife I/dalvikvm: Could not find method android.webkit.CookieManager.flush, referenced from method org.apache.cordova.engine.SystemCookieManager.flush
10-20 13:54:43.499 5695-5695/cbl.cblife W/dalvikvm: VFY: unable to resolve virtual method 200: Landroid/webkit/CookieManager;.flush ()V
10-20 13:54:43.499 5695-5695/cbl.cblife D/dalvikvm: VFY: replacing opcode 0x6e at 0x0008
10-20 13:54:43.560 5695-5734/cbl.cblife V/webkit: BrowserFrame constructor: this=Handler (android.webkit.BrowserFrame) {422782c0}
10-20 13:54:43.560 5695-5695/cbl.cblife W/dalvikvm: VFY: unable to find class referenced in signature (Landroid/webkit/ClientCertRequest;)
10-20 13:54:43.570 5695-5695/cbl.cblife W/dalvikvm: VFY: unable to find class referenced in signature (Landroid/webkit/ClientCertRequest;)
10-20 13:54:43.570 5695-5695/cbl.cblife I/dalvikvm: Could not find method android.webkit.WebViewClient.onReceivedClientCertRequest, referenced from method org.apache.cordova.engine.SystemWebViewClient.onReceivedClientCertRequest
10-20 13:54:43.570 5695-5695/cbl.cblife W/dalvikvm: VFY: unable to resolve virtual method 273: Landroid/webkit/WebViewClient;.onReceivedClientCertRequest (Landroid/webkit/WebView;Landroid/webkit/ClientCertRequest;)V
10-20 13:54:43.570 5695-5695/cbl.cblife D/dalvikvm: VFY: replacing opcode 0x6f at 0x001a
10-20 13:54:43.580 5695-5695/cbl.cblife W/dalvikvm: VFY: unable to find class referenced in signature (Landroid/webkit/PermissionRequest;)
10-20 13:54:43.580 5695-5695/cbl.cblife I/dalvikvm: Could not find method android.webkit.PermissionRequest.getResources, referenced from method org.apache.cordova.engine.SystemWebChromeClient.onPermissionRequest
10-20 13:54:43.580 5695-5695/cbl.cblife W/dalvikvm: VFY: unable to resolve virtual method 217: Landroid/webkit/PermissionRequest;.getResources ()[Ljava/lang/String;
10-20 13:54:43.580 5695-5695/cbl.cblife D/dalvikvm: VFY: replacing opcode 0x6e at 0x000d
10-20 13:54:43.580 5695-5695/cbl.cblife I/dalvikvm: Could not find method android.webkit.WebChromeClient$FileChooserParams.createIntent, referenced from method org.apache.cordova.engine.SystemWebChromeClient.onShowFileChooser
10-20 13:54:43.580 5695-5695/cbl.cblife W/dalvikvm: VFY: unable to resolve virtual method 222: Landroid/webkit/WebChromeClient$FileChooserParams;.createIntent ()Landroid/content/Intent;
10-20 13:54:43.580 5695-5695/cbl.cblife D/dalvikvm: VFY: replacing opcode 0x6e at 0x0000
10-20 13:54:43.580 5695-5695/cbl.cblife D/SystemWebViewEngine: CordovaWebView is running on device made by: samsung
10-20 13:54:43.630 5695-5695/cbl.cblife D/dalvikvm: GC_FOR_ALLOC freed 156K, 15% free 8731K/10168K, paused 26ms, total 26ms
10-20 13:54:43.630 5695-5695/cbl.cblife I/dalvikvm-heap: Grow heap (frag case) to 11.239MB for 1536016-byte allocation
10-20 13:54:43.680 5695-5749/cbl.cblife D/dalvikvm: GC_FOR_ALLOC freed 4K, 13% free 10227K/11672K, paused 41ms, total 41ms
10-20 13:54:43.740 5695-5695/cbl.cblife D/WebView: loadUrlImpl: called
10-20 13:54:43.790 5695-5699/cbl.cblife E/dalvikvm: adjustAdaptiveCoef max=4194304, min=1048576, ut=568
10-20 13:54:43.800 5695-5699/cbl.cblife D/dalvikvm: GC_CONCURRENT freed 55K, 12% free 10297K/11692K, paused 17ms+21ms, total 107ms
10-20 13:54:43.810 5695-5695/cbl.cblife D/libEGL: loaded /vendor/lib/egl/libGLES_vc4.so
10-20 13:54:43.820 5695-5734/cbl.cblife D/webcore: CORE loadUrl: called
10-20 13:54:43.820 5695-5734/cbl.cblife D/webkit: Firewall not null
10-20 13:54:43.820 5695-5734/cbl.cblife D/webkit: euler: isUrlBlocked = false
10-20 13:54:43.830 5695-5695/cbl.cblife W/khrn_client: init_window num_buffers 3 min undequeued buffers 1
10-20 13:54:43.830 5695-5695/cbl.cblife W/khrn_client: init_window window 0x4e6727f8, 480x800 hintTransform 0x0 do_pre 1
10-20 13:54:43.900 5695-5695/cbl.cblife D/OpenGLRenderer: Enabling debug mode 0
10-20 13:54:43.910 5695-5695/cbl.cblife W/khrn_client: init_window num_buffers 3 min undequeued buffers 1
10-20 13:54:43.910 5695-5695/cbl.cblife W/khrn_client: init_window window 0x4f52a7e8, 480x800 hintTransform 0x0 do_pre 1
10-20 13:54:43.910 5695-5695/cbl.cblife D/WebView: onSizeChanged - w:480 h:762
10-20 13:54:44.190 5695-5695/cbl.cblife D/JsMessageQueue: Set native->JS mode to OnlineEventsBridgeMode
10-20 13:54:44.240 5695-5734/cbl.cblife I/GATE: DEV_ACTION_COMPLETED
10-20 13:54:44.310 5695-5734/cbl.cblife D/CordovaNetworkManager: Connection Type: wifi
10-20 13:54:44.310 5695-5734/cbl.cblife D/CordovaNetworkManager: Connection Extra Info: "Trigent_wap-CA"
10-20 13:54:44.320 5695-5695/cbl.cblife D/TilesManager: Starting TG #0, 0x4f535d38
10-20 13:54:44.320 5695-5695/cbl.cblife D/TilesManager: new EGLContext from framework: 4f251368
10-20 13:54:44.320 5695-5695/cbl.cblife D/GLWebViewState: Reinit shader
10-20 13:54:44.350 5695-5695/cbl.cblife D/GLWebViewState: Reinit transferQueue
10-20 13:54:44.360 5695-5695/cbl.cblife D/CordovaNetworkManager: Connection Type: wifi
10-20 13:54:44.360 5695-5695/cbl.cblife D/CordovaNetworkManager: Connection Extra Info: "Trigent_wap-CA"
10-20 13:54:45.241 5695-5734/cbl.cblife D/InAppBrowser: target = blank
10-20 13:54:45.251 5695-5695/cbl.cblife D/InAppBrowser: in blank
10-20 13:54:45.451 5695-5734/cbl.cblife V/webkit: BrowserFrame constructor: this=Handler (android.webkit.BrowserFrame) {424af0d0}
10-20 13:54:45.451 5695-5695/cbl.cblife I/webclipboard: clipservice: android.sec.clipboard.ClipboardExManager@4227aa40
10-20 13:54:45.481 5695-5695/cbl.cblife D/WebView: loadUrlImpl: called
10-20 13:54:45.491 5695-5734/cbl.cblife D/webcore: CORE loadUrl: called
10-20 13:54:45.491 5695-5734/cbl.cblife D/webkit: Firewall not null
10-20 13:54:45.491 5695-5734/cbl.cblife D/webkit: euler: isUrlBlocked = false
10-20 13:54:45.561 5695-5695/cbl.cblife W/khrn_client: init_window num_buffers 3 min undequeued buffers 1
10-20 13:54:45.561 5695-5695/cbl.cblife W/khrn_client: init_window window 0x4f92bd58, 480x762 hintTransform 0x0 do_pre 1
10-20 13:54:45.561 5695-5695/cbl.cblife D/WebView: onSizeChanged - w:480 h:762
10-20 13:54:45.812 5695-5695/cbl.cblife W/khrn_client: init_window num_buffers 3 min undequeued buffers 1
10-20 13:54:45.812 5695-5695/cbl.cblife W/khrn_client: init_window window 0x4f9dc578, 480x307 hintTransform 0x0 do_pre 1
10-20 13:54:47.573 5695-5784/cbl.cblife V/chromium: external/chromium/net/socket/ssl_client_socket_openssl.cc:310: [1020/135447:INFO:ssl_client_socket_openssl.cc(310)] ssl_ctx
is used
10-20 13:54:47.764 5695-5695/cbl.cblife D/GestureDetector: [Surface Touch Event] mSweepDown False, mLRSDCnt : -1 mTouchCnt : 3 mFalseSizeCnt:0
10-20 13:54:47.814 5695-5695/cbl.cblife I/brcm-gr: [gralloc_lock]: new usage 0x933
10-20 13:54:47.844 5695-5695/cbl.cblife D/ProgressBar: setProgress = 0
10-20 13:54:47.844 5695-5695/cbl.cblife D/ProgressBar: setProgress = 0, fromUser = false
10-20 13:54:47.844 5695-5695/cbl.cblife D/ProgressBar: mProgress = 0mIndeterminate = false, mMin = 0, mMax = 10000
10-20 13:54:47.894 5695-5695/cbl.cblife D/ProgressBar: setProgress = 0
10-20 13:54:47.894 5695-5695/cbl.cblife D/ProgressBar: setProgress = 0, fromUser = false
10-20 13:54:47.894 5695-5695/cbl.cblife D/ProgressBar: mProgress = 0mIndeterminate = false, mMin = 0, mMax = 100
10-20 13:54:47.924 5695-5695/cbl.cblife W/khrn_client: init_window num_buffers 3 min undequeued buffers 1
10-20 13:54:47.924 5695-5695/cbl.cblife W/khrn_client: init_window window 0x4f9dc578, 72x72 hintTransform 0x0 do_pre 1
10-20 13:54:47.924 5695-5695/cbl.cblife D/ProgressBar: updateDrawableBounds: left = 0
10-20 13:54:47.924 5695-5695/cbl.cblife D/ProgressBar: updateDrawableBounds: top = 0
10-20 13:54:47.924 5695-5695/cbl.cblife D/ProgressBar: updateDrawableBounds: right = 72
10-20 13:54:47.924 5695-5695/cbl.cblife D/ProgressBar: updateDrawableBounds: bottom = 72
10-20 13:54:47.944 5695-5695/cbl.cblife E/ViewRootImpl: sendUserActionEvent() mView == null
10-20 13:54:50.646 5695-5784/cbl.cblife V/chromium: external/chromium/net/socket/ssl_client_socket_openssl.cc:508: [1020/135450:INFO:ssl_client_socket_openssl.cc(508)] ~SSLClientSocketOpenSSL()
10-20 13:54:50.656 5695-5734/cbl.cblife I/GATE: DEV_ACTION_COMPLETED
10-20 13:54:50.666 5695-5695/cbl.cblife W/Web Console: The page displayed insecure content!
10-20 13:54:50.666 5695-5695/cbl.cblife W/Web Console: :1
10-20 13:54:50.747 5695-5695/cbl.cblife W/khrn_client: init_window num_buffers 3 min undequeued buffers 1
10-20 13:54:50.747 5695-5695/cbl.cblife W/khrn_client: init_window window 0x4fa69588, 480x307 hintTransform 0x0 do_pre 1
10-20 13:54:52.128 5695-5699/cbl.cblife D/dalvikvm: GC_CONCURRENT freed 682K, 16% free 10909K/12872K, paused 2ms+3ms, total 34ms
10-20 13:54:52.188 5695-5695/cbl.cblife D/GestureDetector: [Surface Touch Event] mSweepDown False, mLRSDCnt : -1 mTouchCnt : 2 mFalseSizeCnt:0
10-20 13:54:52.218 5695-5695/cbl.cblife I/brcm-gr: [gralloc_lock]: new usage 0x933
10-20 13:54:52.238 5695-5734/cbl.cblife I/GATE: DEV_ACTION_COMPLETED
10-20 13:54:52.258 5695-5695/cbl.cblife D/ProgressBar: setProgress = 0
10-20 13:54:52.258 5695-5695/cbl.cblife D/ProgressBar: setProgress = 0, fromUser = false
10-20 13:54:52.258 5695-5695/cbl.cblife D/ProgressBar: mProgress = 0mIndeterminate = false, mMin = 0, mMax = 100
10-20 13:54:52.378 5695-5695/cbl.cblife D/ProgressBar: updateDrawableBounds: left = 0
10-20 13:54:52.378 5695-5695/cbl.cblife D/ProgressBar: updateDrawableBounds: top = 0
10-20 13:54:52.378 5695-5695/cbl.cblife D/ProgressBar: updateDrawableBounds: right = 72
10-20 13:54:52.378 5695-5695/cbl.cblife D/ProgressBar: updateDrawableBounds: bottom = 72
10-20 13:54:52.388 5695-5695/cbl.cblife I/brcm-gr: [gralloc_lock]: new usage 0x933
10-20 13:54:52.418 5695-5695/cbl.cblife W/khrn_client: init_window num_buffers 3 min undequeued buffers 1
10-20 13:54:52.418 5695-5695/cbl.cblife W/khrn_client: init_window window 0x4f4b3368, 480x307 hintTransform 0x0 do_pre 1
10-20 13:54:52.428 5695-5695/cbl.cblife E/ViewRootImpl: sendUserActionEvent() mView == null
10-20 13:54:52.468 5695-5695/cbl.cblife E/ViewRootImpl: sendUserActionEvent() mView == null
10-20 13:54:54.150 5695-5695/cbl.cblife D/GestureDetector: [Surface Touch Event] mSweepDown False, mLRSDCnt : -1 mTouchCnt : 3 mFalseSizeCnt:0
10-20 13:54:54.680 5695-5695/cbl.cblife D/GestureDetector: [Surface Touch Event] mSweepDown False, mLRSDCnt : -1 mTouchCnt : 3 mFalseSizeCnt:0
10-20 13:54:54.700 5695-5695/cbl.cblife I/brcm-gr: [gralloc_lock]: new usage 0x933
10-20 13:54:54.791 5695-5695/cbl.cblife W/khrn_client: init_window num_buffers 3 min undequeued buffers 1
10-20 13:54:54.791 5695-5695/cbl.cblife W/khrn_client: init_window window 0x4f9dc578, 480x307 hintTransform 0x0 do_pre 1
10-20 13:54:54.811 5695-5831/cbl.cblife I/brcm-gr: [gralloc_lock]: new usage 0x133
10-20 13:54:54.821 5695-5831/cbl.cblife I/brcm-gr: [gralloc_lock]: new usage 0x133
10-20 13:54:54.831 5695-5695/cbl.cblife E/ViewRootImpl: sendUserActionEvent() mView == null
10-20 13:54:54.841 5695-5831/cbl.cblife I/brcm-gr: [gralloc_lock]: new usage 0x133
10-20 13:54:54.841 5695-5831/cbl.cblife I/brcm-gr: [gralloc_lock]: new usage 0x133
10-20 13:54:55.601 5695-5695/cbl.cblife D/GestureDetector: [Surface Touch Event] mSweepDown False, mLRSDCnt : -1 mTouchCnt : 2 mFalseSizeCnt:0
10-20 13:54:55.621 5695-5695/cbl.cblife I/brcm-gr: [gralloc_lock]: new usage 0x933
10-20 13:54:55.661 5695-5695/cbl.cblife E/ViewRootImpl: sendUserActionEvent() mView == null
10-20 13:54:55.872 5695-5831/cbl.cblife I/brcm-gr: [gralloc_lock]: new usage 0x133

@hypery2k
Copy link
Owner

i cannot see any issue from my plugin. It's just cordova core errors in the log data. Did you tried without the plugin?

@nissarcs
Copy link
Author

were i have to add this code
cordova.plugins.certificates.trustUnsecureCerts(true)

@hypery2k
Copy link
Owner

after the deviceReady but before you're window.open

@nissarcs
Copy link
Author

now its coming web page not available in browser am not getting any idea please help me out for this issue
if possible i will send you the code by mail

@hypery2k
Copy link
Owner

send me your project via mail. I can take a look at it

@nissarcs
Copy link
Author

could you send me your mail id

On Fri, Oct 23, 2015 at 8:29 PM, Martin Reinhardt [email protected]
wrote:

send me your project via mail. I can take a look at it


Reply to this email directly or view it on GitHub
#10 (comment)
.

@hypery2k
Copy link
Owner

You find it in my Profile https://github.com/hypery2k

@nissarcs
Copy link
Author

nissarcs commented Nov 9, 2015

Hi
i sent project to your mail please look and give me some solution regreding
self signed certificate

On Thu, Oct 29, 2015 at 6:17 PM, Martin Reinhardt [email protected]
wrote:

You find it in my Profile https://github.com/hypery2k


Reply to this email directly or view it on GitHub
#10 (comment)
.

@hypery2k
Copy link
Owner

I've received you're mail, but you need to confirm the GoogleDrive invitation you sent to me

@escapedcat
Copy link

@hypery2k I'm impressed by your patience :)

@hypery2k
Copy link
Owner

you have to edit InAppBrower.java file in the inappbrowser plugin, see https://github.com/apache/cordova-plugin-inappbrowser/blob/master/src/android/InAppBrowser.java#L851

Add this code:

public void onReceivedSslError(WebView view,
            SslErrorHandler handler, SslError error) {
    handler.proceed();
}

to the InAppBrower.java file from the plugin.

Do overcome this completly I have to also include the inappbrowser within this plugin to get this working

Hope this helps!

@nissarcs
Copy link
Author

Thanks for your patience and i have done it already its working you could
have seen in my code i commented that because by proceeding
handler.proceed(); this function loastart() loadstop() events are not
firing because based on loadstart and loadstop am adding spinner as well as
some other functionalities based on the loadstart url . Even its great help
from your side because i have tried with all the solution then only i
written here . once more i appreciated your patience . i will ask my
company people to provide payed certificate to go ahead with this work

On Wed, Nov 11, 2015 at 6:59 PM, Martin Reinhardt [email protected]
wrote:

you have to edit InAppBrower.java file in the inappbrowser plugin, see
https://github.com/apache/cordova-plugin-inappbrowser/blob/master/src/android/InAppBrowser.java#L851

Add this code:

public void onReceivedSslError(WebView view,
SslErrorHandler handler, SslError error) {
handler.proceed();
}

to the InAppBrower.java file from the plugin.

Do overcome this completly I have to also include the inappbrowser within
this plugin to get this working

Hope this helps!


Reply to this email directly or view it on GitHub
#10 (comment)
.

@baldawayash15
Copy link

Hello @hypery2k how to enable this code on device ready function?
cordova.plugins.certificates.trustUnsecureCerts(true);
Getting an error "Cannot find name cordova". Am I missing to import something?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants