cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rajesh Kumar (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-7081) Issue when Cordova upgrade from 2.9 to 3.5
Date Tue, 08 Jul 2014 16:46:05 GMT

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

Rajesh Kumar commented on CB-7081:
----------------------------------

Ok. I managed to fix this issue. But, now I get a Nullpointer Exception when I try to read/write
from file at app startup. Below is the stack trace:

07-08 22:07:42.228: W/System.err(1796): java.lang.NullPointerException
07-08 22:07:42.228: W/System.err(1796): 	at org.apache.cordova.file.LocalFilesystem.filesystemPathForURL(LocalFilesystem.java:67)
07-08 22:07:42.228: W/System.err(1796): 	at org.apache.cordova.file.LocalFilesystem.getFileForLocalURL(LocalFilesystem.java:189)
07-08 22:07:42.228: W/System.err(1796): 	at org.apache.cordova.file.FileUtils.getFile(FileUtils.java:749)
07-08 22:07:42.228: W/System.err(1796): 	at org.apache.cordova.file.FileUtils.access$5(FileUtils.java:742)
07-08 22:07:42.228: W/System.err(1796): 	at org.apache.cordova.file.FileUtils$16.run(FileUtils.java:397)
07-08 22:07:42.228: W/System.err(1796): 	at org.apache.cordova.file.FileUtils$23.run(FileUtils.java:525)
07-08 22:07:42.228: W/System.err(1796): 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
07-08 22:07:42.228: W/System.err(1796): 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
07-08 22:07:42.228: W/System.err(1796): 	at java.lang.Thread.run(Thread.java:856)


> Issue when Cordova upgrade from 2.9 to 3.5
> ------------------------------------------
>
>                 Key: CB-7081
>                 URL: https://issues.apache.org/jira/browse/CB-7081
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android, CordovaJS
>    Affects Versions: 3.5.0
>            Reporter: Rajesh Kumar
>
> I recently upgraded my cordova app from v2.9 to v3.5. When I start my app, I see a JSONException
in the logcat console as below:
>     07-05 16:04:48.457: W/System.err(1917): org.json.JSONException: Value App at 0 of
type     java.lang.String cannot be converted to int
>     07-05 16:04:48.457: W/System.err(1917): at org.json.JSON.typeMismatch(JSON.java:100)
>     07-05 16:04:48.457: W/System.err(1917): at org.json.JSONArray.getInt(JSONArray.java:357)
>     07-05 16:04:48.457: W/System.err(1917): at org.apache.cordova.CordovaChromeClient.onJsPrompt(CordovaChromeClient.java:214)
> This exception occurs inside the `onJsPrompt()` method of `CordovaChromeClient.java`,
when the code tries to read the first element of array. The json array comes from javascript
and should be having 4 parameters (bridge secret, service, action, callbackId), but it has
only 3. The bridge secret is not present. This call is made from the core plugin `cordova/android/promptbasednativeapi`
inside cordova.js. I guess the cordova.js which comes with the cordova download from official
cordova site is not correct? I need to know how to pass the bridge secret from js to java.
Can someone help me?



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message