Dsek-LTH/mataDor

Notification crashes on mobile while deployed

Closed this issue · 5 comments

I redeloyed and mat.10av10.com works but looks a bit wonky on firefox for mobile but not in chrome on mobile. It works locally when "pretending" to be phone but not when a real phone :( Do you know how to debug? @wanecek

Debugged it to be that new Notification isn't supported via alerts all over the code :l We could polyfill it if that's the issue?

https://caniuse.com/#search=Notification seems to indicate it should work on chrome, though???

Strange... Don't have any experience with using the notification API like this before, sorry... The only sanity-check I can think of is that you're actually on https?

Otherwise, I suggest trying to remote debug it (i.e. debug the code that actually runs on your phone). If I recall correctly, this article is pretty good :)

Thanks for the tip! I found that chrome on android doesn't like the new Notification constructor!°

Chrome seems to need the service worker to do the notifying, added something small from stackover flow to solve it