[ https://issues.apache.org/jira/browse/CB-10939?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Matthew Ma updated CB-10939: ---------------------------- Summary: BridgeSecret is 0 when cordova js is injected as inline script on emulators (was: BridgeSecret is 0 when cordova is injected as inline script on emulators only) > BridgeSecret is 0 when cordova js is injected as inline script on emulators > --------------------------------------------------------------------------- > > Key: CB-10939 > URL: https://issues.apache.org/jira/browse/CB-10939 > Project: Apache Cordova > Issue Type: Bug > Components: Android > Affects Versions: 5.1.1 > Environment: Cordova 6.0.0 > cordova android 5.1.1 > [cordova-plugin-fastrde-injectview|https://www.npmjs.com/package/cordova-plugin-fastrde-injectview] > plugin. > Reporter: Matthew Ma > Priority: Minor > Labels: android, cordova-6.0.0 > > The > [injectview|https://www.npmjs.com/package/cordova-plugin-fastrde-injectview] > plugin looks great to me because I want to open an external website. > The plugin injects cordova and its plugin js into the webview as inline > script. I got device ready event and the cordova demo app looks good. > However, I found out I can't not use things like navigator.camera.getPicture > or navigator.notification.alert. After ruling out common mistake and I start > to step the code. > It turns out the bridgesecret in the js is 0 so it doesn't pass the > {code:java} > if (!verifySecret("exec()", bridgeSecret)) { > return null; > } > {code} > in CordovaBridge.java. If I comment out these three lines, things works fine. > If I don't use remote website but use local www, this works fine.(without > remove the injectView plugin) Also, I DON'T have this problem on my actual > android lollipop phone, where the bridgesecret is a good random number. Only > on emulators such as AVD and Visual Studio Android Emulator. > So, this issue only happens on emulator with the injected inline javascript > plugin. > Any thought? -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org