Beaker: 500 IPFS Daemon not yet ready

Created on 28 Aug 2016  路  10Comments  路  Source: beakerbrowser/beaker

I can't load any IPFS websites using Beaker 0.2.0. I always see the following error:

500 IPFS Daemon not yet ready. Try again in a few seconds.

And I get the same error when I try to start the IPFS daemon myself.

I'm using OS X 10.11.6. I also tried on another iMac (same operating system) and got the same error.

Does anyone else have a similar issue when using the OS X binary for Beaker 0.2.0?

bug

All 10 comments

In the settings page of Beaker, it shows the path to your data directory. In that directory, do you have a subdirectory titled IPFS ?

No, I don't see a subdirectory titled IPFS in the user data directory of Beaker Browser.

Humm. What happens if you create one in there (all caps, "IPFS")? Does the daemon start then?

Also, dont run the daemon manually. Beaker will start one if it's not already running, which is the safer choice, because a version mismatch could happen otherwise

What happens if you create one in there (all caps, "IPFS")? Does the daemon start then?

No, even if I create a subdirectory titled IPFS, the daemon doesn't start.

Also, dont run the daemon manually.

Yeah I tried that once to see if it would make a difference (and it didn't work). But yeah I would definitely prefer to use the one integrated inside Beaker.

Here's what I see when I try to start Beaker from a terminal:

[PLUGINS] Loading from /Applications/Beaker Browser.app/Contents/Resources/app.asar/node_modules
Opening beaker:shell-window
Registering protocol handler: dat
[DAT] Database location: /Users/frabrunelle/Library/Application Support/Beaker Browser/Hyperdrive
Registering protocol handler: view-dat
Registering protocol handler: ipfs
Wiring up Web API: datInternalAPI
[IPFS] Starting daemon
Error while starting IPFS daemon
{ Error: ENOENT: no such file or directory, open '/Users/frabrunelle/Library/Application Support/Beaker Browser/IPFS/config'
    at Error (native)
    at Object.fs.openSync (fs.js:640:18)
    at Object.module.(anonymous function) [as openSync] (ELECTRON_ASAR.js:167:20)
    at Object.fs.readFileSync (fs.js:508:33)
    at Object.fs.readFileSync (ELECTRON_ASAR.js:500:29)
    at parseConfig (/Applications/Beaker Browser.app/Contents/Resources/app.asar/node_modules/ipfsd-ctl/lib/node.js:51:19)
    at Node.startDaemon (/Applications/Beaker Browser.app/Contents/Resources/app.asar/node_modules/ipfsd-ctl/lib/node.js:135:7)
    at startDaemon (/Applications/Beaker Browser.app/Contents/Resources/app.asar/node_modules/beaker-plugin-ipfs/lib/ipfs.js:155:12)
    at ipfsd.local (/Applications/Beaker Browser.app/Contents/Resources/app.asar/node_modules/beaker-plugin-ipfs/lib/ipfs.js:36:7)
    at /Applications/Beaker Browser.app/Contents/Resources/app.asar/node_modules/ipfsd-ctl/lib/index.js:22:7
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/Users/frabrunelle/Library/Application Support/Beaker Browser/IPFS/config' }

And here's what I see when I remove the IPFS directory:

[PLUGINS] Loading from /Applications/Beaker Browser.app/Contents/Resources/app.asar/node_modules
Opening beaker:shell-window
Registering protocol handler: dat
[DAT] Database location: /Users/frabrunelle/Library/Application Support/Beaker Browser/Hyperdrive
Registering protocol handler: view-dat
Registering protocol handler: ipfs
Wiring up Web API: datInternalAPI
[IPFS] Initializing /Users/frabrunelle/Library/Application Support/Beaker Browser/IPFS , keysize 4096
[IPFS] Starting daemon
Error while starting IPFS daemon
{ Error: ENOENT: no such file or directory, open '/Users/frabrunelle/Library/Application Support/Beaker Browser/IPFS/config'
    at Error (native)
    at Object.fs.openSync (fs.js:640:18)
    at Object.module.(anonymous function) [as openSync] (ELECTRON_ASAR.js:167:20)
    at Object.fs.readFileSync (fs.js:508:33)
    at Object.fs.readFileSync (ELECTRON_ASAR.js:500:29)
    at parseConfig (/Applications/Beaker Browser.app/Contents/Resources/app.asar/node_modules/ipfsd-ctl/lib/node.js:51:19)
    at Node.startDaemon (/Applications/Beaker Browser.app/Contents/Resources/app.asar/node_modules/ipfsd-ctl/lib/node.js:135:7)
    at startDaemon (/Applications/Beaker Browser.app/Contents/Resources/app.asar/node_modules/beaker-plugin-ipfs/lib/ipfs.js:155:12)
    at ipfsNode.init (/Applications/Beaker Browser.app/Contents/Resources/app.asar/node_modules/beaker-plugin-ipfs/lib/ipfs.js:45:9)
    at /Applications/Beaker Browser.app/Contents/Resources/app.asar/node_modules/ipfsd-ctl/lib/node.js:109:11
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/Users/frabrunelle/Library/Application Support/Beaker Browser/IPFS/config' }
Failed to initialize IPFS
Error: non-zero exit code 1
  while running: /Applications/Beaker Browser.app/Contents/Resources/app.asar/node_modules/subcomandante/subcom 14710 /Applications/Beaker Browser.app/Contents/Resources/app.asar/node_modules/go-ipfs-dep/go-ipfs/ipfs init -b 2048

  internal/child_process.js:302
    throw errnoException(err, 'spawn');
    ^

Error: spawn ENOTDIR
    at exports._errnoException (util.js:1008:11)
    at ChildProcess.spawn (internal/child_process.js:302:11)
    at exports.spawn (child_process.js:384:9)
    at module.exports (/Applications/Beaker Browser.app/Contents/Resources/app.asar/node_modules/comandante/index.js:11:14)
    at Object.<anonymous> (/Applications/Beaker Browser.app/Contents/Resources/app.asar/node_modules/subcomandante/subcom:23:13)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)
    at Function.Module._load (module.js:409:3)

    at ChildProcess.<anonymous> (/Applications/Beaker Browser.app/Contents/Resources/app.asar/node_modules/subcomandante/fork.js:21:23)
    at emitTwo (events.js:111:20)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:852:16)
    at Socket.<anonymous> (internal/child_process.js:323:11)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at Pipe._handle.close [as _onclose] (net.js:492:12)

Ok good, that at least confirms my theory that it has to do with missing directories. But, it's strange that IPFS isn't automatically creating the missing directories. I'll debug soon.

I just tried to run Beaker by building it from source and it works fine when I run it using npm start (it automatically creates the IPFS directory and it lets me access IPFS websites).

But when I create a binary using npm run release, that binary has the same problem as the one I downloaded from GitHub. It says 500 IPFS Daemon not yet ready.

And here are the logs:

[PLUGINS] Loading from /Users/frabrunelle/beaker/dist/mac/Beaker Browser.app/Contents/Resources/app.asar/node_modules
[AUTO-UPDATE] Error: Could not get code signature for running application
Opening beaker:shell-window
Registering protocol handler: dat
[DAT] Database location: /Users/frabrunelle/Library/Application Support/Beaker Browser/Hyperdrive
Registering protocol handler: view-dat
Registering protocol handler: ipfs
Wiring up Web API: datInternalAPI
[IPFS] Starting daemon
[IPFS] Attempting to list folder /ipfs/QmU5XsVwvJfTcCwqkK1SmTqDmXWSQWaTa7ZcVLY2PDxNxG
[IPFS] IPFS Daemon has not setup yet, aborting lookupLink

This happens even if I wait a few minutes for the daemon to start.

I'm 99% sure this was caused by asar-packing being readded to the build process, when I changed to electron-builder. I disabled asar-packing and tested; appears to be working.

Yes it seems to be working for me too (I created a binary using the develop branch).

For example, I am now able to access the site mentioned in the docs (ipfs:/ipfs/QmU5XsVwvJfTcCwqkK1SmTqDmXWSQWaTa7ZcVLY2PDxNxG/ipfs_links.html).

Good deal

Was this page helpful?
0 / 5 - 0 ratings