cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (CB-7992) Weird behavior when more than one <script> tag for cordova.js
Date Tue, 17 Mar 2015 23:18:38 GMT


ASF GitHub Bot commented on CB-7992:

Github user purplecabbage commented on the pull request:
    I am digging into it now, since I am there.

> Weird behavior when more than one <script> tag for cordova.js
> -------------------------------------------------------------
>                 Key: CB-7992
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 3.4.0
>            Reporter: Julian Horn
>            Assignee: Julian Horn
>            Priority: Trivial
> If a program has more than one <script> tag for cordova.js, weird behavior ensues.
 This file should protect itself against multiple inclusion; this is a not-uncommon newbie
> The problems I've seen are in the android version of cordova.js, but it's possible that
other platforms have similar problems.
> The weird behavior states with this console message:
> Falling back on PROMPT mode since _cordovaNative is missing. Expected for Android 3.2
and lower only.
> Then you see a dialog that says 
> gap:["PluginManager","startup","PluginManager818789619"]
> (OK) (Cancel)
> Without going into all the details, if you click Cancel you live.  If you click OK you
will hang.
> These weird dialogs are put up by this code:
> {code}// file: src/android/android/promptbasednativeapi.js
> define("cordova/android/promptbasednativeapi", function(require, exports, module) {
> /**
>  * Implements the API of, but uses prompt() to communicate.
>  * This is used only on the 2.3 simulator, where addJavascriptInterface() is broken.
>  */
> module.exports = {
>     exec: function(service, action, callbackId, argsJson) {
>         return prompt(argsJson, 'gap:'+JSON.stringify([service, action, callbackId]));
>     },{code}
> This is some kind of error recovery code.  You can probably work out how this gets activated
when I tell you that the console also shows this message:
> Uncaught module cordova/plugin_list already defined

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message