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
Slow/weird network requests #13829
Comments
cc @deepak1556 proxy stuff 🤔 |
I have some new info. Besides my regular network adapter I also have a VirtualBox host only adapter. Disabling this brings response times down to expected levels. Specifying my "real" adapter as the listening interface for the server does not help. |
My app uses a local server for displaying content. The first startup of the app after booting up the machine takes longer than expected. The same happens after a long time not using the app (idling or simply having it closed for an hour or so). Deactivating my VMWare network adapters reduces this first startup time by a couple of seconds. |
There is some evidence that suggests this may be related to the version of Windows you're running. Windows 10 doesn't seem to repro, but Windows 7 does. |
Hi folks. I reported the problem on IAmPicard's app after his update which included an upgrade to Electron 3.0. It loaded incredibly slow, but upon disabling my VirtualBox network interface all problems were instantly resolved. It seems the Windows version was a red herring and shouldn't matter. EDIT: I'll post here what I posted in the other bug report. I'm on Win7 SP1 and have three active network interfaces. My main interface to my router, a VirtualBox interface, and an interface for my VPN. If I disable the VirtualBox interface then the problem immediately resolves itself. The VPN interface appears to have no impact at all so the problem looks to be specifically the VirtualBox interface. |
Hi! it would be great if anyone can attach the output file of
Make sure make the problematic requests in question before closing the app. Also if you are using some additional network related command line flags with your app, can you please include them with your report. Thanks! |
No additional command line flags. I noticed that passing --no-proxy-server seems to be another workaround though, in case that helps. |
Passed --enable-sandbox, which shouldn't make a difference. Captured within a VMWare Virtual Machine running Windows 7 32-bit. Deactivating the network adapter within the VM fixes the issue. @Lombra Thanks for the workaround. This will come in very handy. |
@Lombra @GhostlyDark thanks for the log, I was able to confirm the issue. We switched to use the system proxy resolver in 3.x, which seems to have problems with proxy auto-detect settings. I will look into fixing this. Can you confirm if disabling proxy auto-detect solves this ? Can also check if disabling auto-detect and specifying a explicit PAC url |
Disabling auto-detect fixes the issue. I changed the LAN settings of inetcpl.cpl, so I hope I got this right. |
@GhostlyDark thanks, that helps. We will have to move away from the system proxy resolver to fix this, the resolver timeout is expected in this case as per the implementation under auto detect https://cs.chromium.org/chromium/src/docs/proxy_auto_config.md. |
Hi, Can someone confirm that fixes for this issue will be merged soon in an upcoming 3.0.x release? Thanks! |
Same please! Could get that merged urgently with a new release please? This is impacting a lot of users on Windows 7 mainly. Happy to help in any way I can to make this happen :) |
Meanwhile, since downgrading to 2-0-x was not an option for us, I disabled some of the flags previous comments mentioned ☝️ Not sure which one made it work, but the following two lines fixed it for us (hard to know which one because I never reproduced the error, only some customers did): app.commandLine.appendSwitch('auto-detect', 'false')
app.commandLine.appendSwitch('no-proxy-server') Hope this will save time for some people. |
That's all I've used as options in the program shortcut and it works. |
The issue was fixed in #14656 which landed in 4.x branches and above. Due to the volume of refactor we are unsure about backporting to 3.x (stabilized branch) at this point. I would recommend updating the apps to 4.x or use one of the workarounds mentioned here. Thanks! |
Just to add more info on this. Our customers had similar problems as @lauracpierre, the switches helped to fix it for them, we couldn't really replicate the problems either. Is there any ETA on v4 release @deepak1556, please? |
@jakubzitny we are predicting to release 4.0 stable sometime in December, but you can test with one of the 4.0 beta releases from https://electronjs.org/releases now. Thanks! |
Hi, |
It can break connectivity, this was reported to me by some users. @deepak1556 Waiting for 4.0 stable release is difficult. 3.0.x were already not so stable (connectivity issues, print issues, etc) |
@lauracpierre What did you end up with? |
So far there is no ideal solution. :/ (I do not understand the vision behind working on version 4 while version 3 is still at this stage.) |
Extremely unfortunate bug. We'll have to revert back to 2.x for the time being. |
At the moment I can't guarantee immediate backport to 3.x release line, #14656 is not a trivial change to be backported into a stable release line and also because of the build system difference between master and 3.x. But would be glad to guide anyone willing to backport it. |
Backport for 3.x is available now #15813 |
v3.1.0-beta.1 has the fix, can you try it out and update the issue. Thanks! |
I hadn't even tried 4.0 yet, but 3.1.0 fixes this, indeed. |
I am having some users report that this problem or some variation is still occurring on 4.0.1. Personally able to reproduce the issue. None of the mentioned flags seems to resolve the problem either. |
Not related. This issue was not about network requests failing. |
I don't know if this can be of any help, but this very same fix of |
@Lombra I know this has been fixed, but is there a way to understand how to detect this bug?
|
|
@Lombra that means to reproduce you need to run Electron 3.0 on a Windows 7 virtualized or you can reproduce also on a Windows 7 host machine where VirtualBox/VMWare has been installed but isn't running? Thanks! |
@marco-ms It is not limited to Windows 7 I don't think. I reproduced it on a physical machine. As for the net log, you'd have to ask @deepak1556. |
I'm doing HTTP requests using fetch from my application to a server running on the same machine, and starting with 3.0.0 beta 1 these take several seconds to complete. For testing I've just typed in the following in the console:
fetch('http://192.168.0.202:32155/api/panels').then(console.log)
When I do one at a time it seems to consistently take 2.5 seconds. When I queue up several requests without waiting for a response they seem to get processed one after another or something. Looks like this in the console:
All the time seems to be alotted to stalling and proxy negotiation.
I don't know what to make of that. I don't have any special proxy configuration.
In contrast, on version 2.0.5 it looks like this:
Requests using XMLHttpRequest and
net.request
from the main process seems to behave in the same way. As far as the server is concerned all the requests finish in <1 ms.I'm developing my application on Electron 1.7.6 currently, where I've never experienced this issue either. Planning to upgrade to 3.0.
I'm not passing any command line arguments, nor does it seem to be affected by any of my code. I had the same both in my application and a barebones one I made for testing with an empty
index.html
.The text was updated successfully, but these errors were encountered: