cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-7992) Weird behavior when more than one <script> tag for cordova.js
Date Wed, 06 May 2015 04:06:02 GMT

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

ASF GitHub Bot commented on CB-7992:
------------------------------------

Github user asfgit closed the pull request at:

    https://github.com/apache/cordova-js/pull/109


> Weird behavior when more than one <script> tag for cordova.js
> -------------------------------------------------------------
>
>                 Key: CB-7992
>                 URL: https://issues.apache.org/jira/browse/CB-7992
>             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
mistake.
> 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 ExposedJsApi.java, 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
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message