braze-inc / braze-web-sdk

Public repo for the Braze Web SDK
https://www.braze.com
Other
73 stars 26 forks source link

Failed to register a ServiceWorker: The URL protocol of the current origin ('null') is not supported. #55

Closed vtrmantovani closed 5 years ago

vtrmantovani commented 5 years ago

Hi I just, downloaded the sample project and set de API key and changed my BaseUrl with my cluster, but unfortunately, I had this error:

Screen Shot 2019-06-14 at 11 16 20

I changed de baseUrl to -> https://sdk.iad-03.braze.com/api/v3

Could you help me please?

froodian commented 5 years ago

Hi @vtrmantovani,

I haven't seen this specific error before - generally in order to function properly, web push registration requires loading the site in a browser through https. From the way it says protocol of the current origin ('null'), I wonder are you loading your site normally through an https URL, or perhaps you're loading it locally in some other way such that Web Push cannot function?

vtrmantovani commented 5 years ago

Hi @froodian, Thanks

I did a server-side render with express and works o/