Ipfs-webui: Preview link broken if using non default port

Created on 1 Jan 2021  Â·  6Comments  Â·  Source: ipfs/ipfs-webui

  • OS: macOS 10.15.6

    • Version of IPFS Desktop: 0.13.2

Describe the bug
If IPFS Desktop is not using the default port (8080) the link to preview it still uses 8080, which is incorrect. I'm running another service that's holding port 8080 (nginx) so IPFS will use 8081 instead. I see "Gateway": "/ip4/127.0.0.1/tcp/8081", in my config file. When i click the link below it opens http://localhost:8080/ipfs/<cid> which is actually routed to nginx and I get a 404. If I manually change the port in the url to 8081 things work correctly.

Screen Shot 2020-12-31 at 3 17 11 PM

To Reproduce
Steps to reproduce the behavior:

  • Change the Gateway port in ~/.ipfs/config to 8081 ("Gateway": "/ip4/127.0.0.1/tcp/8081",)
  • Restart IPFS Desktop
  • Try to open a pinned file, or any file via the localhost gateway api

Screenshots
If applicable, add screenshots to help explain your problem.
Screen Shot 2020-12-31 at 3 20 58 PM

Additional context
Add any other context about the problem here.


combined.log
(error log empty)

kinbug help wanted exintermediate P2 statuready good first issue

Most helpful comment

No it still persists.
The steps i just took were

  • Close IPFS desktop via menubar icon -> quit
  • Start up a webserver to hog port 8080 PORT=8080 yarn start in a
    create-react-app app
  • Launch IPFS Desktop
  • It asks if i want to use 8081 instead, and i say yes
  • Open my pinned files and open one, i still get port 8080
  • Close IPFS desktop via menubar icon -> quit
  • Launch IPFS Desktop
  • There is no dialog about which port to use
  • I still see the same problem where it launches urls with port 8080

On Mon, Jan 4, 2021 at 8:50 AM Marcin Rataj notifications@github.com
wrote:

I suspect we read port from config during HTTP API client initialization,
and we never update it again.

@msfeldstein https://github.com/msfeldstein can you confirm the issue
goes away if you fully Quit via menubar and start IPFS Desktop again?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/ipfs-shipyard/ipfs-desktop/issues/1726#issuecomment-754087866,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AABHK3YLJDAI5LWXI6DMSZDSYHWXFANCNFSM4VPZ6EZQ
.

All 6 comments

Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review.
In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We currently aim to give initial feedback within two business days. If this does not happen, feel free to leave a comment.
Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:

  • "Priority" labels will show how urgent this is for the team.
  • "Status" labels will show if this is ready to be worked on, blocked, or in progress.
  • "Need" labels will indicate if additional input or analysis is required.

Finally, remember to use https://discuss.ipfs.io if you just need general support.

Thanks - we will look deeper in our next weekly triage.

I suspect we read port from config during HTTP API client initialization, and we never update it again.

@msfeldstein can you confirm the issue goes away if you fully Quit via menubar and start IPFS Desktop again?

No it still persists.
The steps i just took were

  • Close IPFS desktop via menubar icon -> quit
  • Start up a webserver to hog port 8080 PORT=8080 yarn start in a
    create-react-app app
  • Launch IPFS Desktop
  • It asks if i want to use 8081 instead, and i say yes
  • Open my pinned files and open one, i still get port 8080
  • Close IPFS desktop via menubar icon -> quit
  • Launch IPFS Desktop
  • There is no dialog about which port to use
  • I still see the same problem where it launches urls with port 8080

On Mon, Jan 4, 2021 at 8:50 AM Marcin Rataj notifications@github.com
wrote:

I suspect we read port from config during HTTP API client initialization,
and we never update it again.

@msfeldstein https://github.com/msfeldstein can you confirm the issue
goes away if you fully Quit via menubar and start IPFS Desktop again?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/ipfs-shipyard/ipfs-desktop/issues/1726#issuecomment-754087866,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AABHK3YLJDAI5LWXI6DMSZDSYHWXFANCNFSM4VPZ6EZQ
.

Just to confirm, I've seen the same behavior @msfeldstein describes above - specifically the same annoyance in doing some sort of webdev work in an application that defaults to port 8080.

Note from triage: purging cache of local gateway port when changing/saving config is likely to solve this.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

icf20 picture icf20  Â·  5Comments

leonprou picture leonprou  Â·  4Comments

olizilla picture olizilla  Â·  5Comments

Luflosi picture Luflosi  Â·  3Comments

lidel picture lidel  Â·  3Comments