Page 1 of 1

Google is not defined in offline mode causes app to crash/spin

Posted: Sat Aug 08, 2015 1:14 am
by Miguel Navarro7469744

I have read this:

https://getsatisfaction.com/apperyio/...

But unfortunately I'm not sure how to handle this one as this error is causing my app to crash error and die. When I try to go in offline mode and work for a while, the tablet crashes/errors and when I look at the logcat errrors is says google is not defined. I see it's included as a https link when others it's referenced locally.

How do I get around this error. Adding the code as an external resource only loads it twice and could cause issues. How do I remove this or embed this so it doesn't cause issues in offline mode.

I am testing in Samsung Galaxy tablet A that only has a wifi connection. It takes a little while for this to appear as I guess there's some caching behavior and when it looks for an updated version.

Miguel


Google is not defined in offline mode causes app to crash/spin

Posted: Sat Aug 08, 2015 1:39 am
by Miguel Navarro7469744

Probably the best way to handle this is to use requirejs to gracefully degrade.

http://requirejs.org/docs/api.html#er...

Hopefully you have an answer here on this because this one is critical for me. But it sounds like you guys would have to implement this.


Google is not defined in offline mode causes app to crash/spin

Posted: Sat Aug 08, 2015 4:17 pm
by Miguel Navarro7469744

Can I get an answer on this guys, this is seriously messing up my testing?


Google is not defined in offline mode causes app to crash/spin

Posted: Sat Aug 08, 2015 6:55 pm
by Miguel Navarro7469744

Ok. I think I found my answer to resolve this. I had an old page that had a map component that I wasn't using but saving in case I might use it. I removed the map and script was removed from all pages. I think now if I had a page with a map I would add manually add it to the page (not as a component) and load the required scripts too depending on the connection.


Google is not defined in offline mode causes app to crash/spin

Posted: Sat Aug 08, 2015 11:25 pm
by Illya Stepanov

Hi Miguel -

Thanks for letting us know.

We are using Require.js in our AngularJS builder.
Perhaps you won't face such issue using AngularJS.