New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Strange bug with Microsoft Edge #227
Comments
There's a bug in system.js in FF and Edge we believe which causes the browser to fail after a certain number of script loads. The System.js team is working to resolve this. To confirm, can you try bundling your app and seeing if it works fine when bundled? |
@EisenbergEffect thanks for reply. So far even when bundled we run into the issue sadly :( |
I guess @EisenbergEffect talked about systemjs/systemjs#814 but i'm not 100% sure about it. @Sickboy could You take a look at it and report back, what do You think about the relation of these issues? |
I'm closing this since it looks like it was resolved in system.js |
@EisenbergEffect |
@SamDeBlock I'm facing same issue. It's weird but sometimes aurelia apps require edge having dev tools open |
I am facing the same issue. My site takes about 8 seconds to load on Edge. |
Did you add bluebird? That should solve the problem. We have reported this issue to the Edge team along with tests to verify it for them. |
If I add bluebird (not via JSPM, but in the header on index.html) the Edge browser now takes 2 seconds. |
I added bluebird script in index.html, but still the same.. btw: same issue with "http://aurelia.io/docs.html#/aurelia/framework/latest/doc/article/what-is-aurelia" |
Anyone find a fix for this? I am having the same issue... |
@jdanyow Any progress on this? I'd put this as our absolute highest priority bug right now... |
I can't reproduce it. Bluebird fixed my edge issues. No one is seeing it in the docs app anymore either (that I've heard). |
If that's true then I can now sleep again at night :) Thanks @jdanyow! |
Just tested the docs app in Edge. Sometimes it loads, sometimes it doesn't. |
@gheoan few questions for you- I'm hoping to find a way to reproduce this: |
|
I am seeing the same inconsistent results with the docs as Gheoan and I am running the same version of Edge. On my own site though it seems to never work no matter what I do. However it works great as soon as I open my dev tools and refresh the page... |
Seeing the same results here also. With dev tools open it's fine, with dev tools closed it mostly fails. |
I can confirm I am seeing the same issue with the aurelia docs site, and also our own apps on Edge. Since the problem always disapears when the dev tools are open it is very tricky to debug, however I have managed to trace the following. The issue appears to be triggered by a call to the template-registry-entry plugin failing. I augmented the system.src.js with the following:
and the results are as follows:
as you can see the plugin behaves correctly for the first 4 calls, but the 5th module fails. The metatadata.result is definitely correct but the "template-registry-entry" appears to be corrupt so the call to instantiate doesn't return a value. |
@jdanyow A clue! ^^^ Do you have time to look into it? |
@obany awesome 💯- thanks for sharing! will dig into this some more |
This is now the only defect left on our projects and as such has become a very high priority and blocker to release. Since the last debug session our code and libraries all over the projects have updated and now the issue exhibits in a different location albeit in a very similar fashion. Bear in mind that this only happens on Edge without the DevTools open, as soon as they are open it works every time. The following steps can consistently reproduce the issue in our apps. In system.src.js the hook('fetch') method is modified as follows to add the window.debug message
So this is simply capturing the content of the fetch method in the 'template-registry-entry' plugin, the next line actually makes the call. Inside the plugin fetch method I have the following:
Which will simply display the address to be loaded. A working trace of this show the following `systemjs fetch http://localhost/myapp/app/common/ui/elements/navBarMenu.html = function fetch(load, _fetch) { systemjs fetch http://localhost/myapp/app/common/ui/elements/helpTip.html = function fetch(load, _fetch) { systemjs fetch http://localhost/myapp/app/common/ui/elements/buttonList.html = function fetch(load, _fetch) { systemjs fetch http://localhost/myapp/app/app.html = function fetch(load, _fetch) { systemjs fetch http://localhost/myapp/app/home/home.html = function fetch(load, _fetch) { As you can see we get the dump of the method and then the message from inside the method. Now a failed log with the DevTools closed. `systemjs fetch http://localhost/myapp/app/common/ui/elements/navBarMenu.html = function fetch(load, _fetch) { systemjs fetch http://localhost/myapp/app/common/ui/elements/helpTip.html = function fetch(load, _fetch) { systemjs fetch http://localhost/myapp/app/common/ui/elements/buttonList.html = function fetch(load, _fetch) { systemjs fetch http://localhost/myapp/app/app.html = function fetch(load, _fetch) { As you can see the systemjs message shows that it is about to call the correct method, but it never reaches the code inside that method! I have tried bundling the app and while this improves the situation it still fails maybe 1 out of every 4 loads. In addition I have tried the system.js polyfills, bluebird and no polyfills (very slow) for Promises, but this has had no impact on the results. I am at a bit of a loss to try and understand why this is happening, maybe the plugin has been garbage collected? Any more suggestions to try ? |
I have now created a minimal example based on the skel app which demonstrates the issue. https://github.com/obany/skeleton-navigation Just build and fire up in edge browser and it shows a blank screen, open devtools, refresh and it displays the app.html. The main changes to reproduce the failure are load some global resources and disable development logging, console.log has the same effect as opening the devtools and makes it work. |
@obany As a temporary hack...could you add a console.log statement to your main.js file to ensure that your app always loads? |
That's why I think the Hub still works on Edge, because it's using RequireJS. The //sans System
DefaultLoader.prototype.addPlugin = function (pluginName, implementation) {
var nonAnonDefine = define;
nonAnonDefine(pluginName, [], {
'load': function load(name, req, onload) {
var result = implementation.fetch(name);
Promise.resolve(result).then(onload);
}
});
}; //With System
DefaultLoader.prototype.addPlugin = function (pluginName, implementation) {
System.set(pluginName, System.newModule({
'fetch': function fetch(load, _fetch) {
var result = implementation.fetch(load.address);
return Promise.resolve(result).then(function (x) {
load.metadata.result = x;
return '';
});
},
'instantiate': function instantiate(load) {
return load.metadata.result;
}
}));
}; Now, I could be interpreting the logic incorrectly, I'll leave that as a definite possibility :) |
We have both a site with system.js and one created with Aurelia-cli using Require.js |
Yah, unfortunately bundling didn't work for us. :( |
We moved to Webpack quite a while ago and things are quite awesome since then.. (just did the switch ti 2.0 and easywebpack) |
Just to say we are also encountering this issue with or without bundling. Seems like the best solution is to move to webpack.... |
Having the same issue here. Bundled app won't load in Edge unless dev tools are open. Using SystemJS v0.19.36 and Bluebird 3.4.1. Might bite the bullet and switch to Webpack but the whole bundling process is a bit of a mystery for me right now so I'm dreading it :P |
@powerbuoy It's working fine for me with same settings than yours. Since a week ago edge works signficatively faster and I can even run the app even without bundling |
@dpinart That's odd. Definitely does not work for me. Without Bluebird the app takes ages to load as well. |
I switched to Webpack 1.0 a few months ago but I got back to jspm. Webpacks 1.0 bundling is really tedious and I'm not able to configure several bundles in order to lazy load parts of my app, in addition, with systemjs I can configure system mappings at runtime,... As an advise, be sure your index.html files looks like the skeleton one In addition, look at chrome adn edge consoles to ensure you don't have unexpected exceptions. Some times exceptions do not appear in chrome but the do in edge and avoid to complete the app launch |
I do get |
Edge works for me with bundling and system.js (javascript is ES5 with es6-shim and bluebird). |
I have an HTML5 file that it supposed to load a .js library I made but it won't load in MS Edge, saying that the function is undefined. (BTW the HTML file in video3.html from my repo LIPTV [https://github.com/notanewbie/LIPTV] and the library is from my repo getCookie [https://github.com/notanewbie/getCookie]) |
Hey, loading with Edge seems to works .... if you don't use |
so far Edge has been working for us using aurelia-cli |
@codermrrob Aurelia CLI uses RequireJS which doesn't have the issue with Edge. The Edge issue is due to a problem in SystemJS it seems. |
yes, the combinaton of Aurela, SystemJs and Edge does not work well together. |
I disagree. Right now, I have sevearal apps with Aurelia + jspm + SystemsJs that work fine in edge. I'm facing some issues with both edge and safari related with polymer, not with aurèlia or jspm. I can agree that probably app startup is better with requireJS than with SystemJS, but right now there's no a clear difference |
The combo works for me as long as I also use bluebird. Note I also have ES5 javascript with es6-shim. |
The problem with Edge and SystemJS seemed contained to something with loading up plugins. If you have a setup that is working consistently @dpinart, I would love to have the chance to take a look at your setup in an attempt to figure out why other people have problems with SystemJS still :) |
@AStoker I'm also very interested in an answer to that question. 😃 Here it is: Source: https://github.com/aurelia-ui-toolkits/demo-materialize |
After a long afternoon of debugging, we came up with a very strange fix.
I think this all traces back to this bug in edge chakra-core/ChakraCore#1415 edit:
|
after gaving up on that issue, trying moving to aurelia-cli (which has other problems, and does not worked out yet). i gave this a shoot. first check, the App in Up and Running in Edge. Thank you. But we have not tested any further. but seeing the app starting in Edge is promising. |
Wish I had that a few weeks ago! :D |
@SamDeBlock Amazing. Your fix worked like a charm. I have been struggling with this issue for quite a while. Just wanted to say thank you. |
I am seeing something that sounds similar to this, but in IE 11. Our app hangs on the initial app loading splash screen. We are using latest Aurelia framework, and Typescript + Webpack. In IE 11 the app hangs at the splash screen, but works fine on all other platforms. I see these errors in the IE 11 console:
|
I am developing a large platform which uses SystemJS (the latest version), and we are experiencing this same issue, no Aurelia involved. The plugin in question is mine -- all code involved is mine (except SystemJS), code which I am confident in. I tracked it down independently to Chakra and a plugin for fetch at the line which expects the result of fetch to be a string, not a function, exactly as mentioned above. This is a crazy bug. I highly suspect all the "resolutions" above are patternicity, as this occurs for me in a highly random manner. Sometimes it seems like it is working, other times like it is failing all the time -- it changes from time to time, and I make changes from time to time trying to debug the problem. While it may be possible to "work around" the issue by using software which doesn't provoke the behavior, I suspect the fault is with Edge. Thanks @SamDeBlock ! |
Im encountering something really strange.
My site only loads in Microsoft Edge when Developer Tools (F12) are open.
Namely, if the debugger is connected, it seems to work, if I disconnect the debugger even with the dev tools open, the site stops loading.
I've narrowed it down so far to the loading of templates. I have several globalResources (and plugins) some of which are custom elements.
When I limit the amount of loading these, then my app template and beyond seems to load.
If I load all of them, the loading stops either at one of the resources, or just the app template, or then the first routed view and so on.
I am trying to create a repro out of this, but so far im very confused..
The text was updated successfully, but these errors were encountered: