You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Andrew Grieve (JIRA)" <ji...@apache.org> on 2014/03/06 17:34:43 UTC
[jira] [Created] (CB-6181) Android exec() bridge sometimes
processes messages outside synchronously
Andrew Grieve created CB-6181:
---------------------------------
Summary: Android exec() bridge sometimes processes messages outside synchronously
Key: CB-6181
URL: https://issues.apache.org/jira/browse/CB-6181
Project: Apache Cordova
Issue Type: Bug
Components: Android
Reporter: Andrew Grieve
Assignee: Andrew Grieve
Priority: Minor
This causes a problem for angular apps, which (correctly) call $scope.apply() in their async functions. Found this to happen in AppHarness:
{code}
Error: [$rootScope:inprog] $digest already in progress
http://errors.angularjs.org/1.2.3/$rootScope/inprog?p0=%24digest
at file:///android_asset/www/cdvah/js/libs/angular.js:78:12
at beginPhase (file:///android_asset/www/cdvah/js/libs/angular.js:11970:15)
at Scope.$apply (file:///android_asset/www/cdvah/js/libs/angular.js:11767:11)
at file:///android_asset/www/cdvah/js/ListCtrl.js:105:24
at Object.cordova.callbackFromNative (file:///android_asset/www/cordova.js:292:54)
at processMessage (file:///android_asset/www/cordova.js:1029:21)
at Function.androidExec.processMessages (file:///android_asset/www/cordova.js:1063:13)
at androidExec (file:///android_asset/www/cordova.js:922:25)
at Object.exports.listening (file:///android_asset/www/plugins/org.apache.appharness.push/js/push.js:12:5)
at new <anonymous> (file:///android_asset/www/cdvah/js/ListCtrl.js:103:29)
{code}
What we should be doing here is using a setTimeout() to ensure the messages are processed in their own run-loop cycle.
--
This message was sent by Atlassian JIRA
(v6.2#6252)