Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error for vapid #192

Open
sedighem opened this issue Jul 19, 2023 · 5 comments
Open

error for vapid #192

sedighem opened this issue Jul 19, 2023 · 5 comments

Comments

@sedighem
Copy link

when i run
php artisan webpush:vapid

I have this error
RuntimeException

Unable to create the key

at vendor\web-token\jwt-core\Util\ECKey.php:98
94▕ 'curve_name' => self::getOpensslCurveName($curve),
95▕ 'private_key_type' => OPENSSL_KEYTYPE_EC,
96▕ ]);
97▕ if ($key === false) {
➜ 98▕ throw new RuntimeException('Unable to create the key');
99▕ }
100▕ $result = openssl_pkey_export($key, $out);
101▕ if ($result === false) {
102▕ throw new RuntimeException('Unable to create the key');

1 vendor\web-token\jwt-core\Util\ECKey.php:72
Jose\Component\Core\Util\ECKey::createECKeyUsingOpenSSL("P-256")

2 vendor\web-token\jwt-key-mgmt\JWKFactory.php:69
Jose\Component\Core\Util\ECKey::createECKey("P-256", [])

@daronspence
Copy link
Contributor

I also just ran into this error. macOS using the new Herd app that was released at Laracon US 2023.

@daronspence
Copy link
Contributor

I was able to generate the keys by using the php binary included in Homebrew. The binary provided by Herd does not appear to have all of the required extensions configured correctly to generate certs

@joshuasanjuan1717
Copy link

Download and install openssl on your pc

@daronspence
Copy link
Contributor

@joshuasanjuan1717 I have a mac with openssl already installed. It's was a problem with the linked binary in my case.

@noname00AMD
Copy link

+1 but on windows 10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants