flutterfire icon indicating copy to clipboard operation
flutterfire copied to clipboard

🐛 [firebase_analytics] [Android Only] screen_view event is not fired when transitioning to the same screen using pushAndRemoveUntil.

Open seal-app-07 opened this issue 1 year ago • 5 comments

Bug report

Describe the bug screen_view event is not fired when transitioning to the same screen using pushAndRemoveUntil.

  • First, prepare PageA, which calls setCurrentScreen when it detects a didPush and then calls the screen_view event.
  • Next, with PageA displayed (i.e., screen_view event has been fired), Navigator's pushAndRemoveUntil is used to transition to the same PageA.
  • Finally, the new PageA is pushed and setCurrentScreen is called, but the screen_view event is not fired.

This bug only occurs on Android.

Steps to reproduce

Steps to reproduce the behavior:

  • First, prepare PageA, which calls setCurrentScreen when it detects a didPush and then calls the screen_view event.
  • Next, with PageA displayed (i.e., screen_view event has been fired), Navigator's pushAndRemoveUntil is used to transition to the same PageA.
  • Finally, the new PageA is pushed and setCurrentScreen is called, but the screen_view event is not fired.

At this point, Firebase logs the following to the console "Ignoring call to log screen view event with duplicate parameters."

Note: This event does not occur simply by firing two or more consecutive screen_view events with the same screen name. A transition using pushAndRemoveUntil is required.

Expected behavior

As with iOS, screen_view events are fired even when the transition to the same screen is doubled.

Sample project

We do not have a minimum project available.


Additional context

Add any other context about the problem here. The first thing I want to know is if this is a specification.

Flutter doctor

Run flutter doctor and paste the output below:

Click To Expand
[✓] Flutter (Channel stable, 3.3.10, on macOS 14.0 23A344 darwin-x64, locale ja-JP)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
[✓] Xcode - develop for iOS and macOS (Xcode 15.0)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.1)
[✓] VS Code (version 1.86.0)
[✓] Connected device (3 available)
    ! Error: Browsing on the local area network for iPhone13. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)
[✓] HTTP Host Availability

Flutter dependencies

Run flutter pub deps -- --style=compact and paste the output below:

Click To Expand
PASTE OUTPUT INSIDE HERE

seal-app-07 avatar Feb 08 '24 04:02 seal-app-07

@ShuheiSuzuki-07 Can you check this and see if it helps in your case or not ?

darshankawar avatar Feb 08 '24 11:02 darshankawar

@darshankawar Thanks for the reply.

It seems that the event in the link you provided is also due to duplicate parameters. However, I am Flutter app. Only MainActivity exists in my Flutter app. So it seems to be a little different.

Furthermore, my case seems to reproduce without deep linking or PUSH notifications.

seal-app-07 avatar Feb 09 '24 00:02 seal-app-07

Thanks for the update @ShuheiSuzuki-07 It seems you are on older version of the framework. Please upgrade to latest stable and also use latest versions of the flutterfire plugins and re-run your scenario to check if issue still persists or not.

darshankawar avatar Feb 09 '24 11:02 darshankawar

@darshankawar Thank you. I updated to the latest plugin and tried it. However, the problem occurs. Was this an issue that should have been fixed?

seal-app-07 avatar Feb 10 '24 01:02 seal-app-07

Thanks for the update and sorry for delay to comeback to this. Can you provide us a runnable reproducible code sample that we can use to verify this further ?

darshankawar avatar Feb 13 '24 11:02 darshankawar

We are still getting ready, sorry.

seal-app-07 avatar Feb 20 '24 07:02 seal-app-07

Hey @ShuheiSuzuki-07. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

google-oss-bot avatar Feb 29 '24 02:02 google-oss-bot

Sorry, we are still getting ready.

seal-app-07 avatar Feb 29 '24 05:02 seal-app-07

Hey @ShuheiSuzuki-07. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

google-oss-bot avatar Mar 11 '24 01:03 google-oss-bot

Since there haven't been any recent updates here, I am going to close this issue.

@ShuheiSuzuki-07 if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.

google-oss-bot avatar Mar 19 '24 01:03 google-oss-bot