mozilla / wp-web-push

Web Push plugin for WordPress - no longer actively maintained
https://wordpress.org/plugins/web-push/
Other
39 stars 15 forks source link

PHP Fatal error: Uncaught exception 'RuntimeException' with message 'Invalid data.' #298

Closed groovecoder closed 8 years ago

groovecoder commented 8 years ago

I built and installed the latest version of the code in my test wordpress server, but when I go to the web push settings page I get this error:

[Thu Apr 14 18:32:05.855989 2016] [:error] [pid 4308] [client 68.0.123.163:35787]
PHP Fatal error:  Uncaught exception 'RuntimeException' with message 'Invalid data.' in /var/www/html/wordpress/wp-content/plugins/web-push/vendor/mdanter/ecc/src/Serializer/PrivateKey/DerPrivateKeySerializer.php:95
Stack trace:
#0 /var/www/html/wordpress/wp-content/plugins/web-push/vendor/mdanter/ecc/src/Serializer/PrivateKey/PemPrivateKeySerializer.php(53): Mdanter\\Ecc\\Serializer\\PrivateKey\\DerPrivateKeySerializer->parse('')
#1 /var/www/html/wordpress/wp-content/plugins/web-push/wp-web-push-admin.php(396): Mdanter\\Ecc\\Serializer\\PrivateKey\\PemPrivateKeySerializer->parse(false)
#2 [internal function]: WebPush_Admin->options('')
#3 /var/www/html/wordpress/wp-includes/plugin.php(525): call_user_func_array(Array, Array)
#4 /var/www/html/wordpress/wp-admin/admin.php(236): do_action('settings_page_w...')
#5 /var/www/html/wordpress/wp-admin/options-general.php(10): require_once('/var/www/html/w...')
#6 {main}
  thrown in /var/www/html/wordpress/wp-content/plugins/web-push/vendor/mdanter/ecc/src/Serializer/PrivateKey/DerPrivateKeySerializer.php on line 95, referer: http://ec2-54-152-75-103.compute-1.amazonaws.com/wordpress/wp-admin/

and the page stops rendering at the public key. :cry:

wp-web-push-vapid-error
marco-c commented 8 years ago

Did you install the plugin before from the vapid branch? Could you try uninstalling it (from the "Plugins" settings page, not manually) and reinstalling it?

groovecoder commented 8 years ago

Yes, I removed the entire directory and .zip from my wp-content/plugins/ before I uploaded and unzipped the new version. :neutral_face:

marco-c commented 8 years ago

Can you try uninstalling it from the "Plugins" settings page instead of manually? Your Private Key is empty, which means there was an error during installation. Uninstalling it from the "Plugins" page will clear the plugin's data.