ChainSafe / filsnap

MetaMask snap for interacting with Filecoin dapps.
https://filsnap.chainsafe.io
Apache License 2.0
107 stars 41 forks source link

Failed to fetch Snap "npm:@chainsafe/filsnap": Invalid Snap manifest: manifest shasum does not match computed shasum.. #258

Open vorburger opened 1 year ago

vorburger commented 1 year ago

I am trying to install it from https://filsnap.chainsafe.io in Brave Version 1.52.117 Chromium: 114.0.5735.90 (Official Build) (64-bit) on (Fedora Workstation) Linux and it asks Permission request - Allow this site to: Connect to @chainsafe/filsnap. where I click Connect which causes Request failed - Failed to fetch Snap "npm:@chainsafe/filsnap": Invalid Snap manifest: manifest shasum does not match computed shasum..

filsnap.chainsafe.io-1685909021882.log is full log I have exported from the Developers Tools.

vorburger commented 1 year ago

My current MetaMask Flask version (on Brave) is 10.31.0-flask.0.

FYI this (same) happens even I try it in Chromium instead of Brave.

Even in Firefox it's doing this, for me. (If it works for others, then... interesting - very.)

I haven not tried with Chrome (but doubt it's any better).

vorburger commented 1 year ago

I don't understand much about Metamask Snaps yet, so I was a little curious about this, and briefly dug into it:

So this means that the shasum here, which is currently, as of 428fc47428099f1134fe7c0c1d3be4b71e6458fb, from March 29, which was 3 months ago, set to Z7lh6iD1yjfKES/WutUyxepg5Dgp8Xjo3kivsz9vpwc=.

Given that (currently) the last commit is the aforementioned, so you didn't just forget to update that, I can only suspect that "the other end" changed, and Flask broke this some time since you released? Your current HEAD~4 was something about fix: flask1.25 in #246 ... @irubido @BeroBurny perhaps another update needed for current Flask 10.31 ?

Perhaps this is caused by https://github.com/MetaMask/snaps/issues/1304 ...

I'm going to try to contribute a fix... can I get some... FIL... something... 🥇 appreciation 😏 for this?

vorburger commented 1 year ago

I have been able to create an update for the shasum by doing the following (see #259 re. Legacy OpenSSL):

$ NODE_OPTIONS=--openssl-legacy-provider yarn build
$ yarn build:snap:postprocess

and proposed this as #260.

mpetrunic commented 1 year ago

I have been able to create an update for the shasum by doing the following (see #259 re. Legacy OpenSSL):

$ NODE_OPTIONS=--openssl-legacy-provider yarn build
$ yarn build:snap:postprocess

and proposed this as #260.

You should run yarn build which will build snap first and then calculate sha.

As for release, it's probably due to breaking changes in flask. One note here, after release there is usually difference of sha because release-please bumps version before releasing and recalculates sha but doesn't commit to master^^