As of v2.5.1.11970 (Beta) and v2.5.1.12010 (Beta) IPFS Companion can't connect to my local node under Chrome, and yet Firefox works just fine.
Versions:
70.0.3538.77 (Official Build) (64-bit)63.0 (64-bit)0.4.18v2.5.1.11970 (Beta)v2.5.1.12010 (Beta)When I enabled error logging for the extension in Chrome I get the following:
Error while ipfs.swarms.peers: SyntaxError: Unexpected number in JSON at position 4Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/dist/background/background.htmldist/bundles/backgroundPage.bundle.js:2 (readDnsLinkFromTxtRecord)I just tested out the extension with a separate Chrome profile, and it fails similarly there as well.
Thank you for reporting this.
I was able to reproduce this with vanilla go-ipfs 0.4.18 (fresh install, default config without custom HTTP headers):
$ docker run --rm -it -p 8080:8080 -p 4001:4001 -p 127.0.0.1:5001:5001 ipfs/go-ipfs:v0.4.18
Seems that Chrome (or one of recent changes in Companion) removed our ability to execute this workaround, and the old issue is back:
| :anger: go-ipfs without CORS (default) | :ok_hand: go-ipfs with CORS |
| ---- | ---- |
|
|
|
Until we fix this upstream, a quick fix is to manually add CORS header via commandline:
$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["*"]'
After daemon restart, it should work again.
@5310 are you able to confirm if the workaround works for you?
@lidel I've just set the CORS config as instructed and it's now connecting under Chrome as before!
Updated, reverted, and working flawlessly! :bowing_man:
Awesome! Thanks again for super helpful info in https://github.com/ipfs-shipyard/ipfs-companion/issues/615#issue-378147694 it saved me a lot of time :)