You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i want to connect to my application by phone and save token device in firestore.I run my app on https://192.IP address. I can sign in but token is not added to my firestore. if i run my app on http://localhost, i'am able to save my device token. but not on phone.
this is how i call firebase-messaging-sw.js
window.addEventListener('load', () => {
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('/firebase-messaging-sw.js')
.then(registration => {
messaging.useServiceWorker(registration)
initializePush()
})
.catch(err => console.log('Service Worker Error', err))
}
})
i always get this error.
Service Worker Error TypeError: Failed to register a ServiceWorker: A bad HTTP response code (404) was received when fetching the script.
The text was updated successfully, but these errors were encountered:
i want to connect to my application by phone and save token device in firestore.I run my app on https://192.IP address. I can sign in but token is not added to my firestore. if i run my app on http://localhost, i'am able to save my device token. but not on phone.
this is how i call firebase-messaging-sw.js
The text was updated successfully, but these errors were encountered: