Open kniyer007 opened 3 years ago
I'm not sure if it's related, but I suddenly started getting errors in production 7 days ago. Occurs in vendor/edamov/pushok/src/Client.php:161
. Made no changes to the server, and no changes to any related code.
SSL certificate problem: unable to get local issuer certificate
Laravel 8.2.1 PHP 7.4.3
Not sure if it's worth noting - my server is on AWS EC2 as well (provisioned by Forge).
It is related and I had the same issue when I manually updated the package to the latest version. And then based on pushok issue thread I found this: https://github.com/edamov/pushok/issues/121#issuecomment-763537771 And I did that to make the push notifications to work.
But I would like to find out the exact reason and how to fix it in a right way rather than hacking it.
I had the same problem -> No notifications on production (local was doing fine), so I upgraded to the lastest version of apn (3.2). Now i see the error:
SSL certificate problem: unable to get local issuer certificate
I use LetsEncrypt SSL, I am wondering if something changed regarding that.
I have had issues with this recently and I have resolved it by updating the trusted certificate in linux. It seems that the required trusted cert which is needed to verify secure connections between server and push notification service has been removed. The removal of this certificate was due to a linux unattended upgrade and putting the cert back in place has resolved the issue immediately.
Running this on the server should replace the certificate:
wget --no-check-certificate -c https://www.geotrust.com/resources/root_certificates/certificates/GeoTrust_Global_CA.pem \
&& mkdir /usr/local/share/ca-certificates/extra \
&& mv GeoTrust_Global_CA.pem /usr/local/share/ca-certificates/extra/GeoTrust_Global_CA.crt \
&& update-ca-certificates
See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=962596 for the reported bug.
@kniyer007 This solution is much better than disabling the ssl verification. Disabling it would be insecure. @ArjenNZ It worked locally for me also, i suspect you will have the required certificate in place.
I am experiencing same problem. No Push Notifications got fired from production. Getting following error in laravel.log:
SSL certificate problem: unable to get local issuer certificate {"exception":"[object] (Exception(code: 0): SSL certificate problem: unable to get local issuer certificate at /home/forge/my-app/vendor/edamov/pushok/src/Client.php:161) [stacktrace]
I have Laravel 8.0 and APN 3.3
I have no errors but pushes not sended.
In Pushok client $responseCollection is empty after pushes send.
====================
up: my curl was builded without HTTP/2, in that case no errors shown.
wget --no-check-certificate -c https://www.geotrust.com/resources/root_certificates/certificates/GeoTrust_Global_CA.pem \ && mkdir /usr/local/share/ca-certificates/extra \ && mv GeoTrust_Global_CA.pem /usr/local/share/ca-certificates/extra/GeoTrust_Global_CA.crt \ && update-ca-certificates
Sir i tried updating but it sayd the resource was not found at that geotrust url do u have working certificate?
@sarveshamrit
Try this GeoTrust_Global_CA.pem
-----BEGIN CERTIFICATE-----
MIIDVDCCAjygAwIBAgIDAjRWMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNVBAYTAlVT
MRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9i
YWwgQ0EwHhcNMDIwNTIxMDQwMDAwWhcNMjIwNTIxMDQwMDAwWjBCMQswCQYDVQQG
EwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEbMBkGA1UEAxMSR2VvVHJ1c3Qg
R2xvYmFsIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2swYYzD9
9BcjGlZ+W988bDjkcbd4kdS8odhM+KhDtgPpTSEHCIjaWC9mOSm9BXiLnTjoBbdq
fnGk5sRgprDvgOSJKA+eJdbtg/OtppHHmMlCGDUUna2YRpIuT8rxh0PBFpVXLVDv
iS2Aelet8u5fa9IAjbkU+BQVNdnARqN7csiRv8lVK83Qlz6cJmTM386DGXHKTubU
1XupGc1V3sjs0l44U+VcT4wt/lAjNvxm5suOpDkZALeVAjmRCw7+OC7RHQWa9k0+
bw8HHa8sHo9gOeL6NlMTOdReJivbPagUvTLrGAMoUgRx5aszPeE4uwc2hGKceeoW
MPRfwCvocWvk+QIDAQABo1MwUTAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTA
ephojYn7qwVkDBF9qn1luMrMTjAfBgNVHSMEGDAWgBTAephojYn7qwVkDBF9qn1l
uMrMTjANBgkqhkiG9w0BAQUFAAOCAQEANeMpauUvXVSOKVCUn5kaFOSPeCpilKIn
Z57QzxpeR+nBsqTP3UEaBU6bS+5Kb1VSsyShNwrrZHYqLizz/Tt1kL/6cdjHPTfS
tQWVYrmm3ok9Nns4d0iXrKYgjy6myQzCsplFAMfOEVEiIuCl6rYVSAlk6l5PdPcF
PseKUgzbFbS9bZvlxrFUaKnjaZC2mqUPuLk/IH2uSrW4nOQdtqvmlKXBx4Ot2/Un
hw4EbNX/3aBd7YdStysVAq45pmp06drE57xNNB6pXE0zX5IJL4hmXXeXxx12E6nV
5fEWCRE11azbJHFwLJhWC9kXtNHjUStedejV0NxPNO3CBWaAocvmMw==
-----END CERTIFICATE-----
@andrew-bibby sir i am using https://github.com/davibennun/laravel-push-notification/ but push notification doesn't go to ios device any more i even installed the certificate you provided but it didn't sent push
@andrew-bibby sir i am using https://github.com/davibennun/laravel-push-notification/ but push notification doesn't go to ios device any more i even installed the certificate you provided but it didn't sent push
you use 6 years old package that uses different APNS type. This package uses new Apple APNs HTTP/2 connection and of course it's working absolutly different
I have a AWS EC2 instance running a Laravel 7.3 application with Laravel notification APN channel (2.3). Up until two weeks back the push notifications were working just fine. But now it is not working. I'm not getting any errors and the push notification requests are processed from the server but push notifications are not getting delivered. Can anyone guide me what could be the reason?
FYI: I haven't made any server side or code level changes within the last two weeks.