Valet fetch-share-url issue fix#1285
Merged
driesvints merged 2 commits intolaravel:masterfrom Oct 24, 2022
Merged
Conversation
Contributor
|
Looks good to me. 👍 |
Member
|
Thanks @NasirNobin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every time I run
valet shareit opens the tunnel successfully, then shows an error message related to fetch-share-url with this error message.🔽 Video demonstration of the issue
CleanShot.2022-10-02.at.02.24.25.mp4
This error was happening for a while. I ignored this for a few months. A few days back I was collaborating with a co-worker and he thought valet share is broken as this error always popup for him as well. So I thought of finding the underlying issue.
The issue:
Tunnel URL checker
Ngrok::currentTunnelUrlis supposed to retry 20 times until it finds a tunnel URL on127.0.0.1:4040/api/tunnelsendpoint. Then again it should retry with 127.0.0.1:4041 port.But that loop was getting exited when Ngrok is returning a 200 response but the tunnel URL is still not in the response.
In another scenario, it wasn't reaching the
4041port part as theretryhelper is throwing an exception after trying 20 times on the4040port and the script is exiting before trying the 4041 port.This PR should fix both issues.