-
Notifications
You must be signed in to change notification settings - Fork 639
SSL certificate problem: unable to get local issuer certificate (with new information) #879
Comments
I should add that downgrading |
I opened an issue on pusher/pusher-http-php#313 (comment) I guess forking Guzzle itself and adding an optional configuration to allow for slipping in For now it seems like reverting to |
@vesper8 I think that having Pusher 6.x+ and passing a client instance when creating the
'options' => [
// ...
],
'client_options' => [
'verify' =>true, // to disable TLS checks
],
namespace App;
use Illuminate\Broadcasting\Broadcasters\PusherBroadcaster;
use Illuminate\Broadcasting\BroadcastManager as BaseBroadcastManager;
use Psr\Log\LoggerInterface;
use Pusher\Pusher;
class TlsSupportingBroadcastManager extends BaseBroadcastManager
{
protected function createPusherDriver(array $config)
{
$pusher = new Pusher(
$config['key'], $config['secret'],
$config['app_id'], $config['options'] ?? [],
new \GuzzleHttp\Client($config['client_options']) ?? []
);
if ($config['log'] ?? false) {
$pusher->setLogger($this->app->make(LoggerInterface::class));
}
return new PusherBroadcaster($pusher);
}
}
namespace App\Providers;
use App\TlsSupportingBroadcastManager;
class BroadcastingServiceProvider extends ServiceProvider
{
public function register()
{
$this->app->singleton(BroadcastManager::class, function ($app) {
return new TlsSupportingBroadcastManager($app);
});
}
} |
I have the same problem. i make the like @rennokki suggest but it doesnt work for me. When i start th websockets serve i see the connections to chanel. But when i try to send event from dashboard it throws an Error sending event.
Pusher 7.0.2 |
Any update guys? |
In my case i had to downgrade Pusher to v5.0.3 and it work for me. |
Experiencing this also on Ubuntu 20.4 |
this fix only available for laravel v9 |
I had the same issue. I downloaded the https://curl.se/ca/cacert.pem as per https://curl.se/docs/caextract.html and added to my php.ini
No need to have the 'client_options' in broadcasting.php |
is it pusher-server or pusher js |
The service you have to downgrade is the php dependency https://packagist.org/packages/pusher/pusher-php-server You do not have to downgrade the client-side https://www.npmjs.com/package/pusher-js |
Any update? |
I'm wondering as well. Having to use such an old version of |
either update to laravel 9 or use old version of pusher-php-server 5.0.3 |
I'm on Laravel 9, @anditsung. I get this error: With |
update from laravel 7 or 8? config/broadcasting.php
is your config like this? |
@anditsung oh, I was definitely missing something there. Updated it according to Laravel 9 and it's working now. This was before:
|
Ok, after hours of testing I have been able to solve this problem and the only viable way I have found is to downgrade the version of pusher server to 4.1. Im using :
So, im downgrade pusher server using:
my broadcasting.php :
My websockets.php :
Im using LARAVEL_WEBSOCKETS_SSL_LOCAL_PK and LARAVEL_WEBSOCKETS_SSL_LOCAL_CERT in .env file to point my server certs in my production server. my app.js :
This configuration works fine in both environments : local computer without ssl (http) and production server with ssl cert (https) hope this helps |
i use 'client_options' => [
'verify' => false, // to disable TLS checks
], refer from this comment |
I am using laravel 9 with laravel-websockets 1.13.1 and pusher/pusher-php-server 7.2.1 and a self signed ssl for localhost I have set this in broadcasting.php
and the error is gone
but the it does not work ... the listener is not triggered. I want to work in dev with self signed sert. (https://localhost) Any ideas? |
@bci24 u must upload ur certificae to ur browser, chek it on |
@rizkhal the certificate was already imported ... anyway the problem is the event is not triggered. I have tested also without secure connection (http) and the same thing happens. The working project was using laravel-echo-server with socket.io and now I have migrated to laravel-websockets In the app.js I have this:
And in the component that is is listening the event (and is not triggered)
In the images attached you can see that the connection is made, is connected to the channel "visitors" |
@bci24 how about with namespace? onMounted(() => {
window.Echo.channel('visitors').listen('.App\\Events\\VisitorEvent',(data) => {
console.log(data) // it is not executed !!!
})
}) |
@rizkhal tested and the same. The problem seems to be on the laravel-websockets side. I have tested with the same config with ssl using the npm server soketi and it works. The events are triggered. When using the laravel-websockets it doesn't work. Now the laravel-websockets is installed on a fresh laravel 9 ... to be used as a stand alone server - multi tenant. I have also integrated with the main project for testing and the same thing ... it connects to the socket but the events are not triggered.... |
I had this issue too and I found this solution using SSL certificates: Configuration: broadcasting.php
websockets.php
The curl 'client_options' worked without any change on other files. |
Hi All, I have simpler solution to this. Yes it turns out that latest version of pusher has no 'client_options' options and also 'curl_options' But they allow us to pass custom guzzle client when creating Pusher, so here is the shortest and simplest solution.
Thank me later |
Works for me on Laravel 10 |
More correct version
|
InvalidArgumentException Driver [pusher-custom] is not supported. at vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastManager.php:259
19 [internal]:0 25 artisan:37 |
On my dev environment (Mac) I used to be able to use laravel-websockets without any issues. Recently after running some updates things stopped working and I am now getting the
SSL certificate problem: unable to get local issuer certificate
error.I've been trying to troubleshoot this issue and found a lot of new information which doesn't seem to be mentioned on the multiple other SSL threads so I thought I would share here to help us all come to an answer.
#864 #845 #815 #792 #760 #753 #743 #732 #680
First of all, it should be noted that
curl_options
was deprecated as of6.0.0
ofpusher/pusher-php-server
.https://github.com/pusher/pusher-http-php/blob/master/CHANGELOG.md
I checked my version and I'm on
7.0.1
. This is on the project doing the broadcasting. On the project hosting thelaravel-websockets
package it's on5.0.3
So all solutions pointing to the "old way" of circumventing this issue by using, provided you're using
^6.0
... are now obsolete
In debugging the issue, I noticed that if I modify this file
vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php
and addinside the
__invoke
method.Then the problem goes away.
The only remaining issue now is that I'm at a loss of how to set this
verify=false
in any of the configuration files.Even though pusher has deprecated
curl_options
, I can't find any information yet on how we are supposed to disable verification following this deprecation.Hopefully this new information leads us to answer as I see many people struggling with this issue right now
The text was updated successfully, but these errors were encountered: