-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using ssl in valet environment causes error. #163
Comments
@jksa we pushed a fix for Valet yesterday. Could you maybe try the main branch by requesting You'll need to remove all TLS options from your config to test. |
Installed and removed all tls options. Same error. Reverb version is now:
name : laravel/reverb |
Hey @jksa I believe this is an issue with Curl on your local machine. If you can supply a repo reproducing the issue, I'm happy to test on my local machine. You can get started with the following command:
Going to close this issue in the mean time. |
Hi @joedixon , please feel free to test with my repo. Today I updated php & curl versions and still got same issue. Can you please inform me what cURL version you are using? Here is my env file: envAPP_NAME=Laravel APP_LOCALE=en APP_MAINTENANCE_DRIVER=file BCRYPT_ROUNDS=12 LOG_CHANNEL=stack DB_CONNECTION=sqlite DB_HOST=127.0.0.1DB_PORT=3306DB_DATABASE=laravelDB_USERNAME=rootDB_PASSWORD=SESSION_DRIVER=database BROADCAST_CONNECTION=reverb CACHE_STORE=database MEMCACHED_HOST=127.0.0.1 REDIS_CLIENT=phpredis MAIL_MAILER=log AWS_ACCESS_KEY_ID= VITE_APP_NAME="${APP_NAME}" REVERB_APP_ID=835917 VITE_REVERB_APP_KEY="${REVERB_APP_KEY}"
run reverb & queue worker execute from tinker: Job will fail and you can find error from logs. |
I am also having ssl issues. I believe its the same. https://github.com/bretterer/reverb-ssl-test is my reproduction repo. I am using Laravel Herd instead of straight Valet, but its a secure domain. I'm using: Steps I took: 1:
9: edit
10: started Errors in console: As a note, I did the same configuration and steps without securing the website and using |
@bretterer I think you need to set |
@joedixon, I tried that, and It does not change anything for me |
@bretterer I have just tested your repo - you need to update your environment variables as follows: REVERB_APP_ID=147395
REVERB_APP_KEY=e0bgxgxlni4u4wntyj2k
REVERB_APP_SECRET=vn7tuvmso5cmmlvz7uwg
- REVERB_HOST="localhost"
+ REVERB_HOST="reverb-ssl-test.test"
REVERB_PORT=8080
- REVERB_SCHEME=http Using the correct hostname and removing the plaintext scheme which will use the @jksa I'm a Herd user so going to take me a little longer to test on Valet. |
@jksa can you try updating the You won't want to do this in production so I would recommend making it an environment variable if it solves the issue.
|
@joedixon that really sounded promising, but unfortunately did not help. |
That did resolve the problem for me. Can you share:
|
Sure, here you go: broadcasting.phpreturn [
]; composer.json{ "name": "laravel/laravel", "type": "project", "description": "The skeleton application for the Laravel framework.", "keywords": ["laravel", "framework"], "license": "MIT", "require": { "php": "^8.2", "laravel/framework": "^11.0", "laravel/reverb": "@dev", "laravel/tinker": "^2.9", "livewire/livewire": "^3.4", "livewire/volt": "^1.0" }, "require-dev": { "fakerphp/faker": "^1.23", "laravel/breeze": "^2.0", "laravel/pint": "^1.13", "laravel/sail": "^1.26", "mockery/mockery": "^1.6", "nunomaduro/collision": "^8.0", "phpunit/phpunit": "^11.0.1", "spatie/laravel-ignition": "^2.4" }, "autoload": { "psr-4": { "App\\": "app/", "Database\\Factories\\": "database/factories/", "Database\\Seeders\\": "database/seeders/" } }, "autoload-dev": { "psr-4": { "Tests\\": "tests/" } }, "scripts": { "post-autoload-dump": [ "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", "@php artisan package:discover --ansi" ], "post-update-cmd": [ "@php artisan vendor:publish --tag=laravel-assets --ansi --force" ], "post-root-package-install": [ "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" ], "post-create-project-cmd": [ "@php artisan key:generate --ansi", "@php -r \"file_exists('database/database.sqlite') || touch('database/database.sqlite');\"", "@php artisan migrate --graceful --ansi" ] }, "extra": { "laravel": { "dont-discover": [] } }, "config": { "optimize-autoloader": true, "preferred-install": "dist", "sort-packages": true, "allow-plugins": { "pestphp/pest-plugin": true, "php-http/discovery": true } }, "minimum-stability": "dev", "prefer-stable": false }envAPP_NAME=Laravel APP_ENV=local APP_KEY=base64:xphd5PuSjc3qy4M9uqJ0XZUSPvOSEHtNZtx3CcyD7+w= APP_DEBUG=true APP_TIMEZONE=UTC APP_URL=https://reverb-app.testAPP_LOCALE=en APP_MAINTENANCE_DRIVER=file BCRYPT_ROUNDS=12 LOG_CHANNEL=stack DB_CONNECTION=sqlite DB_HOST=127.0.0.1DB_PORT=3306DB_DATABASE=laravelDB_USERNAME=rootDB_PASSWORD=SESSION_DRIVER=database BROADCAST_CONNECTION=reverb CACHE_STORE=database MEMCACHED_HOST=127.0.0.1 REDIS_CLIENT=phpredis MAIL_MAILER=log AWS_ACCESS_KEY_ID= VITE_APP_NAME="${APP_NAME}" REVERB_APP_ID=835917 VITE_REVERB_APP_KEY="${REVERB_APP_KEY}" |
That all looks good to me. Can you verify in your composer.lock which version of Reverb is being installed? |
@joedixon Sadly, this is still an issue. Getting: echo.js:6 WebSocket connection to 'wss://reverb-ssl.test:8080/app/e0bgxgxlni4u4wntyj2k?protocol=7&client=js&version=8.4.0-rc2&flash=false' failed: WebSocket is closed before the connection is established. I tried somethings around going to https://reverb-ssl.test:8080 as I am using Brave browser and it sounds like chrome has a cert issue, but nothing resolves at that url (i suspected that to be the case) Would you like me to open a new issue, or do you think this is related? Were you able to get my example repo up and running using Herd and Herd Reverb service? |
@bretterer this should be fixed on the |
@bretterer the Reverb Herd service is separate and doesn't yet have TLS support. Are you trying to use that or do you have Reverb installed in your application? |
reverb is installed in my application. Let me try |
@joedixon Seems to be that. There are few items I would suggest for docs,
That gives a 403, but thats not for this ticket. Thank you so much for the help! |
Here you go! |
@joedixon I am having the same problem. I forked reverb and applied your PR to my fork: https://github.com/vesper8/reverb This made the problem go away for me. My broadcasting tests now work on localhost using Laravel Valet and SSL where previously they were failing with All of this is probably indeed related to openssl's new 3.3 release. A very similar thing happened when they released 3.2 back in November of last year. Thanks for looking into it and providing a fix. Hope it gets merged soon. |
@joedixon I'm more than happy to confirm that PR seem to fix my issue!!! |
I want to do a little more testing, but assuming all goes well, I think it's likely we can get a new release out pretty soon. |
Reverb Version
1.0.0-beta7
Laravel Version
11.4.0
PHP Version
8.2.16
Description
I have struggled to get laravel reverb work locally with valet & ssl & Livewire.
I can get Echo successfully connet to reverb, but when dispatching event, I get error:
[2024-04-19 10:17:12] local.ERROR: cURL error 56: OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 0
Steps To Reproduce
I use node version 20.10.
Valet version: 4.6.1
Change from .env:
APP_URL=https://reverb-app.test
REVERB_HOST="reverb-app.test"
REVERB_SCHEME=https
Set reverb.cong tls option to:
Create TestEvent for broadcasting:
php artisan make:event TestEvent
Edit TestEvet to implement ShouldBroadcast and chane PrivateChannel to Channel
Start parallel:
npm run dev
php artisan reverb:start --debug
php artisan queue:work
Check browser connects successfully and reverb debug shows connection.
Dispatch event from tinker:
App\Events\TestEvent::dispatch();
See error from logs:
[2024-04-19 10:48:14] local.ERROR: cURL error 56: OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 0
Full trace
[2024-04-19 10:48:14] local.ERROR: cURL error 56: OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 0 (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://reverb-app.test:8080/apps/835917/events?auth_key=bkefoajmyavya3ph3lml&auth_timestamp=1713523694&auth_version=1.0&body_md5=290a36791f069f26dc79082e40601c21&auth_signature=ff9d675c3f35a20b31e8dc9d106d3d6dd8f9208749641316f0be6c9aca044b8f {"exception":"[object] (GuzzleHttp\\Exception\\RequestException(code: 0): cURL error 56: OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 0 (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://reverb-app.test:8080/apps/835917/events?auth_key=bkefoajmyavya3ph3lml&auth_timestamp=1713523694&auth_version=1.0&body_md5=290a36791f069f26dc79082e40601c21&auth_signature=ff9d675c3f35a20b31e8dc9d106d3d6dd8f9208749641316f0be6c9aca044b8f at /Users/juser/code/reverb-app/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:211) [stacktrace] #0 /Users/juser/code/reverb-app/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php(158): GuzzleHttp\\Handler\\CurlFactory::createRejection(Object(GuzzleHttp\\Handler\\EasyHandle), Array) #1 /Users/juser/code/reverb-app/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php(110): GuzzleHttp\\Handler\\CurlFactory::finishError(Object(GuzzleHttp\\Handler\\CurlHandler), Object(GuzzleHttp\\Handler\\EasyHandle), Object(GuzzleHttp\\Handler\\CurlFactory)) #2 /Users/juser/code/reverb-app/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php(47): GuzzleHttp\\Handler\\CurlFactory::finish(Object(GuzzleHttp\\Handler\\CurlHandler), Object(GuzzleHttp\\Handler\\EasyHandle), Object(GuzzleHttp\\Handler\\CurlFactory)) #3 /Users/juser/code/reverb-app/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php(28): GuzzleHttp\\Handler\\CurlHandler->__invoke(Object(GuzzleHttp\\Psr7\\Request), Array) #4 /Users/juser/code/reverb-app/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php(48): GuzzleHttp\\Handler\\Proxy::GuzzleHttp\\Handler\\{closure}(Object(GuzzleHttp\\Psr7\\Request), Array) #5 /Users/juser/code/reverb-app/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php(64): GuzzleHttp\\Handler\\Proxy::GuzzleHttp\\Handler\\{closure}(Object(GuzzleHttp\\Psr7\\Request), Array) #6 /Users/juser/code/reverb-app/vendor/guzzlehttp/guzzle/src/Middleware.php(31): GuzzleHttp\\PrepareBodyMiddleware->__invoke(Object(GuzzleHttp\\Psr7\\Request), Array) #7 /Users/juser/code/reverb-app/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php(71): GuzzleHttp\\Middleware::GuzzleHttp\\{closure}(Object(GuzzleHttp\\Psr7\\Request), Array) #8 /Users/juser/code/reverb-app/vendor/guzzlehttp/guzzle/src/Middleware.php(63): GuzzleHttp\\RedirectMiddleware->__invoke(Object(GuzzleHttp\\Psr7\\Request), Array) #9 /Users/juser/code/reverb-app/vendor/guzzlehttp/guzzle/src/HandlerStack.php(75): GuzzleHttp\\Middleware::GuzzleHttp\\{closure}(Object(GuzzleHttp\\Psr7\\Request), Array) #10 /Users/juser/code/reverb-app/vendor/guzzlehttp/guzzle/src/Client.php(333): GuzzleHttp\\HandlerStack->__invoke(Object(GuzzleHttp\\Psr7\\Request), Array) #11 /Users/juser/code/reverb-app/vendor/guzzlehttp/guzzle/src/Client.php(169): GuzzleHttp\\Client->transfer(Object(GuzzleHttp\\Psr7\\Request), Array) #12 /Users/juser/code/reverb-app/vendor/guzzlehttp/guzzle/src/Client.php(189): GuzzleHttp\\Client->requestAsync('POST', Object(GuzzleHttp\\Psr7\\Uri), Array) #13 /Users/juser/code/reverb-app/vendor/guzzlehttp/guzzle/src/ClientTrait.php(95): GuzzleHttp\\Client->request('POST', 'apps/835917/eve...', Array) #14 /Users/juser/code/reverb-app/vendor/pusher/pusher-php-server/src/Pusher.php(776): GuzzleHttp\\Client->post('apps/835917/eve...', Array) #15 /Users/juser/code/reverb-app/vendor/pusher/pusher-php-server/src/Pusher.php(441): Pusher\\Pusher->post('/apps/835917/ev...', '{\"name\":\"App\\\\\\\\E...') #16 /Users/juser/code/reverb-app/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/PusherBroadcaster.php(161): Pusher\\Pusher->trigger(Array, 'App\\\\Events\\\\Test...', Array, Array) #17 /Users/juser/code/reverb-app/vendor/laravel/framework/src/Illuminate/Collections/Traits/EnumeratesValues.php(237): Illuminate\\Broadcasting\\Broadcasters\\PusherBroadcaster->Illuminate\\Broadcasting\\Broadcasters\\{closure}(Object(Illuminate\\Support\\Collection), 0) #18 /Users/juser/code/reverb-app/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/PusherBroadcaster.php(160): Illuminate\\Support\\Collection->each(Object(Closure)) #19 /Users/juser/code/reverb-app/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastEvent.php(92): Illuminate\\Broadcasting\\Broadcasters\\PusherBroadcaster->broadcast(Object(Illuminate\\Support\\Collection), 'App\\\\Events\\\\Test...', Array) #20 /Users/juser/code/reverb-app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\\Broadcasting\\BroadcastEvent->handle(Object(Illuminate\\Broadcasting\\BroadcastManager)) #21 /Users/juser/code/reverb-app/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}() #22 /Users/juser/code/reverb-app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure(Object(Closure)) #23 /Users/juser/code/reverb-app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure)) #24 /Users/juser/code/reverb-app/vendor/laravel/framework/src/Illuminate/Container/Container.php(662): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL) #25 /Users/juser/code/reverb-app/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(128): Illuminate\\Container\\Container->call(Array) #26 /Users/juser/code/reverb-app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\\Bus\\Dispatcher->Illuminate\\Bus\\{closure}(Object(Illuminate\\Broadcasting\\BroadcastEvent)) #27 /Users/juser/code/reverb-app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Broadcasting\\BroadcastEvent)) #28 /Users/juser/code/reverb-app/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(132): Illuminate\\Pipeline\\Pipeline->then(Object(Closure)) #29 /Users/juser/code/reverb-app/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(124): Illuminate\\Bus\\Dispatcher->dispatchNow(Object(Illuminate\\Broadcasting\\BroadcastEvent), false) #30 /Users/juser/code/reverb-app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\\Queue\\CallQueuedHandler->Illuminate\\Queue\\{closure}(Object(Illuminate\\Broadcasting\\BroadcastEvent)) #31 /Users/juser/code/reverb-app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Broadcasting\\BroadcastEvent)) #32 /Users/juser/code/reverb-app/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(123): Illuminate\\Pipeline\\Pipeline->then(Object(Closure)) #33 /Users/juser/code/reverb-app/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(71): Illuminate\\Queue\\CallQueuedHandler->dispatchThroughMiddleware(Object(Illuminate\\Queue\\Jobs\\DatabaseJob), Object(Illuminate\\Broadcasting\\BroadcastEvent)) #34 /Users/juser/code/reverb-app/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php(102): Illuminate\\Queue\\CallQueuedHandler->call(Object(Illuminate\\Queue\\Jobs\\DatabaseJob), Array) #35 /Users/juser/code/reverb-app/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(439): Illuminate\\Queue\\Jobs\\Job->fire() #36 /Users/juser/code/reverb-app/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(389): Illuminate\\Queue\\Worker->process('database', Object(Illuminate\\Queue\\Jobs\\DatabaseJob), Object(Illuminate\\Queue\\WorkerOptions)) #37 /Users/juser/code/reverb-app/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(176): Illuminate\\Queue\\Worker->runJob(Object(Illuminate\\Queue\\Jobs\\DatabaseJob), 'database', Object(Illuminate\\Queue\\WorkerOptions)) #38 /Users/juser/code/reverb-app/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(139): Illuminate\\Queue\\Worker->daemon('database', 'default', Object(Illuminate\\Queue\\WorkerOptions)) #39 /Users/juser/code/reverb-app/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(122): Illuminate\\Queue\\Console\\WorkCommand->runWorker('database', 'default') #40 /Users/juser/code/reverb-app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\\Queue\\Console\\WorkCommand->handle() #41 /Users/juser/code/reverb-app/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}() #42 /Users/juser/code/reverb-app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure(Object(Closure)) #43 /Users/juser/code/reverb-app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure)) #44 /Users/juser/code/reverb-app/vendor/laravel/framework/src/Illuminate/Container/Container.php(662): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL) #45 /Users/juser/code/reverb-app/vendor/laravel/framework/src/Illuminate/Console/Command.php(212): Illuminate\\Container\\Container->call(Array) #46 /Users/juser/code/reverb-app/vendor/symfony/console/Command/Command.php(279): Illuminate\\Console\\Command->execute(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle)) #47 /Users/juser/code/reverb-app/vendor/laravel/framework/src/Illuminate/Console/Command.php(181): Symfony\\Component\\Console\\Command\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle)) #48 /Users/juser/code/reverb-app/vendor/symfony/console/Application.php(1049): Illuminate\\Console\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput)) #49 /Users/juser/code/reverb-app/vendor/symfony/console/Application.php(318): Symfony\\Component\\Console\\Application->doRunCommand(Object(Illuminate\\Queue\\Console\\WorkCommand), Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput)) #50 /Users/juser/code/reverb-app/vendor/symfony/console/Application.php(169): Symfony\\Component\\Console\\Application->doRun(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput)) #51 /Users/juser/code/reverb-app/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(196): Symfony\\Component\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput)) #52 /Users/juser/code/reverb-app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1183): Illuminate\\Foundation\\Console\\Kernel->handle(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput)) #53 /Users/juser/code/reverb-app/artisan(13): Illuminate\\Foundation\\Application->handleCommand(Object(Symfony\\Component\\Console\\Input\\ArgvInput)) #54 {main} "}The text was updated successfully, but these errors were encountered: