You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After restarting the silverbullet service, it crashes. The first start works when there is no data in /var/lib/silverbullet, but as soon as that gets generated, trying to start silverbullet again fails.
Steps To Reproduce
Steps to reproduce the behavior:
Go into your fork of nixpkgs and apply this patch to the existing nixos test:
Using KV as a database backend (/home/test/silverbullet/.silverbullet.db).
Going to start SilverBullet binding to localhost:3001
Using local disk as a storage backend: /home/test/silverbullet
Unhandled rejection: PromiseRejectionEvent {
bubbles: false,
cancelable: true,
composed: false,
currentTarget: Window {},
defaultPrevented: false,
eventPhase: 2,
srcElement: null,
target: Window {},
returnValue: true,
timeStamp: 0,
type: "unhandledrejection",
promise: Promise {
<rejected> ReferenceError: window is not defined
at IV.hashSHA256 (file:///nix/store/w55cjcm10y9qidjxcjd5kq6x1mj9bh76-silverbullet-0.9.4/lib/silverbullet.js:87:33860)
at IV.init (file:///nix/store/w55cjcm10y9qidjxcjd5kq6x1mj9bh76-silverbullet-0.9.4/lib/silverbullet.js:87:33272)
at eventLoopTick (ext:core/01_core.js:175:7)
at async zX.init (file:///nix/store/w55cjcm10y9qidjxcjd5kq6x1mj9bh76-silverbullet-0.9.4/lib/silverbullet.js:2384:18073)
at async rX.start (file:///nix/store/w55cjcm10y9qidjxcjd5kq6x1mj9bh76-silverbullet-0.9.4/lib/silverbullet.js:2385:7437)
at async F.gj [as actionHandler] (file:///nix/store/w55cjcm10y9qidjxcjd5kq6x1mj9bh76-silverbullet-0.9.4/lib/silverbullet.js:2385:13469244)
at async F.execute (file:///nix/store/w55cjcm10y9qidjxcjd5kq6x1mj9bh76-silverbullet-0.9.4/lib/silverbullet.js:24:8601)
at async F.parseCommand (file:///nix/store/w55cjcm10y9qidjxcjd5kq6x1mj9bh76-silverbullet-0.9.4/lib/silverbullet.js:24:6314)
at async file:///nix/store/w55cjcm10y9qidjxcjd5kq6x1mj9bh76-silverbullet-0.9.4/lib/silverbullet.js:2418:6541
},
reason: ReferenceError: window is not defined
at IV.hashSHA256 (file:///nix/store/w55cjcm10y9qidjxcjd5kq6x1mj9bh76-silverbullet-0.9.4/lib/silverbullet.js:87:33860)
at IV.init (file:///nix/store/w55cjcm10y9qidjxcjd5kq6x1mj9bh76-silverbullet-0.9.4/lib/silverbullet.js:87:33272)
at eventLoopTick (ext:core/01_core.js:175:7)
at async zX.init (file:///nix/store/w55cjcm10y9qidjxcjd5kq6x1mj9bh76-silverbullet-0.9.4/lib/silverbullet.js:2384:18073)
at async rX.start (file:///nix/store/w55cjcm10y9qidjxcjd5kq6x1mj9bh76-silverbullet-0.9.4/lib/silverbullet.js:2385:7437)
at async F.gj [as actionHandler] (file:///nix/store/w55cjcm10y9qidjxcjd5kq6x1mj9bh76-silverbullet-0.9.4/lib/silverbullet.js:2385:13469244)
at async F.execute (file:///nix/store/w55cjcm10y9qidjxcjd5kq6x1mj9bh76-silverbullet-0.9.4/lib/silverbullet.js:24:8601)
at async F.parseCommand (file:///nix/store/w55cjcm10y9qidjxcjd5kq6x1mj9bh76-silverbullet-0.9.4/lib/silverbullet.js:24:6314)
at async file:///nix/store/w55cjcm10y9qidjxcjd5kq6x1mj9bh76-silverbullet-0.9.4/lib/silverbullet.js:2418:6541
}
Expected behavior
Test should pass.
Additional context
I noticed this issue when trying to set up silverbullet on our raspberry pi 4. Another thing is this issue doesn't happen without setting SB_USER and SB_AUTH_TOKEN environment variables.
This commit still has deno_1 package: dfce2bc
If I replace deno for deno_1 at pkgs/by-name/si/silverbullet/package.nix to pin deno 1.46.x it works, with deno 2.x it fails (after the first run has created the database):
I assume downgrading it to deno_1 in nixpkgs doesn't help much because it will be dropped soon. So we could either switch to that less stable edge version or wait for a new release depending on how far is that.
Describe the bug
After restarting the silverbullet service, it crashes. The first start works when there is no data in
/var/lib/silverbullet
, but as soon as that gets generated, trying to start silverbullet again fails.Steps To Reproduce
Steps to reproduce the behavior:
nix build .#nixosTests.silverbullet
Logs
silverbullet.service log after restart (trimmed)
Expected behavior
Test should pass.
Additional context
I noticed this issue when trying to set up silverbullet on our raspberry pi 4. Another thing is this issue doesn't happen without setting
SB_USER
andSB_AUTH_TOKEN
environment variables.Notify maintainers
cc @aorith
Metadata
Add a 👍 reaction to issues you find important.
The text was updated successfully, but these errors were encountered: