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

[Bug]: OneSignal.Notifications.Clicked not called #638

Closed
1 task done
AFB-MORA opened this issue Sep 12, 2023 · 9 comments
Closed
1 task done

[Bug]: OneSignal.Notifications.Clicked not called #638

AFB-MORA opened this issue Sep 12, 2023 · 9 comments

Comments

@AFB-MORA
Copy link

AFB-MORA commented Sep 12, 2023

What happened?

OneSignal.Notifications.Clicked event not called when app opened from notification.

Steps to reproduce?

1. Install OneSignal 5.0.2
2. Initialize OneSignal with app id
3. Subscribe OneSignal.Notifications.Clicked event
4. Build project for iOS
6. Send test notification from dashboard
7. Click the notification

What did you expect to happen?

OneSignal.Notifications.Clicked event to be invoked when notification clicked.

Unity version

2022.3.2f1

OneSignal Unity SDK version

5.0.2

Platform

iOS

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@shepherd-l
Copy link
Contributor

shepherd-l commented Sep 14, 2023

To clarify, is the click event not being called in the following scenario:

  1. App is not open
  2. Send a notification
  3. Click the notification to open app
    Click handler is not being called on iOS when it should be


We are investigating this issue with the click handler not being called from an app killed state in our wrapper SDKs. Thanks for bringing this to our attention with Unity.

Let us know if you are seeing the click event not being called in other scenarios

@jawnwee
Copy link

jawnwee commented Sep 26, 2023

@shepherd-l faced the same as op. Is there a workaround on 5.0.2?

Read that setting the callbacks before initialization was a solution?

Edit: ^ tried this, but didn't work.

Thanks!

@shepherd-l
Copy link
Contributor

@jawnwee

Are you also seeing the click event not being fired in the case where clicking the notification cold starts the app?

There is no workaround in 5.0.2, but the fix will be in the next release

@jawnwee
Copy link

jawnwee commented Sep 26, 2023

@shepherd-l yeah no click event either. got a rough eta in mind for the next release? this makes it quite difficult to track our push notification retention metrics and also breaks flows for push triggering in-app events :(

Thanks for the heads up!

@jawnwee
Copy link

jawnwee commented Oct 2, 2023

@shepherd-l sorry to push you, but are there any recommendations you may have while we wait?

I currently have features that rely on the callbacks from tapping on a push (ie event firing when player opens app from tapping on push). The majority of the times, our games are launching from killed states as our game requires an online connection.

Would appreciate any solution that may help us -- is downgrading an option for us?

@shepherd-l
Copy link
Contributor

shepherd-l commented Oct 4, 2023

@jawnwee
No worries, I understand the urgency

I suspect that you can do something similar to what we did with our example project and include the OneSignal packages locally and use the packages from our latest source code (user-model/main branch) https://github.com/OneSignal/OneSignal-Unity-SDK/blob/user-model/main/OneSignalExample/Packages/packages-lock.json#L18

This bug exists in previous versions of 5.x but I’m not sure about 3.x. I also don’t recommend downgrading to 3.x because the api changes would be a lot of work.

As for the eta of the release, I am aiming for this week

@jawnwee
Copy link

jawnwee commented Oct 4, 2023

@shepherd-l

Thank you! End of week / next is good enough for us. Appreciate the follow up solution, but yeah I imagined that downgrading there wasn't going to be the solution.

Thanks again

@Trunksome
Copy link

I also don’t recommend downgrading to 3.x because the api changes would be a lot of work.

I just did all of this migration work just to find out that this piece of core functionality is not working anymore. Simply reverting the changes didn't work either, Unity seems to be broken and now i'm doing a clean reinstall. This bug is a complete show stopper for anyone interested in push notifications and should honestly be warned about somewhere.

@shepherd-l
Copy link
Contributor

5.0.3 is out! Thank you for your patience

Trucksome
Thanks for the feedback. We mention the fix in our change log and release notes. If you think we need to highlight it somewhere else, feel free to open a new issue with the feedback template or suggest edits on our documentation website

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

4 participants