Standard Notes electron app fails trying to get userData

I’m trying to use the standardnotes desktop app on the 2024-05-15 12:06:01 generation of the 23.11 channel (so app version 3.181.23). On startup it fails with the following error:

app threw an error during load
Error: Failed to get ‘userData’ path
at get userDataDir [as userDataDir] (/nix/store/071qfwp63ymdgf9bz8dvnllpi7qhlxiw-standardnotes-3.181.23/share/standardnotes/app.asar/dist/index.js:2:144961)
at new mi (/nix/store/071qfwp63ymdgf9bz8dvnllpi7qhlxiw-standardnotes-3.181.23/share/standardnotes/app.asar/dist/index.js:2:204264)
at /nix/store/071qfwp63ymdgf9bz8dvnllpi7qhlxiw-standardnotes-3.181.23/share/standardnotes/app.asar/dist/index.js:2:286229
at 354 (/nix/store/071qfwp63ymdgf9bz8dvnllpi7qhlxiw-standardnotes-3.181.23/share/standardnotes/app.asar/dist/index.js:2:287331)
at n (/nix/store/071qfwp63ymdgf9bz8dvnllpi7qhlxiw-standardnotes-3.181.23/share/standardnotes/app.asar/dist/index.js:2:832666)
at /nix/store/071qfwp63ymdgf9bz8dvnllpi7qhlxiw-standardnotes-3.181.23/share/standardnotes/app.asar/dist/index.js:2:833177
at Object. (/nix/store/071qfwp63ymdgf9bz8dvnllpi7qhlxiw-standardnotes-3.181.23/share/standardnotes/app.asar/dist/index.js:2:833189)
at Module._compile (node:internal/modules/cjs/loader:1271:14)
at Object…js (node:internal/modules/cjs/loader:1326:10)
at Module.load (node:internal/modules/cjs/loader:1126:32)
Uncaught exception Error: Failed to get ‘userData’ path
at get userDataDir [as userDataDir] (/nix/store/071qfwp63ymdgf9bz8dvnllpi7qhlxiw-standardnotes-3.181.23/share/standardnotes/app.asar/dist/index.js:2:144961)
at new mi (/nix/store/071qfwp63ymdgf9bz8dvnllpi7qhlxiw-standardnotes-3.181.23/share/standardnotes/app.asar/dist/index.js:2:204264)
at /nix/store/071qfwp63ymdgf9bz8dvnllpi7qhlxiw-standardnotes-3.181.23/share/standardnotes/app.asar/dist/index.js:2:286229
at 354 (/nix/store/071qfwp63ymdgf9bz8dvnllpi7qhlxiw-standardnotes-3.181.23/share/standardnotes/app.asar/dist/index.js:2:287331)
at n (/nix/store/071qfwp63ymdgf9bz8dvnllpi7qhlxiw-standardnotes-3.181.23/share/standardnotes/app.asar/dist/index.js:2:832666)
at /nix/store/071qfwp63ymdgf9bz8dvnllpi7qhlxiw-standardnotes-3.181.23/share/standardnotes/app.asar/dist/index.js:2:833177
at Object. (/nix/store/071qfwp63ymdgf9bz8dvnllpi7qhlxiw-standardnotes-3.181.23/share/standardnotes/app.asar/dist/index.js:2:833189)
at Module._compile (node:internal/modules/cjs/loader:1271:14)
at Object…js (node:internal/modules/cjs/loader:1326:10)
at Module.load (node:internal/modules/cjs/loader:1126:32)
Trace/breakpoint trap (core dumped)

My best guess is it crashes because this is an electron app that expects to be able to write to the userdata directory ~/.config, which on nixOS requires root permissions. Is this a common problem with a common workaround? Or is my guess totally off and some other issue is afoot? I’m using the stock Sway DE.

I am on unstable and I used to get something similar, but after a few updates I now get:

05:19:11.029 › APPIMAGE env is not defined, current application is not an AppImage
extServer: Server started at http://127.0.0.1:45653
05:19:12.001 › APPIMAGE env is not defined, current application is not an AppImage
[145905:0518/051915.082601:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times!

Not sure what the issue is and I haven’t got time to look at the moment, but perhaps it is not writing to ~/.config?