zaru / webpush

webpush, Encryption Utilities for Web Push protocol
MIT License
396 stars 73 forks source link

Undefined method `end_with?' for nil:NilClass #96

Closed shloimeweinberger closed 4 years ago

shloimeweinberger commented 4 years ago

I successfully installed and used this gem in my local env but when pushing to heroku i get the error below: Heroku is running Ruby 2.4.4, I tried forking the gem and using just the "decode64" vs the url_safe one but nothing doing. See screenshots with all info.

Tested it on heroku console: image

Keys: image

Keys to test: p256dh: "BHvZT7egzCyP6kABrWw4MzddvWfpnHmgis41VoAJdHxPf0L9VwUV4wrBTG0CK_PKHirthgdXQViwNNdTs_qQ8E4=" auth: "TCiIvtlR3snOu80-E-60fQ=="

shloimeweinberger commented 4 years ago

I somehow was missing my private key on the server. Works fine now.