Silverbullet update (edge) through deno not working

1st time i see this error when trying to upgrade silverbullet.
Any ideas?

>silverbullet upgrade
Now going to attempt an upgrade...
error: Integrity check failed for remote specifier. The source code is invalid, as it does not match the expected hash in the lock file.

  Specifier: https://edge.silverbullet.md/silverbullet.js
  Actual: e8d58388a1ffa66ef97028669e04bf1035f10463fc87989037ea3bf9e8fc09c1
  Expected: 54c3931273adc930cd520940285fa83b4096be5f56e4aa236e4e4bee2a8bda1b

This could be caused by:
  * the lock file may be corrupt
  * the source itself may be corrupt

Use the --lock-write flag to regenerate the lockfile or --reload to reload the source code from the server.
Something went wrong there...

I guess an easy fix is to delete the silverbullet binary and download it again, but wondering if there is a better way to fix this, in case someone experiences this issue in the future

This is really strange, what lock file? There is no lock file… or do you have one somewhere in your cache somewhere? I think it should be called deno.lock.

I honestly had no idea what it was telling me about, because i could not find anything.

In my ~/.deno/bin/ folder i only had the silverbullet binary.

I deleted it and download it again with deno and then it worked again.

But i was super confused when the error appeared as I didn’t know how I should have proceeded.

Let me know if the next upgrade succeeds again.

I just got it again this morning:

>silverbullet upgrade
Now going to attempt an upgrade...
error: Integrity check failed for remote specifier. The source code is invalid, as it does not match the expected hash in the lock file.

  Specifier: https://get.silverbullet.md/
  Actual: 6a87ced48063c5ec3daf6842d6e1322d8499ad55281a8e18ee280a6dac6cd86d
  Expected: 1211cfcac962462d5bbffb244b8fa58d05baa85b228e64aea75fbbfdf55f15d8

This could be caused by:
  * the lock file may be corrupt
  * the source itself may be corrupt

Use the --lock-write flag to regenerate the lockfile or --reload to reload the source code from the server.
Something went wrong there...

It seems there is something not working when installing through deno and trying to upgrade

❯ rm ~/.deno/bin/silverbullet
rm: remove regular file '/home/user/.deno/bin/silverbullet'? y

 ❯ deno install -f --name silverbullet  --unstable-kv --unstable-worker-options -A https://get.silverbullet.md
⚠️ `deno install` behavior will change in Deno 2. To preserve the current behavior use the `-g` or `--global` flag.
✅ Successfully installed silverbullet
/home/user/.deno/bin/silverbullet

❯ silverbullet upgrade
Now going to attempt an upgrade...
error: Integrity check failed for remote specifier. The source code is invalid, as it does not match the expected hash in the lock file.

  Specifier: https://get.silverbullet.md/
  Actual: 6a87ced48063c5ec3daf6842d6e1322d8499ad55281a8e18ee280a6dac6cd86d
  Expected: 1211cfcac962462d5bbffb244b8fa58d05baa85b228e64aea75fbbfdf55f15d8

This could be caused by:
  * the lock file may be corrupt
  * the source itself may be corrupt

Use the --lock-write flag to regenerate the lockfile or --reload to reload the source code from the server.
Something went wrong there...

I really do not know where it’s finding the lock file… Ok, what I can do is simply disable the check, it looks like there’s a —no-check option, maybe I just add that…

I’ve tried to address this here: Deno upgrade and attempt to fix upgrade issues · silverbulletmd/silverbullet@d54c400 · GitHub

Basically I disabled lock file checking, it’s kind of pointless anyway.

Thanks.

It works now:

❯ deno install -f --name silverbullet  --lock-write --unstable-kv --unstable-worker-options --no-config --reload -A https://edge.silverbullet.md/silverbullet.js
⚠️ `deno install` behavior will change in Deno 2. To preserve the current behavior use the `-g` or `--global` flag.
✅ Successfully installed silverbullet
/home/user/.deno/bin/silverbullet

❯ silverbullet upgrade
Now going to attempt an upgrade...
So, that's done. Now let's see if this actually did anything...
Nope. I hate to tell you this, but it looks like we're still running 0.8.1. This was a bit of a futile exercise. Let's try again soon some time.
1 Like