perfectyorg / perfecty-push-wp

WordPress plugin for self-hosted Web Push Notifications ⚡️
https://perfecty.org
GNU General Public License v2.0
85 stars 21 forks source link

Perfectly Push Plugin Install error #131

Open lalokupfer opened 2 years ago

lalokupfer commented 2 years ago

I have windows enviroment (php running on IIS) i also installed the gmp extension (and already have open ssl extension) however I get an error when installing the plugin of not being able to create the keys here: what should i do?

C:\inetpub\wp-content\plugins\perfecty-push-notifications\vendor\web-token\jwt-core\Util\ECKey.php:148 Stack trace: #0 C:\inetpub\wp-content\plugins\perfecty-push-notifications\vendor\web-token\jwt-core\Util\ECKey.php(110): Jose\Component\Core\Util\ECKey::createECKeyUsingOpenSSL() #1 C:\inetpub\wp-content\plugins\perfecty-push-notifications\vendor\web-token\jwt-key-mgmt\JWKFactory.php(75): Jose\Component\Core\Util\ECKey::createECKey() #2 C:\inetpub\wp-content\plugins\perfecty-push-notifications\vendor\minishlink\web-push\src\VAPID.php(169): Jose\Component\KeyManagement\JWKFactory::createECKey() #3 C:\inetpub\wp-content\plugins\perfecty-push-notifications\external\class-perfecty-push-external-webpush.php(40): Minishlink\WebPush\VAPID::createVapidKeys() #4 C:\inetpub\wp-content\plugins\perfecty-push-notifications\lib\class-perfecty-push-lib-push-server.php(87): Perfecty_Push_External_Webpush::createVapidKeys() #5 C:\inetpub\wp-content\plugins\perfecty-push-notifications\includes\class-perfecty-push-activator.php(42): Perfecty_Push_Lib_Push_Server::create_vapid_keys() #6 C:\inetpub\wp-content\plugins\perfecty-push-notifications\includes\class-perfecty-push-activator.php(34): Perfecty_Push_Activator::default_options() #7 C:\inetpub\wp-content\plugins\perfecty-push-notifications\perfecty-push.php(55): Perfecty_Push_Activator::activate() #8 C:\inetpub\wp-includes\class-wp-hook.php(303): activate_perfecty_push() #9 C:\inetpub\wp-includes\class-wp-hook.php(327): WP_Hook->apply_filters() #10 C:\inetpub\wp-includes\plugin.php(470): WP_Hook->do_action() #11 C:\inetpub\wp-admin\plugins.php(193): do_action() #12 {main} thrown in C:\inetpub\wp-content\plugins\perfecty-push-notifications\vendor\web-token\jwt-core\Util\ECKey.php on line 148

lalokupfer commented 2 years ago

Plugin could not be activated because it triggered a fatal error.

rwngallego commented 2 years ago

Hi,

According to the code, it's failing here in the web-token/jwt-core lib, which is an external library web-push relies on:

$jwk = self::createECKeyUsingOpenSSL($curve);

And according to the createECKeyUsingOpenSSL() function documentation, it will throw an exception if the SSL extension is not installed or the key cannot be created.

rwngallego commented 2 years ago

Apparently, this is something related to your local settings as per https://github.com/web-push-libs/web-push-php/issues/292

lalokupfer commented 2 years ago

Thanks I dont think my local settings are bad. I have many websites with the same settings, and installed over the years over 60 plugin without ever having a fatal error in activaing a new plugin. Now i have only a few to improve site speed. It is obviously a bug in your plugin... I do have openssl plugin, so the error doesnt really help.

Thanks but do you mean openssl extension? as I do have it installed. here is the list of my extensions can you please tell me what I miss? (I do have many plugins installed and it is the first time a plugin is crashing on installation) extension=php_imagick.dll extension=curl extension=fileinfo extension=gd extension=gmp extension=mbstring extension=exif ; Must be after mbstring as it depends on it extension=mysqli extension=openssl extension=soap zend_extension=opcache

lalokupfer commented 2 years ago

Forgot to mention I am running it on Php 8.0 Latest wordpress version. And one more time this is the first time a plugin fails on installation. I had installed over 60 plugins in the past... so it wasn't tested properly in different enviroments. Anyone else tested it on php 8? thanks

rwngallego commented 2 years ago

Hello, it's very hard to troubleshoot from the outside, as it looks like a problem in one of the dependencies we use. I would suggest to report and follow the issue in this thread: https://github.com/web-push-libs/web-push-php/issues/292

rwngallego commented 2 years ago

We need help from the community to troubleshoot this on Windows with IIS, as this is the problematic environment for the encryption library.