Return-Path: X-Original-To: apmail-cordova-issues-archive@minotaur.apache.org Delivered-To: apmail-cordova-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CC71719D69 for ; Wed, 23 Mar 2016 18:48:25 +0000 (UTC) Received: (qmail 56998 invoked by uid 500); 23 Mar 2016 18:48:25 -0000 Delivered-To: apmail-cordova-issues-archive@cordova.apache.org Received: (qmail 56969 invoked by uid 500); 23 Mar 2016 18:48:25 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 56958 invoked by uid 99); 23 Mar 2016 18:48:25 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Mar 2016 18:48:25 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 691BD2C14DC for ; Wed, 23 Mar 2016 18:48:25 +0000 (UTC) Date: Wed, 23 Mar 2016 18:48:25 +0000 (UTC) From: "Matthew Ma (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (CB-10939) BridgeSecret is 0 when cordova is injected as inline script on emulators only MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Matthew Ma created CB-10939: ------------------------------- Summary: BridgeSecret is 0 when cordova is injected as inline script on emulators only 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 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-unsubscribe@cordova.apache.org For additional commands, e-mail: issues-help@cordova.apache.org