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

Fail when trying to run webui with ipfsd-ctrl #1817

Closed
denyncrawford opened this issue Jul 7, 2021 · 4 comments
Closed

Fail when trying to run webui with ipfsd-ctrl #1817

denyncrawford opened this issue Jul 7, 2021 · 4 comments
Labels
need/triage Needs initial labeling and prioritization

Comments

@denyncrawford
Copy link

Describe the bug
I can't connect the webui with the spawned daemon, even with my API.HTTPHeaders options set up inside the ipfsOptions, this is the error I get:

image

If i reload the webui at the same time my app is starting it shows data and a succes message, just for a sec (if you change webui view it shows the error message again). I can't reproduce this right now.

Reproduction

const { createController } = require('ipfsd-ctl')
const ipfsHttpModule = require('ipfs-http-client');
const ipfsBin = require.resolve('ipfs/src/cli.js');

export const getDataNode = async (port) => {
  const ipfsd = await createController({
    ipfsHttpModule,
    ipfsBin,
    remote: false,
    type: 'js',
    ipfsOptions: {
      config: {
        API: {
          HTTPHeaders: {
            "Access-Control-Allow-Origin": [
              "*"
            ],
            "Access-Control-Allow-Methods": ["PUT", "POST", "GET", "DELETE"],
            "Access-Control-Allow-Credentials": true,
          }
        }
      }
    }
  })
  console.log(ipfsd);
  return ipfsd.api
};

Expected behavior
Connet webui with my daemon.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop:

  • OS: Win10
  • Browser: chrome
  • Version 2.11.4
@denyncrawford denyncrawford added the need/triage Needs initial labeling and prioritization label Jul 7, 2021
@ipfs ipfs deleted a comment from welcome bot Jul 8, 2021
@lidel
Copy link
Member

lidel commented Jul 8, 2021

@denyncrawford you need to enter either URL or Multiaddr:

Screenshot 2021-06-30 at 00-07-47 Settings IPFS

(we added the above hint in #1811 and will ship in next version)

@denyncrawford
Copy link
Author

@lidel This is what I have in that field:

image

The error is still the same:

image

And this is how I have my addresses:

image

Seems like it's not the solution, I have my gateway working, but the webui isn't :/ Thank you btw.

@lidel
Copy link
Member

lidel commented Jul 9, 2021

Ah, I just realized you are using js-ipfs (type: 'js').
The latest version of webui does not support js-ipfs.
I'm closing this as we are tracking fixing that in #1737

If you want to use webui with js-ipfs, you need to use older version that is bundled with js-ipfs – it can be loaded via http://127.0.0.1:{api_port}/webui, in your case http://127.0.0.1:5001/webui

@lidel lidel closed this as completed Jul 9, 2021
@denyncrawford
Copy link
Author

Nah, it is the same version:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/triage Needs initial labeling and prioritization
Projects
None yet
Development

No branches or pull requests

2 participants