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
Calling browserWindow.loadURL(url) a second time resolves (it should reject again) #40640
Comments
The issue seems to be that on load error, first a I've verified that the issue goes away with this change in
But this fix assumes that a |
Hey @tzahola! Do you mind opening a quick PR for this issue so we can get more eyes on it to review? 🙇 |
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment! |
This issue has been closed due to inactivity, and will not be monitored. If this is a bug and you can reproduce this issue on a supported version of Electron please open a new issue and include instructions for reproducing the issue. |
Preflight Checklist
Electron Version
28.0.0
What operating system are you using?
macOS
Operating System Version
Ventura 13.6.1
What arch are you using?
x64
Last Known Working Electron version
No response
Expected Behavior
Run this code in Electron having Internet disconnected:
The expected behavior is that
win.loadURL()
fails (rejects) twice, so I should see these logs:Actual Behavior
However this is the output I get:
This is, calling
win.loadURL()
a second time, with same arguments and Internet also disconnected, now resolves instead of rejecting with same error as before. Idempotency is missing here. If calling a method with N arguments under X conditions produces an error result, calling same method again, with same arguments and under same X conditions should produce the same error result. However, here the second time it's producing a positive result.The interesting thing is that this warning is logged both times:
Failed to load URL: ...
:so it looks like, once
loadURL()
failed for first time, some "error" state was kept and second timeloadURL()
is called and fails again (for the very same reason than the first time) the code says "oh, it already failed before so let's resolve this time instead of rejecting with same error as before". This is of course a bug.Testcase Gist URL
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: