Open a0m0rajab opened 4 months ago
Here is the result that I got from the dev tunnels
How are you getting this? From the Ports view?
Nope, I from the port view I am getting the correct results, yet when I open the app it redirects me to the link I mentioned.
In the JS code I provided the hostURL
is localhost:300
I'm still having trouble understanding. Could you make a screen capture to show this?
Hi, thanks for following up; I just made a minimum working code in this repo: https://github.com/a0m0rajab/ms-tunnels-error, which has a minimal reproducible code to test.
Here is a video recording of the issue:
https://github.com/microsoft/vscode/assets/18273833/b16a4c7a-28ad-4155-b9a3-ea4c7e43c556
test 1 -> The link: http://localhost:3000/test1 expected to work well. there is no redirect 404 is normal
Test 2 -> The link: http://localhost:3000/test2 expected : https://randoms-3000.euw.devtunnels.ms/login got: https://randoms-80.euw.devtunnels.ms/login
Test 3 -> The link: http://localhost:3000/test3 expected: https://randoms-3000.euw.devtunnels.ms/login got: https://randoms-3000.euw.devtunnels.ms:3000/login
Thanks for the recording! So, you are opening VS Code, connecting to another machine using dev tunnels, then following the steps in https://github.com/a0m0rajab/ms-tunnels-error?tab=readme-ov-file#getting-started from the VS Code integrated terminal?
Yes that's exactly what I am doing
Hi @alexr00 any update on this?
@connor4312 I think this is coming from the dev tunnels extension.
@alexr00 thanks for the comment,. @connor4312 if the extension is open source would you like to point to it's code, I would love to take a look at it and see if I can debug this.
Does this issue occur when all extensions are disabled?: Yes/No
I am working with the NextJs framework, where I have a link that redirect the users to it in my App. The link works well with the local machine, yet when I use the de tunnel, it adds the port twice to the URL, and it does not work.
Here is my JS code:
Here is the result that I got from the dev tunnels:
Here is what I expect:
Either
Or
My workaround to solve this was to modify the URL by hand, yet it would be great to fix this bug or know a permanent solution. (thanks to this issue for getting the workaround (https://github.com/microsoft/vscode/issues/190020))
Is there a way to define the URL that I got from the dev tunnels? or fix that duplicate port issue?