Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FR: Firebase Analytics - file:// based environment support #3027

Open
patburke234 opened this issue May 6, 2020 · 1 comment
Open

FR: Firebase Analytics - file:// based environment support #3027

patburke234 opened this issue May 6, 2020 · 1 comment

Comments

@patburke234
Copy link

patburke234 commented May 6, 2020

Describe your environment

  • Operating System version: KaiOS 2.5.0
  • Browser version: Same
  • Firebase SDK version: 7.12
  • Firebase Product: analytics

Describe the problem
I am developing an app for KaiOS, a fork of the old Firefox OS, for which apps are based on HTML5 + JS. When compiling and running on device, Firebase analytics stops working. I receive an error as follows. I believe the issue is due to the fact that on device the app is served in the browser via a file:// based URL scheme rather than a http:// based scheme.

@firebase/analytics: 
DOMException: A request was placed against a transaction which is currently not active, or which is finished.

In my research, I have found that Cordova, Expo, and other file:// based environments have had issues around the use of IndexDB not being supported, which FA relies on. I can confirm that KaiOS does have full support for IndexDB, however the above issue persists.

Relevant Code:

import firebase from "firebase";
firebase.analytics().setCurrentScreen(screenName);
        
        firebase.analytics().logEvent("screen_view",
        {   
            app_name: this.AppName,
            screen_name: screenName,
            app_version: this.AppVersion  
        });

@google-oss-bot
Copy link
Contributor

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@Feiyang1 Feiyang1 changed the title Firebase Analytics - file:// based environment support FR: Firebase Analytics - file:// based environment support May 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants