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
Hi @Capricair, thanks for reaching out to us. If you are receiving this error, it means that this method should be use in the regular client code and not in service worker. Cookies aren't available in service workers, and Analytics requires cookies to work.
This seems to be out of scope for Firebase JS SDK. There doesn't seem to be a bug, and Analytics will not work in a service worker context and for additional information (see #2243 (comment)). I'll be closing this issue now. If you encounter another issue, feel free to create a new one.
Operating System
Windows 10
Browser Version
Chrome/114
Firebase SDK Version
10.1.0
Firebase SDK Product:
Analytics
Describe your project's tooling
nextjs app with webpack
Describe the problem
getAnalytics(app)
throw window is not defined error in service workerSteps and code to reproduce issue
The text was updated successfully, but these errors were encountered: