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]: Shiny.Push.FirebaseMessaging doesn't work on iOS (Requires updated binding) #1571

Open
8 of 12 tasks
ewerspej opened this issue Feb 27, 2025 · 6 comments
Open
8 of 12 tasks
Labels
bug Something isn't working

Comments

@ewerspej
Copy link

ewerspej commented Feb 27, 2025

Component/Nuget

Push - Native (Shiny.Push)

What operating system(s) are effected?

  • iOS (13+ supported)
  • Mac Catalyst
  • Android (10+ supported)

Version(s) of Operation Systems

iOS 18.1.1 and higher

Hosting Model

  • MAUI
  • Native/Classic Xamarin
  • Manual

Steps To Reproduce

  1. Use sample project (https://github.com/ewerspej/shinypushbug)
  2. Configure values for Firebase in appsettings.json
  3. Use provisioning profile with push notifications enabled
  4. Deploy app to iOS device (e.g. iPhone) running iOS 18.1.1 or higher
  5. Register for push token
  6. Hit UnRegister button
  7. The call to pushManager.UnRegister(); will throw

Expected Behavior

No exception, device successfully unregistered

Actual Behavior

A NullReferenceException is thrown inside the PushManager when UnRegister() is called

This happens with versions 3.3.3 as well as 3.3.4

Exception or Log output

System.NullReferenceException: Object reference not set to an instance of an object.
at Shiny.Push.FirebasePushProvider.UnRegister()
at Shiny.Push.PushManager.UnRegister()
at PushTesting.MainViewModel.<>c__DisplayClass0_0.<<-ctor>b__6>d.MoveNext() in Q:\repos\pushtester\PushEndToEnd\MainViewModel.cs:line 59

Reproducible Code Sample (should be Small, Shiny specific, Compile & Run)

https://github.com/ewerspej/shinypushbug

Code of Conduct

  • I have supplied a reproducible sample that is small, shows the specific issue, compiles, runs, and is NOT FROM THE SHINY SAMPLES!
  • I am using the LATEST STABLE version from nuget (v3.3.4)
  • I am Sponsor OR My GitHub account is 30+ days old
  • I acknowledge that this is not technical support and that the maintainer(s) are not here as teachers or to diagnose logs
  • I understand that this is not a paid product, it is FREE code that I am using, and that documentation may not be perfect.
  • I acknowledge that any form of swearing or general abuse towards the maintainer(s) will result in my immediate ban.
@ewerspej ewerspej added bug Something isn't working unverified This issue has not been verified by a maintainer labels Feb 27, 2025
@aritchie
Copy link
Member

Firebase on iOS doesn't have the updated binding at this time.

@aritchie
Copy link
Member

Also - please be respectful of the terms. I don't take issue reports for samples on here because they fall out of date for various reasons

@ewerspej
Copy link
Author

@aritchie Thanks for the quick reply.

Firebase on iOS doesn't have the updated binding at this time.

So it's a Firebase issue and not related to the Shiny.Push library? Or what would be required to fix that?

Also - please be respectful of the terms. I don't take issue reports for samples on here because they fall out of date for various reasons

Totally understandable and I do respect the terms. However, I think the pushtester sample repo is a valid example for the problem I described. Whether I create a new sample or not wouldn't make a difference in this particular case, I suppose. I tried with both 3.3.3 and 3.3.4.

@aritchie
Copy link
Member

So it's a Firebase issue and not related to the Shiny.Push library? Or what would be required to fix that?

Shiny needs to use a new firebase iOS binding. I've started one in v4, but I'm not working on completion yet due to other projects and I don't require firebase for iOS myself

However, I think the pushtester sample repo is a valid example for the problem I described

The terms are clear. You can't pick and choose how you feel they apply. So please... no more of this in the future. It gives the notion to other users that they can start doing this and the simple fact, I have too many things to keep up to date. If you can't post your own sample, than you're basically just saying "you need to fix this".

@aritchie aritchie changed the title [Bug]: Calling UnRegister() on iOS throws NullReferenceException [Bug]: Shiny.Push.FirebaseMessaging doesn't work on iOS (Requires updated binding) Feb 27, 2025
@aritchie aritchie pinned this issue Feb 27, 2025
@aritchie aritchie removed the unverified This issue has not been verified by a maintainer label Feb 27, 2025
@ewerspej
Copy link
Author

ewerspej commented Feb 27, 2025

@aritchie I've created a sample repository for the reproduction of the issue (https://github.com/ewerspej/shinypushbug)

BTW: Registering and receiving notifications works. Only unregistering is where it fails.

@aritchie
Copy link
Member

Thank you for the repro. I'm not sure how it could be working since Google deprecated the native api which the binding is against months ago and said it wouldn't work. The only thing that can be null in this code is the messaging instance from the binding anyhow, so it has issues in any case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants