-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Cannot log screen view event when the app is not active #7577
Comments
I found a few problems with this issue:
|
Hey @KelvinJin, sorry for the trouble you're seeing. This may be a silly suggestion, but does moving the |
@ryanwilson Hey Ryan, thanks for the reply. I tried both order but it won't work unless I add some sort of delay by using for instance I think the underlying problem is that Firebase is observing applicationWillResignActive to disable screen view tracking but sometimes when this happens, the app is actually visible and screens are being updated. One example being when you receive a phone call and that iOS phone call banner will show up from the top of your device which will put the app into non-active state. If we send screen view events during this period, it won't be captured. I couldn't really provide any constructive advice other than maybe instead of observing applicationWillResignActive, Firebase should observe applicationDidEnterBackground? It's not a big big deal for me to add some delay in order to workaround this issue but I'm worried that a random delay might cause further issues. For instance, if I delay the screen view event by 2 seconds but don't delay the following interactive events. Then the interactive events might be associated with a wrong Let me know if you have any other ideas! Thanks. |
Thanks for the detailed reply! I'm not sure all the considerations made here so I'll defer to someone who knows more than I do. @htcgh any ideas if this is working as intended or there's a way we can determine the type of non-active state here? |
Just to add to this... I'm seeing the same. My case is a bit different. I ask notification permission and as soon as the user respond, we show a new screen and this screen is not tracked
|
Any updates on this one? , we are having the same issues |
[REQUIRED] Step 1: Describe your environment
Swift Package Manager
[REQUIRED] Step 2: Describe the problem
It appears that the system FaceID/TouchID authentication prompt is putting the app into a resigned/non-active state. And sending screen_view event during the prompt is ignored by Firebase SDK due to the limitation that no screen_view events are allowed when the app is not active.
The console printed out the error:
Cannot log screen view event when the app is not active
.I'm not sure what's the best way to solve this to be honest. Not sure if it's fair to assume Firebase SDK would take care of this situation.
Steps to reproduce:
Perform a FaceID/TouchID authentication as soon as the app is coming back from background while sending out a screen_view event.
Relevant Code:
The text was updated successfully, but these errors were encountered: