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
in app browser, i can't see the version, browser that open when click a link on instagram for example.
Firebase SDK Version
^9.22.2
Firebase SDK Product:
Messaging
Describe your project's tooling
Vue 3 app with Vite and Quasar in PWA mode
Describe the problem
The issue
When I import the firebase/messaging it executes the method registerMessagingInWindow() globally in the packages/messaging/src/index.ts#45 and it's a problem because the navigator.serviceWorker don't exists in the in-app browser of iOS braking all the page.
Workaround solution:
I'm importing dynamically the firebase/messaging like
And I'm checking if the browser is in-app browser with:
const ua = navigator.userAgent || navigator.vendor || window.opera || '';
const inAppBrowser = /instagram|fbav|twitter|GSA|tiktok/i.test(ua);
if (inAppBrowser) {
return;
}
if it's an in-app browser i don't want to handle messaging cuz they don't should do it.
Steps and code to reproduce issue
Just create any project with Webpack or Vite and import firebase/messaging in any place of your code statically and try to open this page in the iOS 16 in-app browser like Instagram or Google.
The text was updated successfully, but these errors were encountered:
Operating System
iOS 16.0
Browser Version
in app browser, i can't see the version, browser that open when click a link on instagram for example.
Firebase SDK Version
^9.22.2
Firebase SDK Product:
Messaging
Describe your project's tooling
Vue 3 app with Vite and Quasar in PWA mode
Describe the problem
The issue
When I import the
firebase/messaging
it executes the methodregisterMessagingInWindow()
globally in thepackages/messaging/src/index.ts#45
and it's a problem because thenavigator.serviceWorker
don't exists in the in-app browser of iOS braking all the page.Workaround solution:
I'm importing dynamically the
firebase/messaging
likeAnd I'm checking if the browser is in-app browser with:
if it's an in-app browser i don't want to handle messaging cuz they don't should do it.
Steps and code to reproduce issue
Just create any project with Webpack or Vite and import
firebase/messaging
in any place of your code statically and try to open this page in the iOS 16 in-app browser like Instagram or Google.The text was updated successfully, but these errors were encountered: