You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have verified in the issues that my problem hasn't already been resolved
Setup
Please provide the following details, the more info you can provide the
better.
Operating System: Linux
PHP Version: 7.1.9
web-push-php Version: 4.0.2
Please check that you have installed and enabled these PHP extensions :
gmp
mbstring
curl
openssl
Please select any browsers that you are experiencing problems with:
Chrome
Firefox
Firefox for Mobile
Opera for Android
Samsung Internet Browser
Other : MS EDGE
Please specify the versions (i.e. Chrome Beta, Firefox Beta etc).
Windows 10 - 1803. (Edge Version : 17.17134)
Problem
I use this library for more than a year without any problem. I can send WebPush to Chrome, Firefox, Opera, Yandex Browser without any problem. But I couldn't send any Webpush to Edge browser.
So the error is : Client error: POST https://bl2p.notify.windows.com/w/?token=XXXX resulted in a 401 Unauthorized response.
I tried both aesgcm and aes12gcm. I get the same error.
Please explain what behaviour you are seeing.
I get Client error: POST https://bl2p.notify.windows.com/w/?token=XXXX resulted in a 401 Unauthorized response.
Hi Guys, Finally I found the problem. For Edge browser, Endpoint length must be more around 403 chars. In db I stored endpoint in varchar 400 field. So It doesn't get full endpoint URL. Finally I altered db field to varchar(512) and problem solved.
Hi Guys, Finally I found the problem. For Edge browser, Endpoint length must be more around 403 chars. In db I stored endpoint in varchar 400 field. So It doesn't get full endpoint URL. Finally I altered db field to varchar(512) and problem solved.
Oh man, sometimes its that easy :-) Thanks for that.
NOTE: Please test in a least two browsers (i.e. Chrome and Firefox). This
helps with diagnosing problems quicker.
Setup
Problem
I use this library for more than a year without any problem. I can send WebPush to Chrome, Firefox, Opera, Yandex Browser without any problem. But I couldn't send any Webpush to Edge browser.
So the error is : Client error:
POST https://bl2p.notify.windows.com/w/?token=XXXX
resulted in a401 Unauthorized
response.I tried both aesgcm and aes12gcm. I get the same error.
I get Client error:
POST https://bl2p.notify.windows.com/w/?token=XXXX
resulted in a401 Unauthorized
response.Expected
Features Used
Example / Reproduce Case
$payload = '{"n":"1","title":"NetWork","body":"Body","zbid":16515,"icon":"//dbfukofby5ycr.cloudfront.net/m47/1/1467/d1708/37940-l.jpg","image":"//dbfukofby5ycr.cloudfront.net/m47/1/1467/d1801/9f032-webpush_network.jpg","link":"https://www.webinstats.com/products"}';
$webPush = new WebPush($Authentication,Array(),20,Array('verify'=>false));
$webPush->setAutomaticPadding(false);
for($i=0;$i<count($subscriptions);$i++) {
$subscription = Subscription::create([
'endpoint' => $subscriptions[$i]['END_POINT'],
'publicKey' => $subscriptions[$i]['USER_PUBLIC_KEY'],
'authToken' => $subscriptions[$i]['USER_TOKEN'],
'contentEncoding'=>$subscriptions[$i]['CONTENT_ENCODING']
]);
$webPush->sendNotification($subscription,$payload,false);
}
$res_final = $webPush->flush();
print_r($res_final);
Other
The text was updated successfully, but these errors were encountered: