Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go-ipfs migration 0.7.0→0.9.0 not working in Brave Stable on macOS #16913

Closed
lidel opened this issue Jul 12, 2021 · 6 comments · Fixed by brave/brave-core-crx-packager#237 or brave/brave-core#9431

Comments

@lidel
Copy link

lidel commented Jul 12, 2021

Description

Users who had repo created with go-ipfs 0.7.0 are no longer able to start their node and are forced to use public gateway for resolving IPFS addresses.

Steps to Reproduce

  1. have repo produced by go-ipfs 0.7.0
  2. receive update to 0.9.0
  3. restart browser or IPFS node
  4. try using IPFS

Or artificial:

  1. activate ipfs in brave
  2. remove brave_ipfs directory (IPFS_PATH used by Brave)
  3. replace go-ipfs binary with 0.7.0 (store original 0.9.0 for later)
    (go-ipfs binary is in a directory of one of extensions, they have random names like oecghfpdmkjlhnfpmmjegjacfimsomething the binary is named /Users/user/Library/Application\ Support/BraveSoftware/Brave-Browser/{extension-id}/{version}/go-ipfs_v0.9.0_darwin-amd64 – keep the name, just replace it with older verison)
  4. start ipfs node again (a repo with 0.7.0 schema will be created)
  5. stop brave
  6. restore go-ipfs binary 0.9.0
  7. start brave and try using IPFS

Actual result:

Node fails to start. Clicking on "Start" on diagnostic screen starts the daemon without migrations enabled, producing an error:

Screenshot 2021-07-12 at 23 00 27

Expected result:

Node starts as expected.

Reproduces how often:

Every time?

Brave version (brave://version info)

Brave 1.26.74 Chromium: 91.0.4472.124 (Official Build) (x86_64 translated)
Revision 7345a6d1bfcaff81162a957e9b7d52649fe2ac38-refs/branch-heads/4472_114@{#6}
OS macOS Version 11.2.3 (Build 20D91) JavaScript V8 9.1.269.36 User agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 

Version/Channel Information:

@lidel
Copy link
Author

lidel commented Jul 13, 2021

I did some poking, and it will take time before those binaries are notarized upstream at dist.ipfs.io (requires infra changes on our end + new release of go-ipfs – so ~ETA is week or two if lucky), and then we need a new release of go-ipfs to fetch new signd and notarized binaries.

I think the "quick fix" would be to use Brave notarization setup and ship notarized fs-repo-10-to-11 together with already notarized go-ipfs binary (double the size of IPFS component, but will unbrick older macOS users), until dist.ipfs.io it signed and notarized itself. When fs-repo-10-to-11 is on PATH, go-ipfs will use it, instead of fetching unsigned version.

@spylogsster @bbondy is the "quick fix" acceptable?

@bbondy
Copy link
Member

bbondy commented Jul 13, 2021

sounds good to me

@spylogsster spylogsster self-assigned this Jul 13, 2021
@bbondy
Copy link
Member

bbondy commented Jul 13, 2021

@lidel Since everyone is already updated though. Can I ask if having these binaries in the component directory will help them get unbroken?

@lidel
Copy link
Author

lidel commented Jul 13, 2021

@bbondy yes. go-ipfs tries to run migration every time it starts, so adding a working migration binary to PATH will enable existing users to finish migration and restore IPFS node to be fully operational.

Only additional thing we need is to upstream migration fix from Nightly (always run daemon with --migrate=true, which seems to be missing in current Stable)

@spylogsster spylogsster added this to the 1.28.x - Nightly milestone Jul 14, 2021
@stephendonner stephendonner added the QA/In-Progress Indicates that QA is currently in progress for that particular issue label Jul 26, 2021
@stephendonner
Copy link

Verified PASSED using the following steps with build

Brave 1.28.91 Chromium: 92.0.4515.107 (Official Build) beta (x86_64)
Revision 87a818b10553a07434ea9e2b6dccf3cbe7895134-refs/branch-heads/4515@{#1634}
OS macOS Version 11.5 (Build 20G71)

Steps:

  1. new profile
  2. launched Brave
  3. opened brave://ipfs and clicked Install and start
  4. downloaded 0.7.0 from https://github.com/ipfs/go-ipfs/releases/download/v0.7.0/go-ipfs_v0.7.0_darwin-amd64.tar.gz
  5. shut down Brave
  6. deleted brave_ipfs from my profile directory
  7. untarred and renamed the ipfs binary to go-ipfs_v0.9.0_darwin-amd64
  8. dropped that binary into nljcddpbnaianmglkpkneakjaapinabi -> 1.0.5
  9. relaunched Brave
  10. loaded brave://ipfs and clicked on Start
  11. shut down Brave
  12. restored the originally installed 0.9.0 go-ipfs binary and deleted the 0.7.0 one (which we renamed) from step 4
  13. relaunched Brave
  14. clicked on Start at brave://ipfs

Confirmed the IPFS local node started, with version 0.9.0 used 👍

example example example example example
Screen Shot 2021-07-26 at 12 41 12 PM Screen Shot 2021-07-26 at 12 43 05 PM Screen Shot 2021-07-26 at 12 43 30 PM Screen Shot 2021-07-26 at 12 43 57 PM Screen Shot 2021-07-26 at 12 44 12 PM

@stephendonner stephendonner added QA Pass-macOS and removed QA/In-Progress Indicates that QA is currently in progress for that particular issue labels Jul 26, 2021
@GwynethLlewelyn
Copy link

GwynethLlewelyn commented Sep 19, 2021

Great! Now please do the same for nljcddpbnaianmglkpkneakjaapinabi/1.0.6 — we're getting the dreadful “fs-repo-10-to-11” cannot be opened error message again. See https://community.brave.com/t/fs-repo-10-to-11-cannot-be-opened-error-message/271783/7 — the issue appears to be the lack of notarization, same as before with 1.0.5.

Thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment