web-push-php icon indicating copy to clipboard operation
web-push-php copied to clipboard

size of payload must not be greater than 4078 octets

Open hudakhshfeh opened this issue 2 years ago • 1 comments

Sometimes this error appears on some transmissions, although it successfully sends the same message to other people What is the cause of this error and how do I correct it Help please

hudakhshfeh avatar Apr 02 '23 08:04 hudakhshfeh

Hello, There are not real standards for push notification services, and some does not support this playload lenght. If affects the push behavior on some browsers as Firefox for Android. Reducing the playload lenght and automatic padding can be a solution :

$webPush = new WebPush();
$webPush->setAutomaticPadding(2048);

DorianThDev avatar Apr 26 '23 02:04 DorianThDev

Yes, see #108

Minishlink avatar Mar 06 '24 11:03 Minishlink