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

com.google.firebase.perf.util.Timer.getDurationMicros NullPointerException #4730

Closed
hebehan opened this issue Mar 1, 2023 · 7 comments · Fixed by #4762
Closed

com.google.firebase.perf.util.Timer.getDurationMicros NullPointerException #4730

hebehan opened this issue Mar 1, 2023 · 7 comments · Fixed by #4762
Assignees

Comments

@hebehan
Copy link

hebehan commented Mar 1, 2023

environment

  • Android Studio version: 2022.3.1
  • Firebase Component: firebase-perf
  • Component version:20.2.0

problem

com.google.firebase.perf.util.Timer.getDurationMicros function has a NullPointerException
For details, please see the log below

Fatal Exception: java.lang.NullPointerException: Attempt to read from field 'long  
com.google.firebase.perf.util.Timer.elapsedRealtimeMicros' on a null object reference in method 'long  
com.google.firebase.perf.util.Timer.getDurationMicros(com.google.firebase.perf.util.Timer)'
       at com.google.firebase.perf.util.Timer.getDurationMicros(Timer.java:144)
       at com.google.firebase.perf.metrics.AppStartTrace.logAppStartTrace(AppStartTrace.java:320)
       at com.google.firebase.perf.metrics.AppStartTrace.lambda$t99Qe_LxxEJSDI0PgQVKJpUGMEc()
       at com.google.firebase.perf.metrics.-$$Lambda$AppStartTrace$t99Qe_LxxEJSDI0PgQVKJpUGMEc.run(:2)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
       at java.lang.Thread.run(Thread.java:1012)
@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.

@argzdev
Copy link
Contributor

argzdev commented Mar 1, 2023

Hi @hebehan, thanks for reaching out. Any chance you could share a minimal reproducible example or code snippet? Thanks!

@hebehan
Copy link
Author

hebehan commented Mar 1, 2023

This error is currently seen from the firebase console, which affects thousands of our users. I don’t have the code to reproduce it, but I think this should be a problem with the SDK itself, and I hope it can be resolved.
image

@hebehan
Copy link
Author

hebehan commented Mar 1, 2023

This library is collected by firebase itself. We have not actively called it, so I can't give you the reproduced code, but from the error report, it is obvious what the problem is. I hope you can solve it as soon as possible.

@argzdev
Copy link
Contributor

argzdev commented Mar 1, 2023

Thanks for the extra details, @hebehan. I'll let our engineers know about this.

@argzdev
Copy link
Contributor

argzdev commented Mar 1, 2023

By the way, @hebehan. While we wait for our engineers to take a look into this. I noticed that you're using an older version of the SDK. Have you tried version 20.3.1? we usually advise this to avoid us looking for issues that might've been resolved in the most recent versions. Let me know if this works. Thanks!

@hebehan
Copy link
Author

hebehan commented Mar 2, 2023

We will consider upgrading the sdk version in the future, but please also ask your engineers to confirm whether there is a fix in the new version, if not, please fix it as soon as possible, thank you

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
5 participants