You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Eric Kelm (JIRA)" <ji...@apache.org> on 2012/11/06 15:04:19 UTC
[jira] [Created] (CB-1818) TypeError in Android's
exec.processMessages
Eric Kelm created CB-1818:
-----------------------------
Summary: TypeError in Android's exec.processMessages
Key: CB-1818
URL: https://issues.apache.org/jira/browse/CB-1818
Project: Apache Cordova
Issue Type: Bug
Components: Android
Affects Versions: 2.2.0
Reporter: Eric Kelm
Assignee: Joe Bowser
The fix for CB-1537 introduced a bug in Android 3.x that leads to the following error message:
TypeError: 'undefined' is not a function (evaluating 'messages.slice(0, spaceIdx)')
quick fix:
@@ -1098,7 +1098,7 @@
if (messages) {
messagesFromNative.push(messages);
while (messagesFromNative.length) {
- messages = messagesFromNative.shift();
+ messages = messagesFromNative.shift() + '';
// The Java side can send a * message to indicate that it
// still has messages waiting to be retrieved.
// TODO(agrieve): This is currently disabled on the Java side
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (CB-1818) TypeError in Android's
exec.processMessages
Posted by "Andrew Grieve (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-1818?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrew Grieve reassigned CB-1818:
---------------------------------
Assignee: Andrew Grieve (was: Joe Bowser)
> TypeError in Android's exec.processMessages
> -------------------------------------------
>
> Key: CB-1818
> URL: https://issues.apache.org/jira/browse/CB-1818
> Project: Apache Cordova
> Issue Type: Bug
> Components: Android
> Affects Versions: 2.2.0
> Reporter: Eric Kelm
> Assignee: Andrew Grieve
>
> The fix for CB-1537 introduced a bug in Android 3.x that leads to the following error message:
> TypeError: 'undefined' is not a function (evaluating 'messages.slice(0, spaceIdx)')
> quick fix:
> @@ -1098,7 +1098,7 @@
> if (messages) {
> messagesFromNative.push(messages);
> while (messagesFromNative.length) {
> - messages = messagesFromNative.shift();
> + messages = messagesFromNative.shift() + '';
> // The Java side can send a * message to indicate that it
> // still has messages waiting to be retrieved.
> // TODO(agrieve): This is currently disabled on the Java side
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CB-1818) TypeError in Android's
exec.processMessages
Posted by "Joe Bowser (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-1818?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13491833#comment-13491833 ]
Joe Bowser commented on CB-1818:
--------------------------------
Does this bug happen on ICS, or is this on Honeycomb?
> TypeError in Android's exec.processMessages
> -------------------------------------------
>
> Key: CB-1818
> URL: https://issues.apache.org/jira/browse/CB-1818
> Project: Apache Cordova
> Issue Type: Bug
> Components: Android
> Affects Versions: 2.2.0
> Reporter: Eric Kelm
> Assignee: Joe Bowser
>
> The fix for CB-1537 introduced a bug in Android 3.x that leads to the following error message:
> TypeError: 'undefined' is not a function (evaluating 'messages.slice(0, spaceIdx)')
> quick fix:
> @@ -1098,7 +1098,7 @@
> if (messages) {
> messagesFromNative.push(messages);
> while (messagesFromNative.length) {
> - messages = messagesFromNative.shift();
> + messages = messagesFromNative.shift() + '';
> // The Java side can send a * message to indicate that it
> // still has messages waiting to be retrieved.
> // TODO(agrieve): This is currently disabled on the Java side
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (CB-1818) TypeError in Android's
exec.processMessages
Posted by "Andrew Grieve (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-1818?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrew Grieve resolved CB-1818.
-------------------------------
Resolution: Fixed
Force use of PROMPT bridge on Honeycomb:
https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-android.git;a=commit;h=5212cd4dcdc195e96e3b376bd44e162e2b0b1b57
Thanks Eric and Matthew for tracking down the bug!
> TypeError in Android's exec.processMessages
> -------------------------------------------
>
> Key: CB-1818
> URL: https://issues.apache.org/jira/browse/CB-1818
> Project: Apache Cordova
> Issue Type: Bug
> Components: Android
> Affects Versions: 2.2.0
> Reporter: Eric Kelm
> Assignee: Andrew Grieve
>
> The fix for CB-1537 introduced a bug in Android 3.x that leads to the following error message:
> TypeError: 'undefined' is not a function (evaluating 'messages.slice(0, spaceIdx)')
> quick fix:
> @@ -1098,7 +1098,7 @@
> if (messages) {
> messagesFromNative.push(messages);
> while (messagesFromNative.length) {
> - messages = messagesFromNative.shift();
> + messages = messagesFromNative.shift() + '';
> // The Java side can send a * message to indicate that it
> // still has messages waiting to be retrieved.
> // TODO(agrieve): This is currently disabled on the Java side
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CB-1818) TypeError in Android's
exec.processMessages
Posted by "Andrew Grieve (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-1818?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13492087#comment-13492087 ]
Andrew Grieve commented on CB-1818:
-----------------------------------
Looks like the issue where Java strings are not converted to JS strings. I thought this happened only on Froyo and below, and worked around it by not using the prompt bridge instead on older devices:
https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-android.git;a=blob;f=framework/src/org/apache/cordova/CordovaWebView.java;h=4740610142a9d102557d94b6990cfdc6165178bf;hb=HEAD#l277
If this happens on Honeycomb as well, then I think we should add to the line I referenced instead of changing the JS. The prompt bridge is only marginally slower, and a misbehaving addJavascriptInterface will surely just bite us again in the future.
> TypeError in Android's exec.processMessages
> -------------------------------------------
>
> Key: CB-1818
> URL: https://issues.apache.org/jira/browse/CB-1818
> Project: Apache Cordova
> Issue Type: Bug
> Components: Android
> Affects Versions: 2.2.0
> Reporter: Eric Kelm
> Assignee: Joe Bowser
>
> The fix for CB-1537 introduced a bug in Android 3.x that leads to the following error message:
> TypeError: 'undefined' is not a function (evaluating 'messages.slice(0, spaceIdx)')
> quick fix:
> @@ -1098,7 +1098,7 @@
> if (messages) {
> messagesFromNative.push(messages);
> while (messagesFromNative.length) {
> - messages = messagesFromNative.shift();
> + messages = messagesFromNative.shift() + '';
> // The Java side can send a * message to indicate that it
> // still has messages waiting to be retrieved.
> // TODO(agrieve): This is currently disabled on the Java side
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CB-1818) TypeError in Android's
exec.processMessages
Posted by "Matthew M (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-1818?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13496255#comment-13496255 ]
Matthew M commented on CB-1818:
-------------------------------
Changing the line as you suggest fixed the issue for us, which was happening on Honeycomb. We couldn't reproduce it on 2.2, 2.3.x or 4.0.3.
> TypeError in Android's exec.processMessages
> -------------------------------------------
>
> Key: CB-1818
> URL: https://issues.apache.org/jira/browse/CB-1818
> Project: Apache Cordova
> Issue Type: Bug
> Components: Android
> Affects Versions: 2.2.0
> Reporter: Eric Kelm
> Assignee: Joe Bowser
>
> The fix for CB-1537 introduced a bug in Android 3.x that leads to the following error message:
> TypeError: 'undefined' is not a function (evaluating 'messages.slice(0, spaceIdx)')
> quick fix:
> @@ -1098,7 +1098,7 @@
> if (messages) {
> messagesFromNative.push(messages);
> while (messagesFromNative.length) {
> - messages = messagesFromNative.shift();
> + messages = messagesFromNative.shift() + '';
> // The Java side can send a * message to indicate that it
> // still has messages waiting to be retrieved.
> // TODO(agrieve): This is currently disabled on the Java side
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira