buckets / application

Buckets Desktop Application
https://www.budgetwithbuckets.com
184 stars 2 forks source link

error creating peddler sodium.nim(210, 10) `key.len == crypto_secretbox_KEYBYTES()` #838

Open squirrellyDave opened 1 year ago

squirrellyDave commented 1 year ago

On all current (0.67.2, 0.68.0, 0.69.0) buckets will not open a budget using AppImage or AUR package (which uses the .deb). There is an error on opening, prior to the splash screen. Splash screen loads despite error. When attempting to open a new budget, or an existing budget an unable to open the file: <filename> error pops. Screencaps below are seen on all three versions.

buckets_69 0_open_error

buckets_69 0_open_test

Should probably include OS info.
Manjaro Linux kernel 5.15.81-1

iffy commented 1 year ago

I see you filed a bug with your log file, too. Thanks for that!

As a workaround, can you try this:

  1. Close Buckets
  2. Delete /home/david/.config/Buckets/app.sqlite
  3. Start Buckets and see if it works

This will destroy any preferences you have set, but will not delete any budget data.

iffy commented 1 year ago

0.68.0-20221215-f3ZMYcSv Version: 0.68.0 (node: v12.4.0) OS: linux 5.15.81-1-MANJARO x64 Lang: en English Loc: file:///tmp/.mount_BucketFb22O0/resources/app.asar/src/wwwroot/misc/wizard.html

[2022-12-15 07:56:07.979] [info] (core) ERROR (appwide) Decryption failed
[2022-12-15 07:56:07.980] [info] (core) INFO (sharing) decryption of keypair failed; will make new keypair
[2022-12-15 07:56:07.980] [info] (core) INFO (sharing) generating keypair
[2022-12-15 07:56:07.980] [info] (core) ERROR (appwide) Encryption failed
[2022-12-15 07:56:07.980] [info] (core) ERROR (sharing) encrypting seckey failed: sodium.nim(210, 10) `key.len == crypto_secretbox_KEYBYTES()` 
[2022-12-15 07:56:07.980] [info] (core) ERROR (peddler) error creating peddler sodium.nim(210, 10) `key.len == crypto_secretbox_KEYBYTES()` 
[2022-12-15 07:56:07.980] [info] (core) fatal.nim(53)            sysFatal
[2022-12-15 07:56:07.981] [info] (core) Error: unhandled exception: sodium.nim(210, 10) `key.len == crypto_secretbox_KEYBYTES()`  [AssertionDefect]
[2022-12-15 07:56:07.982] [info] (buckets-node) ProcessBackend exit 1 null
[2022-12-15 07:56:07.982] [error] (core) Error: BucketsLib bin died: 1/null
    at ChildProcess.<anonymous> (/tmp/.mount_BucketFb22O0/resources/app.asar/node_modules/buckets-node/dist/main.js:263:44)
    at ChildProcess.emit (events.js:200:13)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
squirrellyDave commented 1 year ago

I see you filed a bug with your log file, too. Thanks for that!

As a workaround, can you try this:

  1. Close Buckets
  2. Delete /home/david/.config/Buckets/app.sqlite
  3. Start Buckets and see if it works

This will destroy any preferences you have set, but will not delete any budget data.

No change in opening, same set of errors.

iffy commented 1 year ago

Has there been a version that did work? I'm trying to figure out if this is new since 0.67.2

squirrellyDave commented 1 year ago

Has there been a version that did work? I'm trying to figure out if this is new since 0.67.2

yes. this was working on 0.67.2, and 0.68.0. I did updates on my system between the last time it worked and when it failed. I assume it was something in there, but there were a lot, so I'm not sure where to start looking.

iffy commented 1 year ago

If I'm going to duplicate this locally, I'd like to match your system as best I can. What desktop do you use? https://manjaro.org/download/

iffy commented 1 year ago

Version: 0.70.2 (node: v12.4.0) OS: linux 6.2.6-1-MANJARO x64 Lang: en English Loc: file:///opt/Buckets/resources/app.asar/src/wwwroot/misc/wizard.html

0.70.2-20230318-jmHHDnZ5

iffy commented 1 year ago

I just made a Manjaro VM (manjaro-kde-22.0.5-230316-linux61.iso was the source), downloaded Buckets v0.70.2 and it worked without error.

@squirrellyDave If you can help me better duplicate your system, I'd like to duplicate this error locally so I can fix it.

rosstribe commented 1 year ago

I'm getting this error as well. Also Manjaro with KDE.

Error:

STARTING v0.70.2

[11:36:45.546] [info] (main)  Log level: silly
[11:36:45.546] [info] (main) Local date: 2023-04-14
[11:36:45.554] [info] (main) Local time: 2023-04-14 11:36:45+10:00
[11:36:45.554] [info] (main)   UTC time: 2023-04-14T01:36:45Z
[11:36:45.554] [info] (main)   NODE_ENV: undefined
[11:36:45.555] [info] (main)         OS: linux 6.2.10-1-MANJARO x64
[11:36:45.555] [info] (main)        pid: 16103
Fontconfig warning: "/usr/share/fontconfig/conf.avail/05-reset-dirs-sample.conf", line 6: unknown element "reset-dirs"
[11:36:45.872] [info] (buckets-node) ProcessBackend starting...
[11:36:45.872] [info] (buckets-node) ProcessBackend executable: /opt/Buckets/resources/app.asar.unpacked/node_modules/buckets-node/dist/bin/x64/Buckets args: --app-data-dir,/home/ross/.config/Buckets
[11:36:45.932] [info] locale set to: en
[11:36:45.933] [info] number format set: {"thousands":",","decimal":".","decimal_places":2}
[11:36:45.948] [info] (i18n) date format set
[11:36:46.216] [info] (main) Checking for updates...
[11:36:46.257] [info] (core) INFO (bucketsproc) started
[11:36:46.257] [info] (core) INFO (bucketsproc) preset AppData dir: /home/ross/.config/Buckets
[11:36:46.257] [info] (core) INFO (dbpatch) start
[11:36:46.258] [info] (core) DEBUG (dbpatch) existing patches: @["0001-initial", "0002-convert-to-app-relative-paths", "0003-rollback convert-to-app-relative-paths", "0004-update-sharing-service-urls"]
[11:36:46.258] [info] (core) DEBUG (dbpatch) patch 0001-initial already applied
[11:36:46.258] [info] (core) DEBUG (dbpatch) patch 0002-convert-to-app-relative-paths already applied
[11:36:46.258] [info] (core) DEBUG (dbpatch) patch 0003-rollback convert-to-app-relative-paths already applied
[11:36:46.259] [info] (core) DEBUG (dbpatch) patch 0004-update-sharing-service-urls already applied
[11:36:46.259] [info] (core) INFO (dbpatch) end
[11:36:46.259] [info] (core) WARN (sharing) decryption of keypair failed; will make new keypair: Decryption failed: sodium.nim(238, 10) `key.len == crypto_secretbox_KEYBYTES()` 
[11:36:46.259] [info] (core) INFO (sharing) generating new keypair
[11:36:46.259] [info] (core) ERROR (appwide) Encryption failed
[11:36:46.260] [info] (core) ERROR (sharing) encrypting seckey failed: sodium.nim(210, 10) `key.len == crypto_secretbox_KEYBYTES()` 
[11:36:46.260] [info] (core) fatal.nim(54)            sysFatal
[11:36:46.260] [info] (core) Error: unhandled exception: sodium.nim(210, 10) `key.len == crypto_secretbox_KEYBYTES()`  [AssertionDefect]
[11:36:46.261] [info] (buckets-node) ProcessBackend exit 1 null
[11:36:46.262] [error] (core) Error: BucketsLib bin died: 1/null
    at ChildProcess.<anonymous> (/opt/Buckets/resources/app.asar/node_modules/buckets-node/dist/main.js:268:44)
    at ChildProcess.emit (events.js:200:13)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)

[11:36:46.316] [info] (buckets-node) ProcessBackend close 1 null
[11:36:46.691] [info] (main) window opened to file:///opt/Buckets/resources/app.asar/src/wwwroot/misc/wizard.html
[11:36:53.389] [info] (main) saving last_opened_windows []

System details:

Operating System: Manjaro Linux 
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.104.0
Qt Version: 5.15.8
Kernel Version: 6.2.10-1-MANJARO (64-bit)
Graphics Platform: X11
Processors: 4 × Intel® Core™ i5-2520M CPU @ 2.50GHz
Memory: 3.7 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 3000
Manufacturer: LENOVO
Product Name: 4299CH6
System Version: ThinkPad X220 Tablet

This is with 70.2 from the AUR but I also tested 70.4 AppImage and get the same result. I removed the .config directory for Buckets in case there was something there fouling it up. Still get the error.

Happy to provide whatever you might want to try and reproduce.

iffy commented 1 year ago

Looks like I've got this from a fresh install:

Operating System: Manjaro Linux 
KDE Plasma Version: 5.26.5
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Kernel Version: 6.1.19-1-MANJARO (64-bit)
Graphics Platform: X11
Processors: 1 × Intel® Core™ i5-8500B CPU @ 3.00GHz
Memory: 3.8 GiB of RAM
Graphics Processor: llvmpipe
Manufacturer: innotek GmbH
Product Name: VirtualBox
System Version: 1.2

I would guess the difference in working is more likely due to the packages installed or a bug in Buckets or one of its dependencies.

Can someone try this build? https://buckets-builds.sfo3.digitaloceanspaces.com/buckets-v0.70.4-20230414-i838-cryptokeylenwrong-59fe47b/Buckets%20Beta-0.71.0-dev.AppImage It includes a little more logging.

Extarys commented 4 months ago

Both stable and beta worked on Fedora 39. Sadly, I had to format when upgrading to Fedora 40 as the 39>40 upgrade didn't work. With Fedora 40, Buckets doesn't launch, I get this error:

[10:40:00.955] [info] (m.main) 

STARTING v0.74.0

[10:40:00.957] [info] (m.main)  Log level: silly
[10:40:00.957] [info] (m.main)   Log file: /home/jer/.config/Buckets Beta/logs/buckets.log
[10:40:00.957] [info] (m.main) Local date: 2024-05-04
[10:40:00.959] [info] (m.main) Local time: 2024-05-04 10:40:00-04:00
[10:40:00.959] [info] (m.main)   UTC time: 2024-05-04T14:40:00Z
[10:40:00.959] [info] (m.main)   NODE_ENV: undefined
[10:40:00.960] [info] (m.main)         OS: linux 6.8.7-300.fc40.x86_64 x64
[10:40:00.960] [info] (m.main)        pid: 1118775
[10:40:00.960] [info] (m.main) Hardware acceleration: disabled (enable by setting BUCKETS_ENABLE_HARDWARE_ACCELERATION=1)
[10:40:01.208] [info] (m.main) app:ready
[10:40:01.209] [info] (m.buckets-node) ProcessBackend starting...
[10:40:01.209] [info] (m.buckets-node) ProcessBackend executable: /tmp/.mount_gearlefCpYmx/resources/app.asar.unpacked/node_modules/buckets-node/dist/bin/x64/Buckets args: --app-data-dir,/home/jer/.config/Buckets Beta,--log-data-dir,/home/jer/.config/Buckets Beta/logs,backend
[10:40:01.295] [info] (m.app) INFO (bucketsproc) started
[10:40:01.298] [info] (m.app) INFO (bucketsproc) preset AppData dir: /home/jer/.config/Buckets Beta
[10:40:01.298] [info] (m.app) INFO (bucketsproc) preset LogData dir: /home/jer/.config/Buckets Beta/logs
[10:40:01.304] [info] (m.app) INFO (dbpatch) start
[10:40:01.340] [info] (m.app) INFO (dbpatch) applying patch: 0001-initial
[10:40:01.369] [info] (m.app) INFO (dbpatch) applying patch: 0002-convert-to-app-relative-paths
[10:40:01.394] [info] (m.app) INFO (dbpatch) applying patch: 0003-rollback convert-to-app-relative-paths
[10:40:01.419] [info] (m.app) INFO (dbpatch) applying patch: 0004-update-sharing-service-urls
[10:40:01.445] [info] (m.app) INFO (dbpatch) applying patch: 0005-ServiceURI extract credentials
[10:40:01.479] [info] (m.app) INFO (dbpatch) applying patch: 0006-+appwide_setting
[10:40:01.509] [info] (m.app) INFO (dbpatch) applying patch: 0007-shfolder
[10:40:01.537] [info] (m.app) INFO (dbpatch) applying patch: 0008-sharing_conns_to_make.url to params
[10:40:01.567] [info] (m.app) INFO (dbpatch) applying patch: 0009-normalize sharing_conns_to_make.params
[10:40:01.592] [info] (m.app) INFO (dbpatch) vacuum
[10:40:01.620] [info] (m.app) INFO (dbpatch) end
[10:40:01.626] [info] (m.app) INFO (sharing) generating new signing keypair...
[10:40:01.634] [info] (m.app) ERROR (appwide) Encryption failed
[10:40:01.634] [info] (m.app) ERROR (sharing) encrypting seckey failed: sodium.nim(210, 10) `key.len == crypto_secretbox_KEYBYTES()` 
[10:40:01.634] [info] (m.app) fatal.nim(54)            sysFatal
[10:40:01.634] [info] (m.app) Error: unhandled exception: sodium.nim(210, 10) `key.len == crypto_secretbox_KEYBYTES()`  [AssertionDefect]
[10:40:01.636] [info] (m.buckets-node) ProcessBackend exit 1 null
[10:40:01.636] [error] (m.app) Error: BucketsLib bin died: 1/null
    at ChildProcess.<anonymous> (/tmp/.mount_gearlefCpYmx/resources/app.asar/node_modules/buckets-node/dist/main.js:292:44)
    at ChildProcess.emit (node:events:513:28)
    at Process.onexit (node:internal/child_process:291:12)

[10:40:01.653] [info] (m.buckets-node) ProcessBackend close 1 null

v0.74

[10:36:31.564] [info] (m.main) 

STARTING v0.74.0

[10:36:31.567] [info] (m.main)  Log level: silly
[10:36:31.567] [info] (m.main)   Log file: /home/jer/.config/Buckets Beta/logs/buckets.log
[10:36:31.567] [info] (m.main) Local date: 2024-05-04
[10:36:31.569] [info] (m.main) Local time: 2024-05-04 10:36:31-04:00
[10:36:31.569] [info] (m.main)   UTC time: 2024-05-04T14:36:31Z
[10:36:31.569] [info] (m.main)   NODE_ENV: undefined
[10:36:31.569] [info] (m.main)         OS: linux 6.8.7-300.fc40.x86_64 x64
[10:36:31.569] [info] (m.main)        pid: 1103831
[10:36:31.569] [info] (m.main) Hardware acceleration: disabled (enable by setting BUCKETS_ENABLE_HARDWARE_ACCELERATION=1)
[10:36:31.763] [info] (m.main) app:ready
[10:36:31.763] [info] (m.buckets-node) ProcessBackend starting...
[10:36:31.763] [info] (m.buckets-node) ProcessBackend executable: /tmp/.mount_gearleuVm0C9/resources/app.asar.unpacked/node_modules/buckets-node/dist/bin/x64/Buckets args: --app-data-dir,/home/jer/.config/Buckets Beta,--log-data-dir,/home/jer/.config/Buckets Beta/logs,backend
[10:36:31.834] [info] (m.app) INFO (bucketsproc) started
[10:36:31.835] [info] (m.app) INFO (bucketsproc) preset AppData dir: /home/jer/.config/Buckets Beta
[10:36:31.835] [info] (m.app) INFO (bucketsproc) preset LogData dir: /home/jer/.config/Buckets Beta/logs
[10:36:31.841] [info] (m.app) INFO (dbpatch) start
[10:36:31.844] [info] (m.app) DEBUG (dbpatch) existing patches: @["0001-initial", "0002-convert-to-app-relative-paths", "0003-rollback convert-to-app-relative-paths", "0004-update-sharing-service-urls", "0005-ServiceURI extract credentials", "0006-+appwide_setting", "0007-shfolder", "0008-sharing_conns_to_make.url to params", "0009-normalize sharing_conns_to_make.params"]
[10:36:31.844] [info] (m.app) INFO (dbpatch) end
[10:36:31.848] [info] (m.app) INFO (sharing) generating new signing keypair...
[10:36:31.851] [info] (m.app) ERROR (appwide) Encryption failed
[10:36:31.852] [info] (m.app) ERROR (sharing) encrypting seckey failed: sodium.nim(210, 10) `key.len == crypto_secretbox_KEYBYTES()` 
[10:36:31.852] [info] (m.app) fatal.nim(54)            sysFatal
[10:36:31.852] [info] (m.app) Error: unhandled exception: sodium.nim(210, 10) `key.len == crypto_secretbox_KEYBYTES()`  [AssertionDefect]
[10:36:31.854] [info] (m.buckets-node) ProcessBackend exit 1 null
[10:36:31.855] [error] (m.app) Error: BucketsLib bin died: 1/null
    at ChildProcess.<anonymous> (/tmp/.mount_gearleuVm0C9/resources/app.asar/node_modules/buckets-node/dist/main.js:292:44)
    at ChildProcess.emit (node:events:513:28)
    at Process.onexit (node:internal/child_process:291:12)

[10:36:31.869] [info] (m.buckets-node) ProcessBackend close 1 null
[10:36:33.415] [error] (m.main) uncaughtException name=undefined message=Error: Attempting to use sss() before setting the locale: ->File<- stack=Error: Attempting to use sss() before setting the locale: ->File<-
    at TranslationContext.sss (/tmp/.mount_gearleuVm0C9/resources/app.asar/node_modules/@iffycan/i18n/dist/i18n.js:157:27)
    at updateMenu (/tmp/.mount_gearleuVm0C9/resources/app.asar/src/mainprocess/menu.js:29:35)
[10:36:33.614] [info] (m.main) window opened to file:///tmp/.mount_gearleuVm0C9/resources/app.asar/src/wwwroot/misc/reportbug.html?template=&nittygritty=Version%3A%200.74.0%20(node%3A%20v18.16.1)%0AOS%3A%20linux%206.8.7-300.fc40.x86_64%20x64%0ALang%3A%20undefined%20undefined%20%0ALoc%3A%20undefined%0A&email= false
[10:36:36.830] [error] (m.main) uncaughtException name=undefined message=Error: Attempting to use sss() before setting the locale: ->File<- stack=Error: Attempting to use sss() before setting the locale: ->File<-
    at TranslationContext.sss (/tmp/.mount_gearleuVm0C9/resources/app.asar/node_modules/@iffycan/i18n/dist/i18n.js:157:27)
    at updateMenu (/tmp/.mount_gearleuVm0C9/resources/app.asar/src/mainprocess/menu.js:29:35)
[10:36:38.185] [error] (m.main) uncaughtException name=undefined message=Error: Attempting to use sss() before setting the locale: ->File<- stack=Error: Attempting to use sss() before setting the locale: ->File<-
    at TranslationContext.sss (/tmp/.mount_gearleuVm0C9/resources/app.asar/node_modules/@iffycan/i18n/dist/i18n.js:157:27)
    at updateMenu (/tmp/.mount_gearleuVm0C9/resources/app.asar/src/mainprocess/menu.js:29:35)
[10:36:39.737] [error] (m.main) uncaughtException name=undefined message=Error: Attempting to use sss() before setting the locale: ->File<- stack=Error: Attempting to use sss() before setting the locale: ->File<-
    at TranslationContext.sss (/tmp/.mount_gearleuVm0C9/resources/app.asar/node_modules/@iffycan/i18n/dist/i18n.js:157:27)
    at updateMenu (/tmp/.mount_gearleuVm0C9/resources/app.asar/src/mainprocess/menu.js:29:35)
