Closed pietrovismara closed 9 months ago
Hi !
Same for me more information here : https://github.com/electron-userland/electron-builder/issues/7069#issuecomment-1221366205
Hmm. I'm having a similar issue...
[2022-10-12 21:08:44.307] [info] Checking for update.
[2022-10-12 21:08:44.324] [info] Found version 0.0.2 (url: HTML Editor-0.0.2-arm64-mac.zip, HTML Editor-0.0.2-mac.zip)
[2022-10-12 21:08:44.324] [info] Update Available {
version: '0.0.2',
files: [
{
url: 'HTML Editor-0.0.2-arm64-mac.zip',
sha512: 'LdoWqiyAbEY54bvEaeXOvOVDtNeD+FBpKj4o/K4mhpE/zC+Gvoi27Ok5b472/JfpP2vPtmrAi8YL43bWAdm8sg==',
size: 80631449
},
{
url: 'HTML Editor-0.0.2-mac.zip',
sha512: 'NK4+cF5Wu3QWOCg+Y1oBGLYBt8eJHdHxJplB06EVYQMb42e1MKSa4FgvjUffq2qDq1L/g2KSmq1sW7Xz/TxBSQ==',
size: 80137014
}
],
path: 'HTML Editor-0.0.2-arm64-mac.zip',
sha512: 'LdoWqiyAbEY54bvEaeXOvOVDtNeD+FBpKj4o/K4mhpE/zC+Gvoi27Ok5b472/JfpP2vPtmrAi8YL43bWAdm8sg==',
releaseDate: '2022-10-13T03:57:12.393Z'
}
[2022-10-12 21:08:44.325] [info] Downloading update from HTML Editor-0.0.2-arm64-mac.zip, HTML Editor-0.0.2-mac.zip
[2022-10-12 21:08:44.325] [debug] Checking for macOS Rosetta environment
[2022-10-12 21:08:44.394] [info] Checked for macOS Rosetta environment (isRosetta=false)
[2022-10-12 21:08:44.395] [debug] Checking for arm64 in uname
[2022-10-12 21:08:44.452] [info] Checked 'uname -a': arm64=true
[2022-10-12 21:08:44.453] [info] Downloading update from HTML Editor-0.0.2-arm64-mac.zip, HTML Editor-0.0.2-mac.zip
[2022-10-12 21:08:44.453] [debug] Checking for macOS Rosetta environment
[2022-10-12 21:08:44.512] [info] Checked for macOS Rosetta environment (isRosetta=false)
[2022-10-12 21:08:44.512] [debug] Checking for arm64 in uname
[2022-10-12 21:08:44.570] [info] Checked 'uname -a': arm64=true
[2022-10-12 21:08:44.571] [debug] updater cache dir: /Users/chet/Library/Application Support/Caches/html-editor-updater
[2022-10-12 21:08:44.571] [debug] updater cache dir: /Users/chet/Library/Application Support/Caches/html-editor-updater
[2022-10-12 21:08:44.882] [info] Download Progress {
total: 80631449,
delta: 80631449,
transferred: 80631449,
percent: 100,
bytesPerSecond: 261790419
}
[2022-10-12 21:08:44.883] [info] Download Progress {
total: 80631449,
delta: 80631449,
transferred: 80631449,
percent: 100,
bytesPerSecond: 261790419
}
[2022-10-12 21:08:44.883] [info] New version 0.0.2 has been downloaded to /Users/chet/Library/Application Support/Caches/html-editor-updater/pending/HTML Editor-0.0.2-arm64-mac.zip
[2022-10-12 21:08:44.884] [debug] Creating proxy server for native Squirrel.Mac (fileToProxy=http://localhost:1234/HTML%20Editor-0.0.2-arm64-mac.zip)
[2022-10-12 21:08:44.885] [debug] Proxy server for native Squirrel.Mac is created (fileToProxy=http://localhost:1234/HTML%20Editor-0.0.2-arm64-mac.zip)
[2022-10-12 21:08:44.885] [debug] Proxy server for native Squirrel.Mac is starting to listen (fileToProxy=http://localhost:1234/HTML%20Editor-0.0.2-arm64-mac.zip)
[2022-10-12 21:08:44.887] [debug] Proxy server for native Squirrel.Mac is listening (address=http://127.0.0.1:61230, fileToProxy=http://localhost:1234/HTML%20Editor-0.0.2-arm64-mac.zip)
[2022-10-12 21:08:44.888] [info] Update Downloaded {
version: '0.0.2',
files: [
{
url: 'HTML Editor-0.0.2-arm64-mac.zip',
sha512: 'LdoWqiyAbEY54bvEaeXOvOVDtNeD+FBpKj4o/K4mhpE/zC+Gvoi27Ok5b472/JfpP2vPtmrAi8YL43bWAdm8sg==',
size: 80631449
},
{
url: 'HTML Editor-0.0.2-mac.zip',
sha512: 'NK4+cF5Wu3QWOCg+Y1oBGLYBt8eJHdHxJplB06EVYQMb42e1MKSa4FgvjUffq2qDq1L/g2KSmq1sW7Xz/TxBSQ==',
size: 80137014
}
],
path: 'HTML Editor-0.0.2-arm64-mac.zip',
sha512: 'LdoWqiyAbEY54bvEaeXOvOVDtNeD+FBpKj4o/K4mhpE/zC+Gvoi27Ok5b472/JfpP2vPtmrAi8YL43bWAdm8sg==',
releaseDate: '2022-10-13T03:57:12.393Z',
downloadedFile: '/Users/chet/Library/Application Support/Caches/html-editor-updater/pending/HTML Editor-0.0.2-arm64-mac.zip'
}
[2022-10-12 21:08:44.890] [error] Error: Error: ENOENT: no such file or directory, rename '/Users/chet/Library/Application Support/Caches/html-editor-updater/pending/temp-HTML Editor-0.0.2-arm64-mac.zip' -> '/Users/chet/Library/Application Support/Caches/html-editor-updater/pending/HTML Editor-0.0.2-arm64-mac.zip'
[2022-10-12 21:08:44.894] [info] / requested
[2022-10-12 21:08:44.896] [info] /183cf87c455-1ea1.zip requested
[2022-10-12 21:08:44.896] [info] /183cf87c455-1ea1.zip requested by Squirrel.Mac, pipe /Users/chet/Library/Application Support/Caches/html-editor-updater/pending/HTML Editor-0.0.2-arm64-mac.zip
[2022-10-12 21:08:44.898] [error] Error: Error: Cannot pipe "/Users/chet/Library/Application Support/Caches/html-editor-updater/pending/HTML Editor-0.0.2-arm64-mac.zip": Error: ENOENT: no such file or directory, open '/Users/chet/Library/Application Support/Caches/html-editor-updater/pending/HTML Editor-0.0.2-arm64-mac.zip'
at ReadStream.<anonymous> (/Applications/HTML Editor.app/Contents/Resources/app.asar/main.js:134:17704)
at ReadStream.emit (node:events:390:28)
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
[2022-10-12 21:08:49.898] [info] Proxy server for native Squirrel.Mac is closed (fileToProxy=http://localhost:1234/HTML%20Editor-0.0.2-arm64-mac.zip)
[2022-10-12 21:08:49.901] [warn] Error: The network connection was lost.
[2022-10-12 21:08:49.901] [error] Error: Error: The network connection was lost.
I'm noticing that this logs twice even though I'm only calling it once...
autoUpdater.on("checking-for-update", () => {
console.log("Checking for update.")
})
And then it appears to be downloading everything twice basically...
FYI I had a similar symptom appearing in our application, turns out we were initiating checkForUpdates
twice on application load, this was causing a bunch of issues with electron-builder which disappeared once we fixed up the double call our end.
Might be worth investigating if you're still stuck.
I think this can be closed.
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.
This issue was closed because it has been stalled for 30 days with no activity.
I'm noticing that this logs twice even though I'm only calling it once...
autoUpdater.on("checking-for-update", () => { console.log("Checking for update.") })
And then it appears to be downloading everything twice basically...
Here in 2024 and I can 100% confirm that this was my exact problem. I manually handle downloading the new version with Electron Builder's provided methods, and my code was clashing with the autoUpdater.autodownload
boolean flag being set to true
. I hard-coded this property to false
, and it fixed my problems.
This is the same exact issue as https://github.com/electron-userland/electron-builder/issues/3622, which was ignored and then closed.
This is the error I get on macOS:
And on Windows:
The error is also non deterministic: retrying to update several times usually works after the 3rd tentative.
I'm using the autoUpdater as follows: