I recently ran into the exact same issue.
The problem in my setup was that I had a too optimistic TTL header when sending the the push payload to the service (i.e. TTL: 60
). With an increased amount of TTL: 3600
I do get the service worker to receive the push message and show the notification - without unlocking the device, and having it locked for more than 5 minutes - after around 10-15 minutes of being sent.
Did you configure a TTL
for the push payload?
I suppose it's not only the push service (i.e FCM / Mozilla Push) that can disregard the message after the TTL has expired (usually, these are faster than 10 minutes when the phone is actually reachable), but also the browser itself.