sail: Laravel Sail share via expose doesn't seem to function at all
- Laravel Version: 8.29.0
- PHP Version: 8.0.2
- Database Driver & Version: N/A
Description:
Originally posted as a discussion, but it seems I’m not the only one with this issue so I thought I would escalate into a bug report.
Trying to share my Laravel site with my phone to do some testing via Laravel Sail.
So I type in sail share and get the usual output. When I visit the dashboard URL that appears on my Mac, I get Site cannot be reached.
When I try to visit the URL generated by sail locally and via my phone, I get ERR_EMPTY_RESPONSE in Chrome.
Not sure whats going on? I’m using Docker Desktop for Mac. Am I doing something wrong here?
Steps To Reproduce:
- Install Laravel on MacOS
- Install Laravel Sail with the PHP 8 runtime
- Make sure your Laravel welcome page is showing locally
- Run
sail shareto start sharing your site - See that you cannot visit the shared site with the given link
- See that you also cannot see the dashboard
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 3
- Comments: 18 (7 by maintainers)
Just to expand on this, as it’s still an issue in sail, for Linux users.
/laravel_app/vendor/laravel/sail/bin/sailbeyondcodegmbh/expose-server--add-host=host.docker.internal:host-gatewayinto thedocker runcommand. I put it in between--rmand-psail shareAnd it should now work.
Pushed up a patch.
This issue exists only on linux hosts. I submitted a pull request to beyondcode/expose repository which fixes the issue. Link to PR: https://github.com/beyondcode/expose/pull/293
I also got it working now after I cleared out all
beyondcodegmbh/expose-serverimages from Docker, thanks!Yeah it’s broken for me as well. I’ll check in with @mpociot.
This issue has seemed to reappear for me using Windows / WSL2
I just tried out a fresh install on macOS and it works for me. I was using an old image it seems. Make sure ALL of your containers/images are cleared before trying again.
Yeah, can confirm. It’s broken for me as well again.
Thanks for the speedy patch @taylorotwell @driesvints 👍