electron: SimpleURLLoaderWrapper broken with redirects in > 7.1.2
Preflight Checklist
- I have read the Contributing Guidelines for this project.
- I agree to follow the Code of Conduct that this project adheres to.
- I have searched the issue tracker for an issue that matches the one I want to file, without success.
Issue Details
- Electron Version: v7.1.4
- Operating System: Ubuntu + MacOS
- Last Known Working Electron version: 7.1.2
Expected Behavior
electron and electron-updater should follow redirect URLs
Actual Behavior
electron-updater / electron-builder breaks with Electron > 7.1.2
Redirect was cancelled at SimpleURLLoaderWrapper. (electron/js2c/browser_init.js:2561:23) at SimpleURLLoaderWrapper.emit (events.js:203:13)
This NUKED my app update system and I think it’s a really critical bug that needs to be fixed.
To Reproduce
I don’t have an easy way to reproduce.
You could TRY to fetch this URL:
https://github.com/burtonator/polar-bookshelf/releases/download/v1.80.3/Polar-Bookshelf-1.80.3-mac.zip
which is what the auto-updater is fetching and then breaks on.
PS … Electron rocks! Except for this issue of course.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 7
- Comments: 18 (7 by maintainers)
Commits related to this issue
- fix: SimpleURLLoaderWrapper redirects (#21566) — committed to electron/electron by lutzroeder 5 years ago
- fix: SimpleURLLoaderWrapper redirects (#21566) — committed to electron/electron by lutzroeder 5 years ago
- fix: SimpleURLLoaderWrapper redirects (#21566) (#21644) — committed to electron/electron by trop[bot] 5 years ago
- fix: SimpleURLLoaderWrapper redirects (#21566) (#21645) — committed to electron/electron by trop[bot] 5 years ago
@nornagon It doesn’t look like anyone is actively working on
electron-updater. Lots of apps are using it and 0476eb67 broke update for those apps. This should probably get some priority since most app authors likely won’t notice this until thousands of users are stranded with apps that no longer update. Would be great if you can help investigate and revert your change until this bug is understood and fixed?doDownloadin httpExecutor.createRequestin electronHttpExecutor withredirect: "manual".addRedirectHandlersaddson("redirect")butrequest.followRedirect()is never called. Insteadrequest.abort()is called starting anotherdoDownloadwith the new location.doDownloadgets a200response and the file is downloaded in the right location butError: Redirect was cancelledis raised causing the whole update to fail.SimpleURLLoaderWrapper should probably not die with an error if
request.abort()was called by the handler:Electron v7.1.8 should have the fix to this issue.
@CatalanCabbage I haven’t tried it. It’s not clear to me how that solution solves that problem and I’m concerned about it creating new problems.
@lukehaas, yes! Take a look at this issue, it has a commit reference too. 😃
https://github.com/electron-userland/electron-builder/issues/4987#issuecomment-647039914
But apparently some people have had issues after that too - you can go through the mentions on that thread to check those issues too.
@nornagon thanks for pinging, but I don’t work on
electron-updaterand don’t use it anymore.