[10:36:41.049] [error] (m.main) uncaughtException name=undefined message=Error: Attempting to use sss() before setting the locale: ->File<- stack=Error: Attempting to use sss() before setting the locale: ->File<-
    at TranslationContext.sss (/tmp/.mount_gearleuVm0C9/resources/app.asar/node_modules/@iffycan/i18n/dist/i18n.js:157:27)
    at updateMenu (/tmp/.mount_gearleuVm0C9/resources/app.asar/src/mainprocess/menu.js:29:35)
[10:36:42.285] [error] (m.main) uncaughtException name=undefined message=Error: Attempting to use sss() before setting the locale: ->File<- stack=Error: Attempting to use sss() before setting the locale: ->File<-
    at TranslationContext.sss (/tmp/.mount_gearleuVm0C9/resources/app.asar/node_modules/@iffycan/i18n/dist/i18n.js:157:27)
    at updateMenu (/tmp/.mount_gearleuVm0C9/resources/app.asar/src/mainprocess/menu.js:29:35)
[10:36:43.034] [error] (m.main) uncaughtException name=undefined message=Error: Attempting to use sss() before setting the locale: ->File<- stack=Error: Attempting to use sss() before setting the locale: ->File<-
    at TranslationContext.sss (/tmp/.mount_gearleuVm0C9/resources/app.asar/node_modules/@iffycan/i18n/dist/i18n.js:157:27)
    at updateMenu (/tmp/.mount_gearleuVm0C9/resources/app.asar/src/mainprocess/menu.js:29:35)
[10:36:43.046] [error] (m.main) uncaughtException name=undefined message=Error: Attempting to use sss() before setting the locale: ->File<- stack=Error: Attempting to use sss() before setting the locale: ->File<-
    at TranslationContext.sss (/tmp/.mount_gearleuVm0C9/resources/app.asar/node_modules/@iffycan/i18n/dist/i18n.js:157:27)
    at updateMenu (/tmp/.mount_gearleuVm0C9/resources/app.asar/src/mainprocess/menu.js:29:35)
[10:36:43.103] [info] (m.main) window opened to file:///tmp/.mount_gearleuVm0C9/resources/app.asar/src/wwwroot/misc/reportbug.html?template=&nittygritty=Version%3A%200.74.0%20(node%3A%20v18.16.1)%0AOS%3A%20linux%206.8.7-300.fc40.x86_64%20x64%0ALang%3A%20undefined%20undefined%20%0ALoc%3A%20file%3A%2F%2F%2Ftmp%2F.mount_gearleuVm0C9%2Fresources%2Fapp.asar%2Fsrc%2Fwwwroot%2Fmisc%2Freportbug.html%3Ftemplate%3D%26nittygritty%3DVersion%253A%25200.74.0%2520(node%253A%2520v18.16.1)%250AOS%253A%2520linux%25206.8.7-300.fc40.x86_64%2520x64%250ALang%253A%2520undefined%2520undefined%2520%250ALoc%253A%2520undefined%250A%26email%3D%0AError%3A%20Attempting%20to%20use%20sss()%20before%20setting%20the%20locale%3A%20-%3EFile%3C-%0A%20%20%20%20at%20TranslationContext.sss%20(%2Ftmp%2F.mount_gearleuVm0C9%2Fresources%2Fapp.asar%2Fnode_modules%2F%40iffycan%2Fi18n%2Fdist%2Fi18n.js%3A157%3A27)%0A%20%20%20%20at%20updateMenu%20(%2Ftmp%2F.mount_gearleuVm0C9%2Fresources%2Fapp.asar%2Fsrc%2Fmainprocess%2Fmenu.js%3A29%3A35)&email= false
[10:36:45.129] [error] (m.main) uncaughtException name=undefined message=Error: Attempting to use sss() before setting the locale: ->File<- stack=Error: Attempting to use sss() before setting the locale: ->File<-
    at TranslationContext.sss (/tmp/.mount_gearleuVm0C9/resources/app.asar/node_modules/@iffycan/i18n/dist/i18n.js:157:27)
    at updateMenu (/tmp/.mount_gearleuVm0C9/resources/app.asar/src/mainprocess/menu.js:29:35)

image

No other window is visible.

When I try to report the buig in-app, a new error occur. (See above beta logs)

If I find anything useful, I'll report back.