BioDrop icon indicating copy to clipboard operation
BioDrop copied to clipboard

[OTHER] GitPod checking links results in error

Open GrahamTheDevRel opened this issue 3 years ago • 14 comments

What would you like to share?

I was trying to check my PR worked in GitPod.

While my profile did load, all of the links were throwing errors as they were trying to connect to http://localhost:3000/api/users/grahamthedevrel/links/

So I could not check that I had done everything correctly there.

Additional information

No response

GrahamTheDevRel avatar May 16 '23 08:05 GrahamTheDevRel

To reduce notifications, issues are locked until they are https://github.com/EddieHubCommunity/LinkFree/labels/%F0%9F%8F%81%20status%3A%20ready%20for%20dev and to be assigned. You can learn more in our contributing guide https://github.com/EddieHubCommunity/LinkFree/blob/main/CONTRIBUTING.md

github-actions[bot] avatar May 16 '23 08:05 github-actions[bot]

I believe this issue is not fixable due to the hackery GitPod performs to handle localhost port mapping. I was able to get the links to the correct server, but GitPod prevented the links from hitting the API route, instead sending them to the 404 page.

dan-mba avatar May 16 '23 12:05 dan-mba

Thanks for raising the issue Graham 👍 and thanks Dan for testing and feedback 💪

We should probably add this message to the docs so people are aware.

eddiejaoude avatar May 16 '23 12:05 eddiejaoude

+1 to what Dan mentioned, you will see this when working on a few types of issues via Gitpod (such as authenticated pages). I do not know that there is a solution but perhaps @Cahllagerfeld would be able to confirm

amandamartin-dev avatar May 16 '23 12:05 amandamartin-dev

If I'm not mistaken you can use the local companion they provide [1] or open the workspace in your local vscode. Then there should be a portforwarding to your actual local host

Cahllagerfeld avatar May 16 '23 14:05 Cahllagerfeld

Thanks Dan @dan-mba for mentioning this I faced this issue while contributing today only. I agree with @Cahllagerfeld , we can connect our local Vscode but we need to update our docs to provide information to new or beginner contributor as they use Gitpod for contributing and they won't be able to see and debug their changes. In fact, I used Gitpod for my own first contribution as a beginner.

MAYANKpandey14 avatar May 23 '23 17:05 MAYANKpandey14

Hello Guys, Am i getting this correctly ? The links getting redirected to 404 page, is it for the "View Profile" button and other links profile. image

I changed the NEXT_PUBLIC_BASE_URL to the http://linkfree.io URL and then clicking on "View Profile" worked fine.

bikrantjajware avatar Jul 17 '23 12:07 bikrantjajware

I changed the NEXT_PUBLIC_BASE_URL to the http://linkfree.io URL and then clicking on "View Profile" worked fine.

This does not fix the issue, because the link will redirect to production instead of the local dev environment. This link should be updated to the temporary Gitpod environment I think - but I am not sure if there are further challenges

@bikrantjajware please note we use inclusive language in EddieHub,guys is not inclusive, try folks or friends 😉

eddiejaoude avatar Jul 18 '23 08:07 eddiejaoude

Yup, it does work with the temporary gitpod url as well. image

Thanks @eddiejaoude , i'll keep that in mind 😊

bikrantjajware avatar Jul 18 '23 11:07 bikrantjajware

I think this issue could be to update the Gitpod docs with screenshots on how to chang the .env with their Gitpod dev url?

eddiejaoude avatar Jul 18 '23 13:07 eddiejaoude

right, i guess we need to update docs. If it's ok i would like to contribute to update docs

bikrantjajware avatar Jul 18 '23 16:07 bikrantjajware

Sure @bikrantjajware I have assigned it to you

eddiejaoude avatar Jul 20 '23 08:07 eddiejaoude

Thank you for assigning @eddiejaoude, Here are my proposed changes: image

Also adding a note for when gitpod URL updates image

Please suggest.

bikrantjajware avatar Jul 20 '23 15:07 bikrantjajware

Looks good 👍

eddiejaoude avatar Jul 23 '23 11:07 eddiejaoude