codex-team / codex.notes

WIP: crossplatform desktop notes application based on Electron and Editor.js
MIT License
141 stars 15 forks source link

Unhandled exception when not connected to the Internet #188

Open probonopd opened 5 years ago

probonopd commented 5 years ago

Let's not assume people have Internet access all the time.

Unhandled exception when not connected to the Internet:

firejail ./BeingTested.AppImage zenity, kdialog, Xdialog missing. Skipping /run/firejail/appimage/.appimage-10233/AppRun.
debug: Making initial database settings...
debug: Local data storage is in "/home/travis/.config/CodeX Notes" directory
Xlib:  extension "RANDR" missing on display ":99".
Checking for update
debug: [updater] 'Checking for update'
Pug interceptor registered successfully
Generated new staging user ID: 1b8a874b-6d59-5712-b41d-9e1f5b90ade5
Error: Error: net::ERR_INTERNET_DISCONNECTED
    at CancellationToken.createPromise (/run/firejail/appimage/.appimage-10233/app/resources/app.asar/node_modules/builder-util-runtime/src/CancellationToken.ts:51:5)
    at ElectronHttpExecutor.doApiRequest (/run/firejail/appimage/.appimage-10233/app/resources/app.asar/node_modules/builder-util-runtime/src/httpExecutor.ts:81:30)
    at ElectronHttpExecutor.request (/run/firejail/appimage/.appimage-10233/app/resources/app.asar/node_modules/builder-util-runtime/src/httpExecutor.ts:73:17)
    at GitHubProvider.httpRequest (/run/firejail/appimage/.appimage-10233/app/resources/app.asar/node_modules/electron-updater/src/Provider.ts:26:26)
    at /run/firejail/appimage/.appimage-10233/app/resources/app.asar/node_modules/electron-updater/src/GitHubProvider.ts:38:41
    at Generator.next (<anonymous>)
From previous event:
    at GitHubProvider.getLatestVersion (/run/firejail/appimage/.appimage-10233/app/resources/app.asar/node_modules/electron-updater/out/GitHubProvider.js:167:7)
    at /run/firejail/appimage/.appimage-10233/app/resources/app.asar/node_modules/electron-updater/src/AppUpdater.ts:304:25
From previous event:
    at AppImageUpdater.getUpdateInfo (/run/firejail/appimage/.appimage-10233/app/resources/app.asar/node_modules/electron-updater/out/AppUpdater.js:460:7)
    at /run/firejail/appimage/.appimage-10233/app/resources/app.asar/node_modules/electron-updater/src/AppUpdater.ts:308:35
    at Generator.next (<anonymous>)
From previous event:
    at AppImageUpdater.doCheckForUpdates (/run/firejail/appimage/.appimage-10233/app/resources/app.asar/node_modules/electron-updater/out/AppUpdater.js:502:7)
    at /run/firejail/appimage/.appimage-10233/app/resources/app.asar/node_modules/electron-updater/src/AppUpdater.ts:279:25
    at Generator.next (<anonymous>)
    at runCallback (timers.js:789:20)
    at tryOnImmediate (timers.js:751:5)
    at processImmediate [as _immediateCallback] (timers.js:722:5)
From previous event:
    at AppImageUpdater._checkForUpdates (/run/firejail/appimage/.appimage-10233/app/resources/app.asar/node_modules/electron-updater/out/AppUpdater.js:433:7)
    at AppImageUpdater.checkForUpdates (/run/firejail/appimage/.appimage-10233/app/resources/app.asar/node_modules/electron-updater/src/AppUpdater.ts:217:35)
    at App.app.on (/run/firejail/appimage/.appimage-10233/app/resources/app.asar/src/updater.js:110:17)
    at emitTwo (events.js:131:20)
    at App.emit (events.js:214:7)
debug: [updater] 'Error while checking for updates'
debug: [updater] 'net::ERR_INTERNET_DISCONNECTED'

Reference: https://github.com/AppImage/appimage.github.io/pull/1123

probonopd commented 5 years ago

Also see: https://github.com/standardnotes/desktop/commit/d8f71ba6b58ba5c4d4d2db42d04e895880f448e8