[ 
https://issues.apache.org/jira/browse/CB-7758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14178022#comment-14178022
 ] 

Wolfgang Flohr-Hochbichler commented on CB-7758:
------------------------------------------------

Thank you all - I really appreciate your support!

Yes Joe - you are right, I'm one of the guys behind jsHybugger :-)

In the meantime I digged a little bit deeper into the issue and found another 
problem

* The secret generation within CordovaBridge.java will generate also negative 
secret tokens, but code sections (java, javascript) will check for

{code:javascript}
    if (bridgeSecret < 0) {
        // If we ever catch this firing, we'll need to queue up exec()s
        // and fire them once we get a secret. For now, I don't think
        // it's possible for exec() to be called since plugins are parsed but
        // not run until until after onNativeReady.
        throw new Error('exec() called without bridgeSecret');
    }
{code}

Fixing the gap_init and the secret token generation on my computer have 
increased the change (70%) that the "device ready" will be fired but 
it's far away from being stable.

What I could see so far is, that the fireing of the "device ready event" has 
something to do with
"onload Plugins" and/or "page redirects during page load". Sometimes it will 
succeed and sometimes not, depending on the bridgeSecret was successfully 
exchanged between java (CordovaBridge.java) and javascript (cordova.js) 

Any idea?



> Support for content:// URIs
> ---------------------------
>
>                 Key: CB-7758
>                 URL: https://issues.apache.org/jira/browse/CB-7758
>             Project: Apache Cordova
>          Issue Type: New Feature
>          Components: Android
>    Affects Versions: 3.6.0
>         Environment: Android 4.3
>            Reporter: Wolfgang Flohr-Hochbichler
>            Priority: Minor
>
> Device ready event is not fired if page is loaded via content:// protocol. 
> I assume it has something to do with a security check done within 
> CordovaBridge.java which triggers the following gap_init error message.
> 10-09 10:10:18.071 16719 16719 E CordovaBridge: gap_init called from 
> restricted origin: 
> content://com.ionicframework.ionicapp795549.jsHybugger/file:///android_asset/www/index.html#/tab/dash
> 10-09 10:10:23.075 16719 16719 D CordovaLog: 
> content://com.ionicframework.ionicapp795549.jsHybugger/jshybugger.js: Line 
> 112 : deviceready has not fired after 5 seconds.
> 10-09 10:10:23.075 16719 16719 I Web Console: deviceready has not fired after 
> 5 seconds. at 
> content://com.ionicframework.ionicapp795549.jsHybugger/jshybugger.js:112



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to