buttercup / buttercup-desktop

:key: Cross-Platform Passwords & Secrets Vault
https://buttercup.pw
GNU General Public License v3.0
4.3k stars 332 forks source link

Incremental update notes #627

Open perry-mitchell opened 6 years ago

perry-mitchell commented 6 years ago

Currently, if the user is more than 1 version behind the latest version, they only see the changelog (update notice) for the latest version. They should see all of the versions between as well.

jadach1 commented 5 years ago

Hi, I am trying to work on this issue. I can run npm test and get a clean run and I can also use the app after npm run start. To try and replicate the problem I am using an earlier buttercup version of 1.12 however, when I try to force load the updateWindow to load after npm run start from line 60 of lib/updater.js

export function checkForUpdates() { // if (process.env.NODE_ENV === 'production') { console.log(chalk.red('we are inside the updater line 61')) autoUpdater.checkForUpdates(); // } }

and run the app after I get this error which I cannot understand, I was hoping maybe someone here can help me with ? I am using a windows 10 OS atm.

Here is the error code:

rror: Error: ENOENT, dev-app-update.yml not found in E:\GITProjects\buttercup-desktop\node_modules\electron\dist\resources\default_app.asar at notFoundError (ELECTRON_ASAR.js:108:19) at fs.readFile (ELECTRON_ASAR.js:536:16) at go$readFile (E:\GITProjects\buttercup-desktop\node_modules\graceful-fs\graceful-fs.js:73:14) at readFile (E:\GITProjects\buttercup-desktop\node_modules\graceful-fs\graceful-fs.js:70:12) at readFile (E:\GITProjects\buttercup-desktop\node_modules\universalify\index.js:5:67) From previous event: at E:\GITProjects\buttercup-desktop\node_modules\electron-updater\src\AppUpdater.ts:370:27 at Generator.next () From previous event: at NsisUpdater.loadUpdateConfig (E:\GITProjects\buttercup-desktop\node_modules\electron-updater\out\AppUpdater.js:395:11) at Lazy.AppUpdater.configOnDisk.Lazy (E:\GITProjects\buttercup-desktop\node_modules\electron-updater\src\AppUpdater.ts:132:43) at Lazy.get value [as value] (E:\GITProjects\buttercup-desktop\node_modules\lazy-val\src\main.ts:18:23) at E:\GITProjects\buttercup-desktop\node_modules\electron-updater\src\AppUpdater.ts:281:46 at Generator.next () From previous event: at NsisUpdater.doCheckForUpdates (E:\GITProjects\buttercup-desktop\node_modules\electron-updater\out\AppUpdater.js:353:11) at E:\GITProjects\buttercup-desktop\node_modules\electron-updater\src\AppUpdater.ts:264:25 at Generator.next () at runCallback (timers.js:696:18) at tryOnImmediate (timers.js:667:5) at processImmediate (timers.js:649:5) From previous event: at NsisUpdater._checkForUpdates (E:\GITProjects\buttercup-desktop\node_modules\electron-updater\out\AppUpdater.js:307:11) at NsisUpdater.checkForUpdates (E:\GITProjects\buttercup-desktop\node_modules\electron-updater\src\AppUpdater.ts:213:35) at checkForUpdates (E:\GITProjects\buttercup-desktop\src\main\lib\updater.js:83:32) at Timeout.setTimeout (E:\GITProjects\buttercup-desktop\src\main\windows.js:94:53) at ontimeout (timers.js:427:11) at tryOnTimeout (timers.js:289:5) at listOnTimeout (timers.js:252:5) at Timer.processTimers (timers.js:212:10) (anonymous) @ renderer.js?928a:32 emit @ events.js:182

Thank you

ph1p commented 5 years ago

Hi @jadach1 The updater cannot find the dev-app-update.yml in dev mode. This file contains all necessary information about the update.

I also needed this in my PR. You need to update your src/main/lib/updater.js as follows:

configuration: https://github.com/buttercup/buttercup-desktop/pull/699/commits/db98f7d430665b914ee555c66fe6e4794d281580 dev-app-update.yml: https://github.com/buttercup/buttercup-desktop/blob/db98f7d430665b914ee555c66fe6e4794d281580/dev-app-update.yml

jadach1 commented 5 years ago

Thanks for the response, that fixed the issue I was having.