You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by Pierre Gaston <pi...@gmail.com> on 2014/11/05 11:53:15 UTC

Strange javascript queue problem

I'm using cordova 3.5.1 on a 4.1 android device without SystemUI as a kiosk.

I don't see anything suspect except that the callback of my plugins calls
are trigger on the next call.
That is, the first callback doesn't seem to run until I call another
method, then on the third call I see the callback of the second one etc...

The same app doesn't present this problem when I run it after adding
SystemUI back to the device.

I didn't managed to find a workaround to this problem until I built a much
simpler version (thinking that maybe the problem was related to splash
screen, which I don't use, or things like this) of CordovaActivity which
seemed fine.

I've now switched to crosswalk and the same problem occurred, except that
using the same trick doesn't seem to solve the problem.

I've now find another workaround  in removing in CordovaWebView in
exposeJsInterface() the SDK test and forcing
this.addJavascriptInterface(exposedJsApi, "_cordovaNative");


I'm however wondering if any of this makes any sense and if you have any
hindsight as to what may be happening.

Thanks
pierre

Extra question: in the more general case, I'm wondering if it's safe to use
this.addJavascriptInterface(exposedJsApi, "_cordovaNative"); with the
crossswalk webview since it uses newer library?

Re: Strange javascript queue problem

Posted by Pierre Gaston <pi...@gmail.com>.
thanks, it's not, but i will try 3.6.0 nonetheless.

On Wed, Nov 5, 2014 at 5:04 PM, Andrew Grieve <ag...@chromium.org> wrote:

> If your app is a multi-page app, then likely this is a bug that was fixed
> in cordova-android 3.6.0.
>
> On Wed, Nov 5, 2014 at 5:53 AM, Pierre Gaston <pi...@gmail.com>
> wrote:
>
> > I'm using cordova 3.5.1 on a 4.1 android device without SystemUI as a
> > kiosk.
> >
> > I don't see anything suspect except that the callback of my plugins calls
> > are trigger on the next call.
> > That is, the first callback doesn't seem to run until I call another
> > method, then on the third call I see the callback of the second one
> etc...
> >
> > The same app doesn't present this problem when I run it after adding
> > SystemUI back to the device.
> >
> > I didn't managed to find a workaround to this problem until I built a
> much
> > simpler version (thinking that maybe the problem was related to splash
> > screen, which I don't use, or things like this) of CordovaActivity which
> > seemed fine.
> >
> > I've now switched to crosswalk and the same problem occurred, except that
> > using the same trick doesn't seem to solve the problem.
> >
> > I've now find another workaround  in removing in CordovaWebView in
> > exposeJsInterface() the SDK test and forcing
> > this.addJavascriptInterface(exposedJsApi, "_cordovaNative");
> >
> >
> > I'm however wondering if any of this makes any sense and if you have any
> > hindsight as to what may be happening.
> >
> > Thanks
> > pierre
> >
> > Extra question: in the more general case, I'm wondering if it's safe to
> use
> > this.addJavascriptInterface(exposedJsApi, "_cordovaNative"); with the
> > crossswalk webview since it uses newer library?
> >
>

Re: Strange javascript queue problem

Posted by Andrew Grieve <ag...@chromium.org>.
If your app is a multi-page app, then likely this is a bug that was fixed
in cordova-android 3.6.0.

On Wed, Nov 5, 2014 at 5:53 AM, Pierre Gaston <pi...@gmail.com>
wrote:

> I'm using cordova 3.5.1 on a 4.1 android device without SystemUI as a
> kiosk.
>
> I don't see anything suspect except that the callback of my plugins calls
> are trigger on the next call.
> That is, the first callback doesn't seem to run until I call another
> method, then on the third call I see the callback of the second one etc...
>
> The same app doesn't present this problem when I run it after adding
> SystemUI back to the device.
>
> I didn't managed to find a workaround to this problem until I built a much
> simpler version (thinking that maybe the problem was related to splash
> screen, which I don't use, or things like this) of CordovaActivity which
> seemed fine.
>
> I've now switched to crosswalk and the same problem occurred, except that
> using the same trick doesn't seem to solve the problem.
>
> I've now find another workaround  in removing in CordovaWebView in
> exposeJsInterface() the SDK test and forcing
> this.addJavascriptInterface(exposedJsApi, "_cordovaNative");
>
>
> I'm however wondering if any of this makes any sense and if you have any
> hindsight as to what may be happening.
>
> Thanks
> pierre
>
> Extra question: in the more general case, I'm wondering if it's safe to use
> this.addJavascriptInterface(exposedJsApi, "_cordovaNative"); with the
> crossswalk webview since it uses newer library?
>