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 3714E180BB for ; Tue, 22 Sep 2015 20:22:14 +0000 (UTC) Received: (qmail 3569 invoked by uid 500); 22 Sep 2015 20:22:04 -0000 Delivered-To: apmail-cordova-issues-archive@cordova.apache.org Received: (qmail 3541 invoked by uid 500); 22 Sep 2015 20:22:04 -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 3243 invoked by uid 99); 22 Sep 2015 20:22:04 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Sep 2015 20:22:04 +0000 Date: Tue, 22 Sep 2015 20:22:04 +0000 (UTC) From: "Christopher Mindus (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CB-9643) Android platform does not load "cordova_plugins.js" at cold start (on real device) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CB-9643?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Christopher Mindus updated CB-9643: ----------------------------------- Description: The "cordova_plugins.js" file is not loaded by cordova.js when application is cold started. This is due to the fact that the "exports.load" function (line 1774) in cordova.js is never called. This problems causes plugin's not to be initialized/loaded properly and has dramatic consequences. Reproduce as follows: 1. Run the commands: cordova create test cd test 2. Edit www/index.html and change the "Content-Security-Policy" to: 3. Edit www/index.html and below "

Device is Ready

" add:

RELOAD PAGE 4. Run the commands: cordova platform add android --save cordova build 5. Connect a real device using USB, in my case a Nexus 10 with Android 5.1.1. 6. Run command to start the built app: cordova run android 7. Check with e.g. GapDebug when the app is started, and you will see that only cordova.js and index.html are loaded from the root www directory, not the cordova_plugins.js. 8. Press the "RELOAD PAGE" link on the page. Now check with GapDebug and you will find that cordova_plugins.js is loaded. I.e. in "warm start" it works fine. was: The "cordova_plugins.js" file is not loaded by cordova.js when application is cold started. This is due to the fact that the "exports.load" function (line 1774) in cordova.js is never called. This problems causes plugin's not to be iniitalized/loaded properly and has dramatic consequences. Reproduce as follows: 1. Run the commands: cordova create test cd test 2. Edit www/index.html and change the "Content-Security-Policy" to: 3. Edit www/index.html and below "

Device is Ready

" add:

RELOAD PAGE 4. Run the commands: cordova platform add android --save cordova build 5. Connect a real device using USB, in my case a Nexum 10 with Android 5.1.1. 6. Run command to start the built app: cordova run android 7. Check with e.g. GapDebug when the app is started, and you will see that only cordova.js and index.html are loaded from the root www directory, not the cordova_plugins.js. 8. Press the "RELOAD PAGE" link on the page. Now check with GapDebug and you will find that cordova_plugins.js is loaded. I.e. in "warn start" it works fine. > Android platform does not load "cordova_plugins.js" at cold start (on real device) > ---------------------------------------------------------------------------------- > > Key: CB-9643 > URL: https://issues.apache.org/jira/browse/CB-9643 > Project: Apache Cordova > Issue Type: Bug > Components: , Plugin Battery Status, Plugin Camera, Plugin Contacts, Plugin Device Orientation, Plugin Dialogs, Plugin File, Plugin Geolocation, Plugin Globalization, Plugin InAppBrowser, Plugin Media, Plugin Media Capture, Android > Affects Versions: 4.1.1 > Environment: Real devices: Nexus 10 or Samsung S5, Android 5.1.1 > Reporter: Christopher Mindus > Attachments: after-reload-s5.png, after-reload.png, cold-start-S5.png, cold-start.png > > > The "cordova_plugins.js" file is not loaded by cordova.js when application is cold started. This is due to the fact that the "exports.load" function (line 1774) in cordova.js is never called. > This problems causes plugin's not to be initialized/loaded properly and has dramatic consequences. > Reproduce as follows: > 1. Run the commands: > cordova create test > cd test > 2. Edit www/index.html and change the "Content-Security-Policy" to: > > 3. Edit www/index.html and below "

Device is Ready

" add: >

RELOAD PAGE > 4. Run the commands: > cordova platform add android --save > cordova build > 5. Connect a real device using USB, in my case a Nexus 10 with Android 5.1.1. > 6. Run command to start the built app: > cordova run android > 7. Check with e.g. GapDebug when the app is started, and you will see that only cordova.js and index.html are loaded from the root www directory, not the cordova_plugins.js. > 8. Press the "RELOAD PAGE" link on the page. Now check with GapDebug and you will find that cordova_plugins.js is loaded. I.e. in "warm start" it works fine. -- 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