Comments (7)
Hello Minishlink,
I tried to send push using V4, but code throwing new error messages. Please find error message below.
1) Warning: hex2bin(): Hexadecimal input string must have an even length in C:\Users\Admin\Dropbox\phpws\web-push-php-example\vendor\minishlink\web-push\src\Utils.php on line 60
2) Warning: hex2bin(): Hexadecimal input string must have an even length in C:\Users\Admin\Dropbox\phpws\web-push-php-example\vendor\minishlink\web-push\src\Utils.php on line 61
3) Fatal error: Uncaught TypeError: bin2hex() expects parameter 1 to be string, boolean given in C:\Users\Admin\Dropbox\phpws\web-push-php-example\vendor\minishlink\web-push\src\Encryption.php on line 94
4) TypeError: bin2hex() expects parameter 1 to be string, boolean given in C:\Users\Admin\Dropbox\phpws\web-push-php-example\vendor\minishlink\web-push\src\Encryption.php on line 94
from web-push-php.
@kanishkdudeja yeah me too. Tried more than 15+ tokens and their corresponding keys etc didn't get a result. Then switched to google's node.js library and it worked.
from web-push-php.
Yep, same here. I keep getting:
Fatal error: Uncaught exception 'RuntimeException' with message 'Curve curve(-3, 41058363725152142129326129780047268409114441015993725554835256314039467401291, 115792089210356248762697446949407573530086143415290314195533631308867097853951) does not contain point (4918410515761654444245044766134315055690937175350732461240884756267261219282, 6958983596947047513192093070725538977923166797291921065363057851985837714368)' in...
.
from web-push-php.
Hi,
Please look at the other open issues before creating a new one. This is the same as #12 and should be resolved by #13, but you can fix this already by correctly using the regular base 64 encoding (MIME spec) instead of the URL-safe variant.
BCXxO8IhPp_PVjnfx7TugJA3gYdQd3jZUzfcinsjiLjtCL_uJf_2Y9fK8HYkAp2ot6FXs5q7ZFOzdiNlttThpdA=
is clearly Base64 URL safe encoded and so does your auth tokens.
from web-push-php.
Hi Minishlink,
I am using https://github.com/Minishlink/web-push-php-example to send push using VAPID.
In 50% cases above code is working fine but in other 50% cases i am getting error. Please find error message below.
Fatal error: Uncaught exception 'RuntimeException' with message 'Curve curve(-3, 41058363725152142129326129780047268409114441015993725554835256314039467401291, 115792089210356248762697446949407573530086143415290314195533631308867097853951) does not contain point (3241839770838454464458762781498604280851602814305279715423694631606457933959, 5171447275398088959133285509003806382170852108135282320327383382674674072772)' in C:\xxxxxxxxx\vendor\mdanter\ecc\src\Primitives\Point.php on line 100
I am using you latest branch from git.
My src/Encryption.php file already using
$userPublicKey = Base64Url::decode($userPublicKey);
$userAuthToken = Base64Url::decode($userAuthToken);
Please find 2 endpoint, key and token below that is throwing error.
==============1st============
'https://fcm.googleapis.com/fcm/send/cpzPHMsiSA0:APA91bEGvnuuYdJXZ3ZBMaDV7xyTm4m4lvWdovaqDCW_-tZokZtiU4ieqJKDuRshbngHYDI_P4NDesbNOPp77q125PzJxH8BrQ2g3kw5pOMZe-tSE_0UnJr6O2d6otgxbtwLzOa574P1',
'BHK tD4LOUcd3K5fmRhMeNiRy22MZrObmqVh1BYxssgh7bu94ayrgR0gP4Vf92HZk6r/sSUxcMY8ErMjws7i8xI=',
'5536inU7PxmfxdshX2DnNQ==',
==============2nd============
'https://fcm.googleapis.com/fcm/send/fiOncCrPinU:APA91bFwNavvta0ZvzuWREmM4FKZ7fT5halVyxOXJ7Z8WuaQeU11fnjwKW_mCTLD754NOXNPyAeV3hjn6iKwWFTWZvt15TYTCy0kd9-XNLYnIF5Lq4dVTE-PVMK4TkItEbq9-sEwpb2J',
'BDtWy4HfhkfyXAJnP51PLsldXvRI8Gyj2OGDQbklvUCFBNBpyU/nJg0ytb4enzQc5DoLIGqllKeFLRpNDvvirgA=',
'F WPP1RQd/nfoDOss rEHQ=='
from web-push-php.
Hi Spomky,
Your solution is "Closing as it looks like the issue came from a double encoding.", But at what point double encoding is happening ( Link : phpecc/phpecc#235)?
If double encoding is the issue, then why i am getting this issue in 50% cases?
from web-push-php.
Hello @akhilesh-kk2, can you try with v4 (or v3)? If the problem is still there please open a new issue (I totally forgot you commented on this one)
from web-push-php.
Related Issues (20)
- cURL error 28: NSS: client certificate not found (nickname not specified)
- event.data is always null HOT 8
- Shared device question HOT 2
- Get subscription from report (in case of error) HOT 2
- Pass a custom variable to flush() HOT 1
- some subscribers get 403 Error HOT 1
- Successfull message but nothing happens HOT 1
- Consider using `GuzzleHttp\Pool` in `flush` HOT 5
- web app ios error
- size of payload must not be greater than 4078 octets HOT 2
- Não estou conseguindo implantar n meu sistema, alguem quer um freelance para fazer isso? HOT 1
- Help with frontend HOT 4
- Notification not sent due to hex2bin() error
- 12x performance difference between windows and linux HOT 1
- Migration to new Firebase HTTPv1 api's question. HOT 2
- Make $supportedContentEncodings publicly available or implement encoding negotiation
- $report->isSuccess() always returns true with web.push.apple.com HOT 4
- Remove legacy code and updates HOT 3
- Abandoned packages HOT 4
- Push Notification in IOS 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 web-push-php.