ERR_HTTP2_PROTOCOL_ERROR while using electron-updater

989 Views Asked by At

I'm trying to test electron-updater, using a repo from github. It starts off detecting that an update is available, and then it starts downloading. But as the download starts picking up speed, this error gets triggered multiple times before the download stops altogether. Has anybody ever experienced this error before?

'Error: net::ERR_HTTP2_PROTOCOL_ERROR\n' + ' at SimpleURLLoaderWrapper. (electron/js2c/browser_init.js:105:6497)\n' + ' at SimpleURLLoaderWrapper.emit (events.js:315:20)'

1

There are 1 best solutions below

0
On

Adding this alongside the autoUpdater boilerplate code seemed to do it for me (tried it twice on Windows and macOS):

app.commandLine.appendSwitch('disable-http2');
autoUpdater.requestHeaders = {'Cache-Control' : 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0'};

source: https://github.com/electron-userland/electron-builder/issues/4987

Hope it works out for you too.