| Summary: | Show and error message when require-config.js fails to load | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Steve Northover <steve_northover> | ||||
| Component: | Client | Assignee: | Eric Moffatt <emoffatt> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P2 | CC: | grant_gayed, libingw, Michael_Rennie, Silenio_Quarti | ||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| See Also: | https://git.eclipse.org/r/88204 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Steve Northover
Created attachment 265566 [details]
RequireJS timeout
There actually is a dialog that will show up and tell you loading failed. I have seen it from time to time. Libing, I think you were the one that added that notification support? Can you elaborate more? We never want to be in a state where we are waiting forever for the splash screen because of an error and the user is not informed of the error. The dialog does not show when loading the require-config.js module. The error dialog code is in that module. We need to add a error handle when loading require-config.js, which means the code needs to be replicated in all our page htmls (sigh). It cannot be shared. Or we have to load it the old fashion way as a script (not requirejs). Also, the require-config.js module increases the requirejs loading timeout. But require-config.js is loaded using the default timeout (7 seconds) which maybe too short. If we want to increase the timeout for requrie-config.js, we also need to duplicate the code on all pages. (In reply to Silenio Quarti from comment #4) > The dialog does not show when loading the require-config.js module. The > error dialog code is in that module. We need to add a error handle when > loading require-config.js, which means the code needs to be replicated in > all our page htmls (sigh). It cannot be shared. Or we have to load it the > old fashion way as a script (not requirejs). > Yeah, everywhere we require require-config we would need to add code like: function(err) { switch(err.requireType) { case "timeout": { //TODO undef it and try again? break; } case "nodefine": { //TODO tried to load something unknown break; } case "scripterror": { //TODO forward the details - would help a lot for module problems break; } default: { //TODO catch-all, let the user know and react } } } Or just say, "Oops ... we failed to load the page" and give the horrible error text in smaller font for people that want to enter a bug or to help us debug. Eric? This one is important because we look like idiots when we fail. It has failed in front of Dave. What happened about this? When it happens, it is horrible and people think that we are crap rather than the network connection was bad etc. New Gerrit change created: https://git.eclipse.org/r/88204 OK, I've just pushed the changes that make the requiring of 'require-config' show an alert much like the alert the require-config itself uses. I've also updated the message displayed in require-config to show the 'Please try to reload the page' first (since that's what the user needs to see most. Would like to see a demo of the failure and the message. Thanks. Need to reopen to take another approach... OK I've just checked in a fix that adds a non-'required' error handler. It's used not only for the require-config but is lso used for all subsequent load errors. Commit: https://git.eclipse.org/c/gerrit/orion/org.eclipse.orion.client.git/commit/?id=85391f189766ae5747637d3be35f2d9a1f885869 Fixed by the previous commit I think Beta3 is now broken from this change. It doesn't get past the splash screen and spews to the console:
require-config.js:17Uncaught ReferenceError: errback is not defined
at require-config.js:17
at Object.execCb (require.min.js:29)
at Z.check (require.min.js:18)
at Z.enable (require.min.js:23)
at Z.init (require.min.js:17)
at E (require.min.js:14)
at Object.completeLoad (require.min.js:28)
at HTMLScriptElement.onScriptLoad (require.min.js:29)
Please back out the change. The code is running fine in orion.eclipse.org. OK, the code is in and things seem to be running ok. I'll wait until the code gets deployed to PROD and then mark this as VERIFIED. |