Results 1 to 10 of 10

Thread: Application hangs when trying to load google jsapi without internet connection.

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha Premium Member
    Join Date
    Apr 2014
    Posts
    39

    Default Application hangs when trying to load google jsapi without internet connection.

    We have upgraded to extjs 6 and are now including both ext-all.js and ux.js. Everything was working fine until one day we have no internet but were still connected to our company network. While debugging our application we found out that ux.js tries to load the google jsapi and since there was no internet connection it failed and the whole application hangs. Is there a way to avoid this while keep using ux.js? We still use some components from there like ItemSelector and we prefer it if we can load them all together instead of having to load each file separately for each component.

  2. #2
    Sencha Premium User
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,258

    Default

    You could rebuild the ux package without the things that require google APIs. This isn't really a bug though.

  3. #3
    Sencha Premium Member
    Join Date
    Apr 2014
    Posts
    39

    Default

    Well the convention is that it is better to not mess with the stock resources. Version 6 is new and will be updated every now, we're gonna have to manually change the ux.js every time. Also as a framework for enterprise applications you can't expect them to always have internet access. Many corporations work with a closed network without internet. Before version 6 we were manually loading the google jsapi script and handled the 'onError' case but now ux.js expects to be able to load it otherwise the whole application hangs. Maybe the 'requiredScripts' property could possible account for the case of a script load error?I know this isn't technically a bug. Maybe a feature request?

  4. #4
    Sencha Premium User
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,258

    Default

    I understand what you're saying about the network connection, however what would the class do if it couldn't fetch a script that is required for operation?

    Well the convention is that it is better to not mess with the stock resources.
    Not quite in the same sense. If you remove the "offending" classes and then rebuild the package, that's not really messing with anything. It should be fairly easy to do. Also note that the ux package isn't technically part of the "core" resources, typically not held to the same kind of standard of things that go in the library proper.

  5. #5
    Sencha Premium Member
    Join Date
    Apr 2014
    Posts
    39

    Default

    Well what we did when loading the script for the GMapPanel ux component we actually disable everything related to that. Now I'm guessing this isn't so simple to do with google.Api class since it is a base class that others are supposed to inherit from and you can't know what child classes each application has. I don't really have a solution but having no internet especially for enterprise web applications isn't so uncommon. The general concept of relying on being able to load external application or nothing works isn't correct in my opinion.

  6. #6

    Default

    We too are facing the same issue. could you please elaborate on what you mean by

    You could rebuild the ux package without the things that require google APIs.
    our extjs apps reside in a hybrid environment and we make use of ext-all.js and ux.js as is for now. is there some documentation/article/blog we can reference that shows, for example how we can exclude only limited set of classes but inlcude everything else .

    Any help is highly appreciated, Thanks!!!

  7. #7
    Sencha Premium User
    Join Date
    Oct 2012
    Posts
    62

    Default

    We are having a related problem, in ExtJS6.2. We are doing a "development" build, and downloading ext-modern-all-debug.js, which has the Ext.Map element.We are not trying to use this at all. We have no interest in maps.But the Ext.Map class is being initialized anyway, so the required script ''maps.google.com/maps/api/js" is being loaded over the Internet, which takes six seconds. So our application hangs for 6 seconds at initialization for no reason.This is a pain, and makes for a terrible demo. I have manually patched ext-modern-all-debug.js, so this works around the problem, but Sencha really needs to reconsider whether a six-second download over the Internet is appropriate.

  8. #8
    Sencha Premium User
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,258

    Default

    This wasn't the intent for being part of the core for modern, the google dependency has been moved to an opt-in ux package.

  9. #9
    Sencha Premium User
    Join Date
    Oct 2012
    Posts
    62

    Default

    Thanks evant. Are you saying that this is will be fixed in the GA version of 6.2 modern?

  10. #10

    Default

    This is still a problem. Any solutions?

Similar Threads

  1. [NOREPRO] Simple application using ext-all.js loads http://www.google.com/jsapi
    By SebTardif in forum Ext 5: Bugs
    Replies: 5
    Last Post: 12 Mar 2015, 10:33 AM
  2. Replies: 3
    Last Post: 8 Oct 2013, 1:38 AM
  3. Checking for internet connection...
    By sl5337 in forum Sencha Architect 2.x: Help & Discussions
    Replies: 2
    Last Post: 25 Apr 2012, 2:51 PM
  4. Load google maps API when internet is available via Ext.data.connection
    By heringsfilet in forum Sencha Touch 1.x: Discussion
    Replies: 0
    Last Post: 6 Apr 2011, 1:14 AM
  5. How to add a hint when no internet connection is available
    By heringsfilet in forum Sencha Touch 1.x: Discussion
    Replies: 0
    Last Post: 30 Mar 2011, 11:13 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •