Code Monkey home page Code Monkey logo

Comments (10)

andrew-bibby avatar andrew-bibby commented on August 22, 2024 3

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.

from apn.

dwightwatson avatar dwightwatson commented on August 22, 2024 2

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).

from apn.

ArjenNZ avatar ArjenNZ commented on August 22, 2024 1

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.

from apn.

kniyer007 avatar kniyer007 commented on August 22, 2024

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: edamov/pushok#121 (comment)
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.

from apn.

fahad-larasoft avatar fahad-larasoft commented on August 22, 2024

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]
#0 /home/forge/my-app/vendor/laravel-notification-channels/apn/src/ApnChannel.php(79): Pushok\Client->push()
#1 /home/forge/my-app/vendor/laravel-notification-channels/apn/src/ApnChannel.php(58): NotificationChannels\Apn\ApnChannel->sendNotifications(Object(Pushok\Client), Object(NotificationChannels\Apn\ApnMessage), Array)
#2 /home/forge/my-app/vendor/laravel/framework/src/Illuminate/Notifications/NotificationSender.php(148): NotificationChannels\Apn\ApnChannel->send(Object(App\Models\User), Object(App\Notifications\PushNotification))
#3 /home/forge/my-app/vendor/laravel/framework/src/Illuminate/Notifications/NotificationSender.php(106): Illuminate\Notifications\NotificationSender->sendToNotifiable(Object(App\Models\User), '380b6111-d0ad-4...', Object(App\Notifications\PushNotification), 'NotificationCha...')
#4 /home/forge/my-app/vendor/laravel/framework/src/Illuminate/Support/Traits/Localizable.php(19): Illuminate\Notifications\NotificationSender->Illuminate\Notifications\{closure}()
#5 /home/forge/my-app/vendor/laravel/framework/src/Illuminate/Notifications/NotificationSender.php(109): Illuminate\Notifications\NotificationSender->withLocale(NULL, Object(Closure))
#6 /home/forge/my-app/vendor/laravel/framework/src/Illuminate/Notifications/ChannelManager.php(54): Illuminate\Notifications\NotificationSender->sendNow(Object(Illuminate\Database\Eloquent\Collection), Object(App\Notifications\PushNotification), Array)
#7 /home/forge/my-app/vendor/laravel/framework/src/Illuminate/Notifications/SendQueuedNotifications.php(104): Illuminate\Notifications\ChannelManager->sendNow(Object(Illuminate\Database\Eloquent\Collection), Object(App\Notifications\PushNotification), Array)
#8 /home/forge/my-app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\Notifications\SendQueuedNotifications->handle(Object(Illuminate\Notifications\ChannelManager))
#9 /home/forge/my-app/vendor/laravel/framework/src/Illuminate/Container/Util.php(40): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#10 /home/forge/my-app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure(Object(Closure))
#11 /home/forge/my-app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#12 /home/forge/my-app/vendor/laravel/framework/src/Illuminate/Container/Container.php(610): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#13 /home/forge/my-app/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(128): Illuminate\Container\Container->call(Array)
#14 /home/forge/my-app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Bus\Dispatcher->Illuminate\Bus\{closure}(Object(Illuminate\Notifications\SendQueuedNotifications))
#15 /home/forge/my-app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Notifications\SendQueuedNotifications))
#16 /home/forge/my-app/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(132): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#17 /home/forge/my-app/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(118): Illuminate\Bus\Dispatcher->dispatchNow(Object(Illuminate\Notifications\SendQueuedNotifications), false)
#18 /home/forge/my-app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Queue\CallQueuedHandler->Illuminate\Queue\{closure}(Object(Illuminate\Notifications\SendQueuedNotifications))
#19 /home/forge/my-app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Notifications\SendQueuedNotifications))
#20 /home/forge/my-app/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(120): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#21 /home/forge/my-app/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(70): Illuminate\Queue\CallQueuedHandler->dispatchThroughMiddleware(Object(Illuminate\Queue\Jobs\RedisJob), Object(Illuminate\Notifications\SendQueuedNotifications))
#22 /home/forge/my-app/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php(98): Illuminate\Queue\CallQueuedHandler->call(Object(Illuminate\Queue\Jobs\RedisJob), Array)
#23 /home/forge/my-app/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(406): Illuminate\Queue\Jobs\Job->fire()
#24 /home/forge/my-app/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(356): Illuminate\Queue\Worker->process('redis', Object(Illuminate\Queue\Jobs\RedisJob), Object(Illuminate\Queue\WorkerOptions))
#25 /home/forge/my-app/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(307): Illuminate\Queue\Worker->runJob(Object(Illuminate\Queue\Jobs\RedisJob), 'redis', Object(Illuminate\Queue\WorkerOptions))
#26 /home/forge/my-app/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(116): Illuminate\Queue\Worker->runNextJob('redis', 'default', Object(Illuminate\Queue\WorkerOptions))
#27 /home/forge/my-app/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(100): Illuminate\Queue\Console\WorkCommand->runWorker('redis', 'default')
#28 /home/forge/my-app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\Queue\Console\WorkCommand->handle()
#29 /home/forge/my-app/vendor/laravel/framework/src/Illuminate/Container/Util.php(40): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#30 /home/forge/my-app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure(Object(Closure))
#31 /home/forge/my-app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#32 /home/forge/my-app/vendor/laravel/framework/src/Illuminate/Container/Container.php(610): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#33 /home/forge/my-app/vendor/laravel/framework/src/Illuminate/Console/Command.php(136): Illuminate\Container\Container->call(Array)
#34 /home/forge/my-app/vendor/symfony/console/Command/Command.php(256): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#35 /home/forge/my-app/vendor/laravel/framework/src/Illuminate/Console/Command.php(121): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#36 /home/forge/my-app/vendor/symfony/console/Application.php(971): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#37 /home/forge/my-app/vendor/symfony/console/Application.php(290): Symfony\Component\Console\Application->doRunCommand(Object(Illuminate\Queue\Console\WorkCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#38 /home/forge/my-app/vendor/symfony/console/Application.php(166): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#39 /home/forge/my-app/vendor/laravel/framework/src/Illuminate/Console/Application.php(93): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#40 /home/forge/my-app/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(129): Illuminate\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#41 /home/forge/my-app/artisan(37): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#42 {main}

from apn.

KoIIIeY avatar KoIIIeY commented on August 22, 2024

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.

from apn.

sarveshamrit avatar sarveshamrit commented on August 22, 2024

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?

from apn.

andrew-bibby avatar andrew-bibby commented on August 22, 2024

@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-----

from apn.

sarveshamrit avatar sarveshamrit commented on August 22, 2024

@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

from apn.

KoIIIeY avatar KoIIIeY commented on August 22, 2024

@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

from apn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.