beakerbrowser / beaker

An experimental peer-to-peer Web browser
https://beakerbrowser.com/
MIT License
6.75k stars 545 forks source link

Beaker won’t start with non-default Hyperspace storage #1893

Open da2x opened 3 years ago

da2x commented 3 years ago

To Reproduce

  1. Run Beaker once and get set up
  2. Quit Beaker (don’t let it run in the background)
  3. Launch hyperspace --storage /any-but/the-default/storage
  4. Start Beaker

Expected Behavior Beaker should start and use the storage pool provided by the Hyperspace daemon.

Actual Behavior Beaker gets stuck on the initializing screen with the following exception:

Unhandled Rejection at: Promise [object Promise] reason: Error: Block not available from peers Error: Block not available from peers at Object.decode (/tmp/.mount_BeakerHes6VO/resources/app/node_modules/@hyperspace/rpc/index.js:11:17) at RPC._onmessage (/tmp/.mount_BeakerHes6VO/resources/app/node_modules/arpeecee/index.js:113:33) at Parser._nextState (/tmp/.mount_BeakerHes6VO/resources/app/node_modules/arpeecee/parser.js:127:14) at Parser._readMessage (/tmp/.mount_BeakerHes6VO/resources/app/node_modules/arpeecee/parser.js:54:19) at Parser.recv (/tmp/.mount_BeakerHes6VO/resources/app/node_modules/arpeecee/parser.js:35:44) at RPC._write (/tmp/.mount_BeakerHes6VO/resources/app/node_modules/arpeecee/index.js:170:22) at WritableState.update (/tmp/.mount_BeakerHes6VO/resources/app/node_modules/streamx/index.js:167:14) at updateWriteNT (/tmp/.mount_BeakerHes6VO/resources/app/node_modules/streamx/index.js:478:6) at processTicksAndRejections (internal/process/task_queues.js:83:21) [error]
{ "category": "browser", "message": "Unhandled Rejection at: Promise [object Promise] reason: Error: Block not available from peers Error: Block not available from peers\n at Object.decode (/tmp/.mount_BeakerHes6VO/resources/app/node_modules/@hyperspace/rpc/index.js:11:17)\n at RPC._onmessage (/tmp/.mount_BeakerHes6VO/resources/app/node_modules/arpeecee/index.js:113:33)\n at Parser._nextState (/tmp/.mount_BeakerHes6VO/resources/app/node_modules/arpeecee/parser.js:127:14)\n at Parser._readMessage (/tmp/.mount_BeakerHes6VO/resources/app/node_modules/arpeecee/parser.js:54:19)\n at Parser.recv (/tmp/.mount_BeakerHes6VO/resources/app/node_modules/arpeecee/parser.js:35:44)\n at RPC._write (/tmp/.mount_BeakerHes6VO/resources/app/node_modules/arpeecee/index.js:170:22)\n at WritableState.update (/tmp/.mount_BeakerHes6VO/resources/app/node_modules/streamx/index.js:167:14)\n at updateWriteNT (/tmp/.mount_BeakerHes6VO/resources/app/node_modules/streamx/index.js:478:6)\n at processTicksAndRejections (internal/process/task_queues.js:83:21)", "level": "error", "timestamp": "2021-01-11T11:15:14.251Z", "type": "data", "target": {} }

Environment

Additional Context I’m trying to run Beaker on computer A with the Hyperdrives creates on computer B.

I’m guessing that Beaker is looking for the profile’s “private drive” by fails to launch when it can’t find it.'

This will cause issues for people when they’ve backed up ~/.hyperspace/, but install and launch Beaker once before they’ve managed to restore their backups on a new computer.

Work-around Quit Beaker, delete your Beaker profile directory, and restart it.

pfrazee commented 3 years ago

Yep you've identified the issue. If you can start Beaker with an env var set, you can work around this. See https://github.com/beakerbrowser/beaker#env-vars. You'll want to set BEAKER_USER_DATA_PATH to somewhere for your alternative data dir