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

Fails to start when ~/.ipfs/api exists #689

Closed
lidel opened this issue Nov 12, 2018 · 1 comment · Fixed by #711
Closed

Fails to start when ~/.ipfs/api exists #689

lidel opened this issue Nov 12, 2018 · 1 comment · Fixed by #711
Assignees

Comments

@lidel
Copy link
Member

lidel commented Nov 12, 2018

Issue found while testing "The PR" @ #662 (comment)

Context

I often run go-ipfs in docker or use remote node, so I only have ~/.ipfs/api with multiaddr in it (eg. /ip4/127.0.0.1/tcp/5001 for local docker, or a port of ssh tunnel to a remote node)

Bug

ipfs-desktop failed to start because it did not recognize ~/.ipfs/api

Click to expand debug log
$ DEBUG='*' npm run start
(...)
  ipfsd-ctl:daemon:stdout Initializing daemon...
  ipfsd-ctl:daemon:stdout go-ipfs version: 0.4.18-
  ipfsd-ctl:daemon:stdout Repo version: 7
  ipfsd-ctl:daemon:stdout System version: amd64/linux
  ipfsd-ctl:daemon:stdout Golang version: go1.11.1
  ipfsd-ctl:daemon:stdout Received interrupt signal, shutting down...
  ipfsd-ctl:daemon:stdout (Hit ctrl-c again to force-shutdown the daemon.) +47ms
  ipfsd-ctl:daemon:stderr Error: no IPFS repo found in /home/lidel/.ipfs.
  ipfsd-ctl:daemon:stderr please run: 'ipfs init' +46ms
(node:21021) UnhandledPromiseRejectionWarning: Error: Command failed: /home/lidel/project/ipfs-desktop/node_modules/go-ipfs-dep/go-ipfs/ipfs daemon
Error: no IPFS repo found in /home/lidel/.ipfs.
please run: 'ipfs init'

Initializing daemon...
go-ipfs version: 0.4.18-
Repo version: 7
System version: amd64/linux
Golang version: go1.11.1
Received interrupt signal, shutting down...
(Hit ctrl-c again to force-shutdown the daemon.)

    at makeError (/home/lidel/project/ipfs-desktop/node_modules/ipfsd-ctl/node_modules/execa/index.js:174:9)
    at Promise.all.then.arr (/home/lidel/project/ipfs-desktop/node_modules/ipfsd-ctl/node_modules/execa/index.js:278:16)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:21021) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
(node:21021) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Fix

I made it start by removing ~/.ipfs entirely and starting again, but it should be fixed eventually to work with ~/.ipfs/api like it did in past.

@hacdias
Copy link
Member

hacdias commented Nov 24, 2018

@lidel I'm just unsure if this is an error of Desktop or an error or js-ipfsd-ctl. It seems the latter is having troubles recognizing the repository:

ipfsd-ctl:daemon:stderr Error: no IPFS repo found in /home/lidel/.ipfs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants