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
$webPush = new WebPush();
$report = $webPush->sendOneNotification($sub , $payload);
result -error
2022/04/13 22:39:46 [error] 368579#368579: *717 FastCGI sent in stderr:
"PHP message: PHP Fatal error: Uncaught TypeError:
Argument 1 passed to Jose\Component\Core\Util\Ecc\PrivateKey::create()
must be an instance of Brick\Math\BigInteger,
instance of GMP given,
called in /var/www/public/push/vendor/minishlink/web-push/src/Encryption.php on line 355
and defined in /var/www/public/push/vendor/web-token/jwt-util-ecc/PrivateKey.php:57
same error with #338
Setup
UBUNTU 20.04 LTS
PHP-FPM 7.4.3
web-push-php Version: 7.0.0
Chrome-100
Features Used
code
use Minishlink\WebPush\WebPush;
use Minishlink\WebPush\Subscription;
require_once "vendor/autoload.php";
$sub = Subscription::create(
[ "endpoint" => 'https://fcm.googleapis.com/fcm/send/fAPQ61 ------- uf',
"keys" => [
'p256dh'=>'BD --------------------- Tw' ,
'auth' => 'f --------- w'
] ,
]) ;
$payload = '{"msg":"Hello World!"}' ;
$webPush = new WebPush();
$report = $webPush->sendOneNotification($sub , $payload);
result -error
2022/04/13 22:39:46 [error] 368579#368579: *717 FastCGI sent in stderr:
"PHP message: PHP Fatal error: Uncaught TypeError:
Argument 1 passed to Jose\Component\Core\Util\Ecc\PrivateKey::create()
must be an instance of Brick\Math\BigInteger,
instance of GMP given,
called in /var/www/public/push/vendor/minishlink/web-push/src/Encryption.php on line 355
and defined in /var/www/public/push/vendor/web-token/jwt-util-ecc/PrivateKey.php:57
Stack trace:
#0 /var/www/public/push/vendor/minishlink/web-push/src/Encryption.php(355): Jose\Component\Core\Util\Ecc\PrivateKey::create()
#1 /var/www/public/push/vendor/minishlink/web-push/src/Encryption.php(105): Minishlink\WebPush\Encryption::calculateAgreementKey()
#2 /var/www/public/push/vendor/minishlink/web-push/src/Encryption.php(61): Minishlink\WebPush\Encryption::deterministicEncrypt()
#3 /var/www/public/push/vendor/minishlink/web-push/src/WebPush.php(224): Minishlink\WebPush\Encryption::encrypt()
#4 /var/www/public/push/vendor/minishlink/web-push/src/WebPush.php(171): Minishlink\WebPush\WebPush->prepare()
The text was updated successfully, but these errors were encountered: