FlutterFlow / flutterflow-issues

A community issue tracker for FlutterFlow.
113 stars 19 forks source link

Push Notifications not opening destination page when clicked #2765

Closed danny-support-flutterflow closed 1 month ago

danny-support-flutterflow commented 4 months ago

Has your issue been reported?

Current Behavior

When a push notification is received by an application that is paused and not in view, if the user clicks on the notification, the app opens to the home page and does not navigate to the page that the push notification is supposed to open.

Expected Behavior

Once a notification is clicked, it is supposed to open the destination page if it was set when triggering the push notification.

Steps to Reproduce

To reproduce the issue in a new project, follow these steps:

  1. Open the FlutterFlow project at the provided link.
  2. On a mobile device, click 'login user 2', then minimize the app without completely closing it.
  3. On a test mode or the notification triggering device, click 'login user 1'.
  4. In the list of users, click 'Danny 2'. This action should trigger a notification and send it to the mobile device.

Reproducible from Blank

Bug Report Code (Required)

IT4KiM/qx5BgobhG0LrUdMJVgjgRNmY5a7swltV9ewkbJbbzG7l/TMnOVBJuOLC0TWNLfFmWmnkKwN3emvDuU8YCFAecR75bwc1ITzzJUkKub4yTBau8Om5/DdFQfx2i58CJsxV5KrJhW1I+61+UCfKvVj3rJr74DHoROvm1OZCK2SrDX1iXc2URm05KZDPz

Context

Users should be navigated to the page specified in the push notification metadata. However, this doesn't happen when the application is in a paused state and not in view. It only occurs when the application is fully closed and not in memory.

Visual documentation

image (2)

image (3)

Additional Info

No response

Environment

- FlutterFlow version: v4.1.34+ released April 16, 2024
- Platform: Android
- Browser name and version: Chrome, Version 123.0.6312.123 (Official Build) (arm64)
- Operating system and version affected: Android 13
byrondowns commented 4 months ago

This is a big issue for us, not having push notifications open the correct page makes our app have poor UX

Surely this is key for everyone that uses push notifications

Can someone please progress?

rzambroni commented 4 months ago

Hey @byrondowns, i sent this to the team so they can take a look. We will update the status here once it is fixed.

Thanks!

byrondowns commented 4 months ago

Hey @byrondowns, i sent this to the team so they can take a look. We will update the status here once it is fixed.

Thanks!

Thank you @rzambroni !

byrondowns commented 4 months ago

@sbis04 hi, have you reviewed this issue yet?

vinayakagw commented 3 months ago

Any update on this yet?

byrondowns commented 3 months ago

Can we please get an update? This is a major issue for us

Leonardo-Faria-Oliveira commented 2 months ago

I'm having this issue too, is there any update?

flp88 commented 2 months ago

Addressing this issue is crucial for all users who rely on initial page parameter in push notifications. It's important to ensure that when a push notification is sent, the user is directed to the correct path. This is vital for maintaining a high-quality user experience for my app.

Please, fix this issue ASAP.

taggxyz commented 2 months ago

Any update on this?

The latest version of my app cannot go live without this being fixed as I am introducing messaging functionality. A notification saying 'New message in your inbox' and only opening the homepage when you click it is pointless for me.

byrondowns commented 2 months ago

@leighajarett Can we please get a response from the flutterflow team on this issue? I understand there are many priorities to balance, however, this is a critical issue and we have had no real response from the FF team. Where does this sit in Flutterflow's priorities?

Very disappointing being a Pro subscriber and getting no comms on a significant bug confirmed months ago

vinayakagw commented 2 months ago

Hello hello flutterflow team? Instead of releasing shiny new features, please first fix these bugs that affect the actual user facing functionalities of any application.

James5943314556 commented 2 months ago

I am having the same issue

mikemcclelland commented 1 month ago

Same. Agree that this is a critical issue.

byrondowns commented 1 month ago

Any update on this @mmearly ?

carmenchargely commented 1 month ago

This is also affecting us. Are there any updates on this bug reported?

mmearly commented 1 month ago

Hi all! I have been working on other features but am planning on investigating this soon, thank you for your patience!

mmearly commented 1 month ago

Has this only been observed on Android? A quick and dirty test on iOS seems to be working for me...

byrondowns commented 1 month ago

iOS has the issue. I've found that sometimes push notifications open correctly if the app is not already open in the background. i.e. clicking the notification launches the app, and then navigates to the page

Try having the app open in the background, and then see if notifications take you to different pages

carmenchargely commented 1 month ago

Also confirming that I've observed the issue on iOS. Thanks!

taggxyz commented 1 month ago

Yes, I have this issue on iOS also.

mmearly commented 1 month ago

I was never able to reproduce this issue, but working with another member of the team who was, we identified the cause and wrote a fix! It is currently in code review.

byrondowns commented 1 month ago

Sensational! Looking forward to notifications work soon :)

On Fri, 26 Jul 2024 at 10:01, mmearly @.***> wrote:

I was never able to reproduce this issue, but working with another member of the team who was, we identified the cause and wrote a fix! It is currently in code review.

— Reply to this email directly, view it on GitHub https://github.com/FlutterFlow/flutterflow-issues/issues/2765#issuecomment-2251597237, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7PRRRAC53NVIGNKDCJVSLZOGGVFAVCNFSM6AAAAABGOKVX2GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJRGU4TOMRTG4 . You are receiving this because you were mentioned.Message ID: @.***>

mmearly commented 1 month ago

The fix is merged in, will be cherry picked into release when the release team gets to it (I assume today/tomorrow)

jasminder commented 4 weeks ago

@mmearly Is it releaseed yet?

mmearly commented 4 weeks ago

@jasminder Yes! 🥳

taggxyz commented 4 weeks ago

@mmearly Thanks so much for being on this! I’ve just deployed and still getting the same issue, any idea why that might be?

mmearly commented 4 weeks ago

@taggxyz Oh no! If you download your code, can you confirm that in the file lib/backend/push_notifications/push_notifications_handler.dart there is now a reference to SchedulerBinding?

taggxyz commented 4 weeks ago

@mmearly Yes there is:

@override void initState() { super.initState(); SchedulerBinding.instance.addPostFrameCallback((_) { handleOpenedPushNotification(); }); }

I just tested using the FlutterFlow Push Notification function and sent a notification to myself. It opened the correct page briefly and then redirected to the ‘Logged In Page’ page specified in my Authentication settings.

Hope that helps!

mmearly commented 4 weeks ago

@taggxyz Can you send me a bug report code by right clicking anywhere in the widget tree, clicking "Get Bug Report Code," and then pasting that in here?

taggxyz commented 4 weeks ago

@mmearly Sure thing!

IT4OzMmBw41PsctK14SJc8dagmAXQzsjarxMkcF+e0obIq3NG7UIec/4VEptXbC+TVc2MWaGgmYJw83Hv+bIN8YpBxKbfIB8waphWg7jcH+XMIyIO8+SPUFSFtpKBX6f5p7YkBEnHO9sclIa3F7zFeeUVnXsH5ztIm0zL/2jCK34nX/uQ0SLb3kNh1JWeC/v

mmearly commented 4 weeks ago

@taggxyz I took a look and I think this is probably an issue with your project specifically -- whenever an app built with FF is opened, regardless of if it's from a push notification or a cold start, the logged in or entry page gets built, which I think in your case is triggering a redirect action because the action flow editor is set to run one of several redirect actions when your LoggedInRedirect page is loaded. Could you reach out to support at support@flutterflow.io or from directly within FlutterFlow to get some more personalized assistance? Thanks!

Phillewis63 commented 3 weeks ago

I am having the same issue. Here is my bug report code: IT88l8nlw49IseFG0KX1bcFFijkWCDs1bZI7m+tudwE1F4jyPIYEfPTOVE5AXu6rSlZbPlmmgVkFptbXhtn9FMEoAxurb4B4+pduVwGUf2qyRr3QDbuaQWt7L5phGhGg5LSJuSRDHOpZL0YfxWO6Lty/Hy7AJZz0O1cBHv2KUZ7XpV6pLCbrISZs7G4+M0+OC8sTZVDq+f6QspZl1eTjzw==

byrondowns commented 2 weeks ago

@mmearly yeah this is still not fixed for me either. Can this issue please be reopened?

I also have a redirect on app load like @taggxyz. However, I don't believe this is reason excuse why push notifications don't go to the right page.

Push notifications correctly open the the intended page if you click a push notification with the app NOT open in the background. The problem occurs when the app is open in the background and then a user clicks on the notification. (At least this is how I experience the issue.

Phillewis63 commented 2 weeks ago

While making a demo video ,for the app, I noticed that the pages navigate to the home page (Initial logged in page) for a split second before navigating the designated page. I wonder if that's what's causing the issues?