-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Auto updater fails to launch UAC update on full download fallback #2640
Comments
I am having one single client that faces the very same problem (this brought me here). He has the latest version installed, yet it will always download the latest version, so he is in an update loop. I just told him to run as an administrator and will get the results soon. However, interestingly, the setup does replace the files (The "Created date" of the files changes). |
After a few more days of debugging this issue, we've made some new/further? discoveries
We tried adding some custom nsis, but it didn't solve the problem.
|
@develar some of our use has reported the same issue. Running the app as an admin didn't fix the issue -
autoupdater logs -
[2018-02-27 15:21:38:0487] [info] Checking for update
[2018-02-27 15:21:41:0888] [info] Found version 1.8.2 (url: zulip-web-setup-1.8.2.exe)
[2018-02-27 15:21:41:0890] [info] Downloading update from zulip-web-setup-1.8.2.exe
[2018-02-27 15:21:45:0871] [error] Cannot download differentially, fallback to full download: Error: EPERM: operation not permitted, open 'C:\Program Files\Zulip\package.7z'
at C:\Program Files\Zulip\resources\app.asar\node_modules\builder-util-runtime\src\blockMapApi.ts:22:20
at Generator.next ()
From previous event:
at readEmbeddedBlockMapData (C:\Program Files\Zulip\resources\app.asar\node_modules\builder-util-runtime\out\blockMapApi.js:39:21)
at C:\Program Files\Zulip\resources\app.asar\node_modules\electron-updater\src\differentialDownloader\FileWithEmbeddedBlockMapDifferentialDownloader.ts:11:44
at Generator.next ()
at runCallback (timers.js:672:20)
at tryOnImmediate (timers.js:645:5)
at processImmediate [as _immediateCallback] (timers.js:617:5)
From previous event:
at FileWithEmbeddedBlockMapDifferentialDownloader.download (C:\Program Files\Zulip\resources\app.asar\node_modules\electron-updater\out\differentialDownloader\FileWithEmbeddedBlockMapDifferentialDownloader.js:37:11)
at C:\Program Files\Zulip\resources\app.asar\node_modules\electron-updater\src\NsisUpdater.ts:177:10
at Generator.next ()
From previous event:
at NsisUpdater.differentialDownloadWebPackage (C:\Program Files\Zulip\resources\app.asar\node_modules\electron-updater\out\NsisUpdater.js:232:11)
at C:\Program Files\Zulip\resources\app.asar\node_modules\electron-updater\src\NsisUpdater.ts:53:24
at Generator.next ()
at runCallback (timers.js:672:20)
at tryOnImmediate (timers.js:645:5)
at processImmediate [as _immediateCallback] (timers.js:617:5)
From previous event:
at C:\Program Files\Zulip\resources\app.asar\node_modules\electron-updater\out\NsisUpdater.js:118:33
at C:\Program Files\Zulip\resources\app.asar\node_modules\electron-updater\src\BaseUpdater.ts:46:13
at Generator.next ()
at FSReqWrap.oncomplete (fs.js:114:15)
From previous event:
at NsisUpdater.executeDownload (C:\Program Files\Zulip\resources\app.asar\node_modules\electron-updater\out\BaseUpdater.js:98:11)
at C:\Program Files\Zulip\resources\app.asar\node_modules\electron-updater\src\NsisUpdater.ts:37:16
From previous event:
at NsisUpdater.doDownloadUpdate (C:\Program Files\Zulip\resources\app.asar\node_modules\electron-updater\out\NsisUpdater.js:125:11)
at C:\Program Files\Zulip\resources\app.asar\node_modules\electron-updater\src\AppUpdater.ts:331:25
at Generator.next ()
From previous event:
at NsisUpdater.downloadUpdate (C:\Program Files\Zulip\resources\app.asar\node_modules\electron-updater\out\AppUpdater.js:366:11)
at C:\Program Files\Zulip\resources\app.asar\node_modules\electron-updater\src\AppUpdater.ts:307:49
From previous event:
at NsisUpdater.doCheckForUpdates (C:\Program Files\Zulip\resources\app.asar\node_modules\electron-updater\out\AppUpdater.js:337:11)
at C:\Program Files\Zulip\resources\app.asar\node_modules\electron-updater\src\AppUpdater.ts:255:25
at Generator.next ()
at runCallback (timers.js:672:20)
at tryOnImmediate (timers.js:645:5)
at processImmediate [as _immediateCallback] (timers.js:617:5)
From previous event:
at NsisUpdater._checkForUpdates (C:\Program Files\Zulip\resources\app.asar\node_modules\electron-updater\out\AppUpdater.js:291:11)
at NsisUpdater.checkForUpdates (C:\Program Files\Zulip\resources\app.asar\node_modules\electron-updater\src\AppUpdater.ts:204:35)
at appUpdater (C:\Program Files\Zulip\resources\app.asar\main\autoupdater.js:48:14)
at WebContents.page.once (C:\Program Files\Zulip\resources\app.asar\main\index.js:165:3)
at Object.onceWrapper (events.js:293:19)
at emitTwo (events.js:106:13)
at WebContents.emit (events.js:194:7)
[2018-02-27 15:21:49:0407] [info] New version 1.8.2 has been downloaded to C:\Users\USERNAME\AppData\Local\Temp\up-cpGTTD\zulip-web-setup-1.8.2.exe
[2018-02-27 15:21:52:0840] [info] Install on explicit quitAndInstall
[2018-02-27 15:21:52:0841] [info] Install: isSilent: false, isRunAfter: true
[2018-02-27 15:21:53:0574] [info] Access denied or UNKNOWN error code on spawn, will be executed again using elevate
[2018-02-27 15:37:04:0817] [info] Checking for update
[2018-02-27 15:37:08:0602] [info] Found version 1.8.2 (url: zulip-web-setup-1.8.2.exe)
[2018-02-27 15:37:08:0605] [info] Downloading update from zulip-web-setup-1.8.2.exe
[2018-02-27 15:37:13:0461] [info] Full: 41,598.69 KB, To download: 0 KB (0%)
[2018-02-27 15:37:13:0472] [info] Differential download: https://github.com/zulip/zulip-electron/releases/download/v1.8.2/zulip-1.8.2-x64.nsis.7z
[2018-02-27 15:37:14:0775] [info] New version 1.8.2 has been downloaded to C:\Users\USERNAME\AppData\Local\Temp\up-hUPazF\zulip-web-setup-1.8.2.exe
[2018-02-27 15:37:24:0869] [info] Install on explicit quitAndInstall
[2018-02-27 15:37:24:0870] [info] Install: isSilent: false, isRunAfter: true
[2018-02-27 15:37:25:0305] [info] Access denied or UNKNOWN error code on spawn, will be executed again using elevate
[2018-02-27 15:37:42:0868] [info] Checking for update
[2018-02-27 15:37:46:0266] [info] Found version 1.8.2 (url: zulip-web-setup-1.8.2.exe)
[2018-02-27 15:37:46:0269] [info] Downloading update from zulip-web-setup-1.8.2.exe
[2018-02-27 15:37:50:0530] [info] Full: 41,598.69 KB, To download: 0 KB (0%)
[2018-02-27 15:37:50:0536] [info] Differential download: https://github.com/zulip/zulip-electron/releases/download/v1.8.2/zulip-1.8.2-x64.nsis.7z
[2018-02-27 15:37:51:0297] [info] New version 1.8.2 has been downloaded to C:\Users\USERNAME\AppData\Local\Temp\up-SpfSPb\zulip-web-setup-1.8.2.exe
[2018-02-27 15:38:04:0968] [info] Auto install update on quit
[2018-02-27 15:38:04:0969] [info] Install: isSilent: true, isRunAfter: false
[2018-02-27 15:38:05:0556] [info] Access denied or UNKNOWN error code on spawn, will be executed again using elevate
[2018-02-27 15:38:27:0928] [info] Checking for update
[2018-02-27 15:38:31:0703] [info] Found version 1.8.2 (url: zulip-web-setup-1.8.2.exe)
[2018-02-27 15:38:31:0705] [info] Downloading update from zulip-web-setup-1.8.2.exe
[2018-02-27 15:38:35:0351] [info] Full: 41,598.69 KB, To download: 0 KB (0%)
[2018-02-27 15:38:35:0361] [info] Differential download: https://github.com/zulip/zulip-electron/releases/download/v1.8.2/zulip-1.8.2-x64.nsis.7z
[2018-02-27 15:38:36:0224] [info] New version 1.8.2 has been downloaded to C:\Users\USERNAME\AppData\Local\Temp\up-nlk53M\zulip-web-setup-1.8.2.exe
[2018-02-27 15:38:46:0911] [info] Install on explicit quitAndInstall
[2018-02-27 15:38:46:0912] [info] Install: isSilent: false, isRunAfter: true
[2018-02-27 15:38:47:0319] [info] Access denied or UNKNOWN error code on spawn, will be executed again using elevate
[2018-02-27 15:39:07:0119] [info] Checking for update
[2018-02-27 15:39:10:0569] [info] Found version 1.8.2 (url: zulip-web-setup-1.8.2.exe)
[2018-02-27 15:39:10:0571] [info] Downloading update from zulip-web-setup-1.8.2.exe
[2018-02-27 15:39:14:0555] [info] Full: 41,598.69 KB, To download: 0 KB (0%)
[2018-02-27 15:39:14:0565] [info] Differential download: https://github.com/zulip/zulip-electron/releases/download/v1.8.2/zulip-1.8.2-x64.nsis.7z
[2018-02-27 15:39:15:0186] [info] New version 1.8.2 has been downloaded to C:\Users\USERNAME\AppData\Local\Temp\up-4RxOYX\zulip-web-setup-1.8.2.exe
[2018-02-27 15:52:02:0581] [info] Auto install update on quit
[2018-02-27 15:52:02:0584] [info] Install: isSilent: true, isRunAfter: false
[2018-02-27 15:52:02:0631] [info] Access denied or UNKNOWN error code on spawn, will be executed again using elevate
[2018-02-27 15:52:23:0376] [info] Checking for update
[2018-02-27 15:52:26:0843] [info] Found version 1.8.2 (url: zulip-web-setup-1.8.2.exe)
[2018-02-27 15:52:26:0845] [info] Downloading update from zulip-web-setup-1.8.2.exe
[2018-02-27 15:52:30:0635] [info] Full: 41,598.69 KB, To download: 0 KB (0%)
[2018-02-27 15:52:30:0681] [info] Differential download: https://github.com/zulip/zulip-electron/releases/download/v1.8.2/zulip-1.8.2-x64.nsis.7z
[2018-02-27 15:52:31:0355] [info] New version 1.8.2 has been downloaded to C:\Users\USERNAME\AppData\Local\Temp\up-foKgj4\zulip-web-setup-1.8.2.exe
[2018-02-27 15:52:34:0309] [info] Install on explicit quitAndInstall
[2018-02-27 15:52:34:0310] [info] Install: isSilent: false, isRunAfter: true
[2018-02-27 15:52:34:0737] [info] Access denied or UNKNOWN error code on spawn, will be executed again using elevate
[2018-02-27 15:52:54:0954] [info] Checking for update
relevent config "win": {
"target": [
{
"target": "nsis-web",
"arch": [
"x64",
"ia32"
]
}
],
"icon": "build/icon.ico"
},
"nsis": {
"perMachine": true,
"oneClick": false,
"allowToChangeInstallationDirectory": true
}
} |
@develar few notes about this issue -
Few reports from our users -
|
Please try electron-updater 2.21.4 |
Thanks, I'll try it out. |
@develar I tried out electron-updater 2.21.4 and I'm still getting the issue as described above: |
I think I am seeing the same I'm on electron-updater 2.23.3
And then just nothing> |
Just to add more info, but we also face the issue only when |
@openbuilds-engineer did you solve this? |
Hi @develar Did you have any news? "build": {
"win": {
"artifactName": "${productName}_setup_${version}.${ext}",
"requestedExecutionLevel": "highestAvailable",
"target": [
{
"target": "nsis",
"arch": [
"x64",
"ia32"
]
}
],
"publish": [
{
"provider": "generic",
"url": "http://11111111111:8081/artifactory/h2pos/"
}
]
},
"nsis": {
"allowElevation": true,
"allowToChangeInstallationDirectory": true,
"license": "eula.html",
"oneClick": false,
"perMachine": true
},
}, Electron builder successfully create an EXE file which require UAC permissions, but once electron-updater finish to download the update i can see my EXE installer file (deployed on a generic server) and an not documented file "update-info.json" which contains: {
"fileName": "H2Pos_setup_1.7.2-beta.1.exe",
"sha512": "YmwsZdHqO+aD9PUcTrmJ/DpiuJ/3XFwvQS/xGwPi8MFewL0VHGt9QBc7MZW4+51SMfAKGz8WU9Vk649camEegQ==",
"isAdminRightsRequired": false
} When we run quitAndInstall() method, it fail with the error "spawn: … … elevate.exe". |
Hi friends,
We're using the auto-update feature of the electron-builder, and 90%+ of the time it works great. However for some users, they run into
which triggers a full download. This works fine (leads to)
But upon an attempt to quitAndInstall
The final line fails, and so the user is unable to update. Upon restarting the app they are stuck in an update loop, rendering the app unusable until a fresh install of the latest version.
Our current fix is to tell users to run as admin, but ideally the UAC would prompt and allow users to opt into admin.
Here is our relevant package.json lines
Let me know if any more information would be useful for debugging.
Thanks,
Jonathan
The text was updated successfully, but these errors were encountered: