Comments (17)
I have resolved the issue.
I think the main problem was with using certificate without any "passPhrase".
I have got new certificate with short "passPhrase" like 123.
Though "passPhrase" is optional, not using it created problems for me.
Other than that I have used short name for ".pem" file like "apn.pem".
Also instead of copying ".pem" files to "iosCertificates" folder,
I created the new blank ".pem" files in "iosCertificates" folder,
edited and pasted the content of downloaded ".pem" to newly created files.
Also played with "dry_run", switching it between true/false before it finally started working.
Can't remember any other weird stuff that I might have tried :)
from pushnotification.
@andresdkm
Hi,
Is the issue related to sending a push notification or trying to get the APNS feedback (getFeedback method) ? or none of those methods work for you?
Aside from that, Could you check your pem file is correctly created? maybe this post helps you.
from pushnotification.
Hi
the issue is related to sending a push notification, provided the error occurred, the pem file is generated correctly, after you add the lines that I showed above works correctly.
from pushnotification.
Thanks for that bugreport.
I've already updated the code and refactored it a bit.
Please update the package version to v2.1.6.
Could you test it to make sure?
from pushnotification.
@andresdkm
Hi,
Did you have time to try the new version? Did it work for you?
from pushnotification.
@andresdkm
Hi, I suppose you aren't facing that issue any more. So I'm closing this..
Anyway, if you think it hasn't been solved yet or you face the same issue in the future let me know and I'll open it again.
Thanks
from pushnotification.
I am facing similar issue, my composer.json version is "edujugon/push-notification": "^2.1".
May I add that just yesterday the the same code was working fine.
Any clue ?
My settings
'apn' => [
'certificate' => DIR . '/iosCertificates/'.env('APN_CERTIFICATE', 'apns-dev-cert.pem'),
// 'passPhrase' => '', //Optional
// 'passFile' => DIR . '/iosCertificates/yourKey.pem', //Optional
'dry_run' => true
]
ERROR MESSAGE
{
"message": "stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages:\nerror:14094438:SSL routines:SSL3_READ_BYTES:tlsv1 alert internal error",
"status_code": 500,
"debug": {
"line": 171,
"file": "/vendor/edujugon/push-notification/src/Apn.php",
"class": "ErrorException",
"trace": [
"#0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'stream_socket_c...', '/opt/lampp/htdo...', 171, Array)",
"#1/vendor/edujugon/push-notification/src/Apn.php(171): stream_socket_client('ssl://gateway.s...', 0, '', 60, 5, Resource id #357)",
"#2 /vendor/edujugon/push-notification/src/Apn.php(212): Edujugon\PushNotification\Apn->openConnectionAPNS()",
"#3 /vendor/edujugon/push-notification/src/PushNotification.php(163): Edujugon\PushNotification\Apn->send(Array, Array)",
"#4 /app/Http/Controllers/API/Traits/PushNotificationTrait.php(13): Edujugon\PushNotification\PushNotification->send()",
"#5 /app/Http/Controllers/API/DateController.php(112): App\Http\Controllers\API\DateController->sendPushNotification(Array, '3ce6925f43af87f...')",
]
}
}
from pushnotification.
Hi,
Was that working fine for you before updating to the last version (2.1.6) ?
from pushnotification.
Hi,
Thanks for response.
I just integrated it yesterday and tried dry run, which seemed to run and getFeedback.
But today when I executed the same code, it generated above mentioned error.
Any help in resolving it will be very helpful.
BTW I tried with different .pem file and got following errors
{
"message": "stream_socket_client(): Unable to set local cert chain file `config/iosCertificates/aps.pem'; Check that your cafile/capath settings include details of your certificate and its issuer",
"status_code": 500,
"debug": {
"line": 171,
"file": "vendor/edujugon/push-notification/src/Apn.php",
"class": "ErrorException",
"trace": [
"#0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'stream_socket_c...', '/opt/lampp/htdo...', 171, Array)",
"#1 vendor/edujugon/push-notification/src/Apn.php(171): stream_socket_client('ssl://gateway.p...', 0, '', 60, 5, Resource id #357)",
"#2 vendor/edujugon/push-notification/src/Apn.php(212): Edujugon\PushNotification\Apn->openConnectionAPNS()",
"#3 vendor/edujugon/push-notification/src/PushNotification.php(163): Edujugon\PushNotification\Apn->send(Array, Array)",
"#4 app/Http/Controllers/API/Traits/PushNotificationTrait.php(13): Edujugon\PushNotification\PushNotification->send()",
"#5 app/Http/Controllers/API/ProspectController.php(87): App\Http\Controllers\API\ProspectController->sendPushNotification(Array, '17f8ca9cba22c71...')",
]
}
}
from pushnotification.
That's weird because the package hasn't been updated today, it has same code as yesterday..
Today, when you get the error, are you trying same code as yesterday but changing dry_run value? Or also same dry_run value?
Regarding your second error message, that seems to be related to the cert details, no about the package..
In order to be able to reproduce your issue, could you send me the cert file and 1 token you are using? Then I'll try to replicate the issue and check it deeply..
If so, send it to me to [email protected]
from pushnotification.
Sorry but which by "token" what are you referring to ?
I am using ".pem" certificate without any passPhrase.
from pushnotification.
I mean any device token which you are sending push notifications
from pushnotification.
Have you changed the dry_run value from yesterday? Or you haven't changed anything and yesterday was working and today doesn't..
from pushnotification.
Changed no thing, same dry_run value "true"
from pushnotification.
I've got your mail with the requested details :)
As soon as I have some free time (maybe tomorrow) I'll try to reproduce the issue and give you an update..
from pushnotification.
Thanks
from pushnotification.
@fahadonline
Thank you for your update. :)
Glad to know you solved the issue and now, it works for you.
Anyway, I'll check all those points you mentioned above..
from pushnotification.
Related Issues (20)
- Unable to send notifications via FCM.
- Content-Type:" is not valid header name HOT 6
- Document breaking change in v4.5.1?
- [L 6.0]Testing push notification
- Breaking change in 4.5.1: Undefined index: headers HOT 2
- loc-key and loc-args on the payload
- Undefined index: headers HOT 7
- Need support of Voip
- Badge count not working with fcm
- Push notiication not working on Ios
- update to newer versions
- notifications not sendings HOT 2
- Installation issue with laravle9.2 HOT 4
- Issue in Laravel 9.2 HOT 7
- FCM Api Key HOT 2
- add support for huawei
- cannot send push notifications(ios, android)
- Error al crear $push = new PushNotification
- MissingTopic HOT 1
- Migrating from legacy FCM to HTTP v1 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pushnotification.