firebase / firebase-unity-sdk

The Firebase SDK for Unity
http://firebase.google.com
Apache License 2.0
234 stars 38 forks source link

[Bug] iOS Crash when receiving Push Notification #1094

Closed jbattersby-gg closed 3 months ago

jbattersby-gg commented 3 months ago

Description

When receiving a push notification from Firebase an internal NullReferenceException occurs:

System.NullReferenceException: Object reference not set to an instance of an object.
  at Firebase.Messaging.AndroidNotificationParams.FromInternal (Firebase.Messaging.AndroidNotificationParamsInternal other) [0x00000] in <00000000000000000000000000000000>:0 
  at Firebase.Messaging.FirebaseNotification.FromInternal (Firebase.Messaging.FirebaseNotificationInternal other) [0x00000] in <00000000000000000000000000000000>:0 
  at Firebase.Messaging.FirebaseMessage.FromInternal (Firebase.Messaging.FirebaseMessageInternal other) [0x00000] in <00000000000000000000000000000000>:0 
  at Firebase.Messaging.FirebaseMessagingInternal+Listener+<>c__DisplayClass13_0.<MessageReceivedDelegateMethod>b__0 () [0x00000] in <00000000000000000000000000000000>:0 
  at Firebase.ExceptionAggregator.Wrap[T] (System.Func`1[TResult] func, T errorValue) [0x00000] in <00000000000000000000000000000000>:0 
  at Firebase.AppUtil.PollCallbacks () [0x00000] in <00000000000000000000000000000000>:0 
  at Firebase.Platform.FirebaseHandler.Update () [0x00000] in <00000000000000000000000000000000>:0 
Firebase.ExceptionAggregator:LogException(Exception)
Firebase.ExceptionAggregator:ThrowAndClearPendingExceptions()
Firebase.Platform.FirebaseHandler:Update()

NullReferenceException: Object reference not set to an instance of an object.
  at Firebase.ExceptionAggregator.ThrowAndClearPendingExceptions () [0x00000] in <00000000000000000000000000000000>:0 
  at Firebase.Platform.FirebaseHandler.Update () [0x00000] in <00000000000000000000000000000000>:0 

Reproducing the issue

No response

Firebase Unity SDK Version

12.2.0

Unity editor version

2022.3.32f1

Installation Method

.unitypackage

Problematic Firebase Component(s)

In-App Messaging

Other Firebase Component(s) in use

Analytics

Additional SDKs you are using

PlayFab

Targeted Platform(s)

Apple Platforms

Unity editor platform

Mac

Scripting Runtime

IL2CPP

Release Distribution Type

Pre-built SDK from https://firebase.google.com/download/unity

Relevant Log Output

No response

If using CocoaPods for Apple platforms, the project's Podfile.lock

Expand Podfile.lock snippet
```yml PODS: - Firebase/Analytics (11.0.0): - Firebase/Core - Firebase/Core (11.0.0): - Firebase/CoreOnly - FirebaseAnalytics (~> 11.0.0) - Firebase/CoreOnly (11.0.0): - FirebaseCore (= 11.0.0) - Firebase/Messaging (11.0.0): - Firebase/CoreOnly - FirebaseMessaging (~> 11.0.0) - FirebaseAnalytics (11.0.0): - FirebaseAnalytics/AdIdSupport (= 11.0.0) - FirebaseCore (~> 11.0) - FirebaseInstallations (~> 11.0) - GoogleUtilities/AppDelegateSwizzler (~> 8.0) - GoogleUtilities/MethodSwizzler (~> 8.0) - GoogleUtilities/Network (~> 8.0) - "GoogleUtilities/NSData+zlib (~> 8.0)" - nanopb (~> 3.30910.0) - FirebaseAnalytics/AdIdSupport (11.0.0): - FirebaseCore (~> 11.0) - FirebaseInstallations (~> 11.0) - GoogleAppMeasurement (= 11.0.0) - GoogleUtilities/AppDelegateSwizzler (~> 8.0) - GoogleUtilities/MethodSwizzler (~> 8.0) - GoogleUtilities/Network (~> 8.0) - "GoogleUtilities/NSData+zlib (~> 8.0)" - nanopb (~> 3.30910.0) - FirebaseCore (11.0.0): - FirebaseCoreInternal (~> 11.0) - GoogleUtilities/Environment (~> 8.0) - GoogleUtilities/Logger (~> 8.0) - FirebaseCoreInternal (11.1.0): - "GoogleUtilities/NSData+zlib (~> 8.0)" - FirebaseInstallations (11.1.0): - FirebaseCore (~> 11.0) - GoogleUtilities/Environment (~> 8.0) - GoogleUtilities/UserDefaults (~> 8.0) - PromisesObjC (~> 2.4) - FirebaseMessaging (11.0.0): - FirebaseCore (~> 11.0) - FirebaseInstallations (~> 11.0) - GoogleDataTransport (~> 10.0) - GoogleUtilities/AppDelegateSwizzler (~> 8.0) - GoogleUtilities/Environment (~> 8.0) - GoogleUtilities/Reachability (~> 8.0) - GoogleUtilities/UserDefaults (~> 8.0) - nanopb (~> 3.30910.0) - GoogleAppMeasurement (11.0.0): - GoogleAppMeasurement/AdIdSupport (= 11.0.0) - GoogleUtilities/AppDelegateSwizzler (~> 8.0) - GoogleUtilities/MethodSwizzler (~> 8.0) - GoogleUtilities/Network (~> 8.0) - "GoogleUtilities/NSData+zlib (~> 8.0)" - nanopb (~> 3.30910.0) - GoogleAppMeasurement/AdIdSupport (11.0.0): - GoogleAppMeasurement/WithoutAdIdSupport (= 11.0.0) - GoogleUtilities/AppDelegateSwizzler (~> 8.0) - GoogleUtilities/MethodSwizzler (~> 8.0) - GoogleUtilities/Network (~> 8.0) - "GoogleUtilities/NSData+zlib (~> 8.0)" - nanopb (~> 3.30910.0) - GoogleAppMeasurement/WithoutAdIdSupport (11.0.0): - GoogleUtilities/AppDelegateSwizzler (~> 8.0) - GoogleUtilities/MethodSwizzler (~> 8.0) - GoogleUtilities/Network (~> 8.0) - "GoogleUtilities/NSData+zlib (~> 8.0)" - nanopb (~> 3.30910.0) - GoogleDataTransport (10.1.0): - nanopb (~> 3.30910.0) - PromisesObjC (~> 2.4) - GoogleUtilities/AppDelegateSwizzler (8.0.2): - GoogleUtilities/Environment - GoogleUtilities/Logger - GoogleUtilities/Network - GoogleUtilities/Privacy - GoogleUtilities/Environment (8.0.2): - GoogleUtilities/Privacy - GoogleUtilities/Logger (8.0.2): - GoogleUtilities/Environment - GoogleUtilities/Privacy - GoogleUtilities/MethodSwizzler (8.0.2): - GoogleUtilities/Logger - GoogleUtilities/Privacy - GoogleUtilities/Network (8.0.2): - GoogleUtilities/Logger - "GoogleUtilities/NSData+zlib" - GoogleUtilities/Privacy - GoogleUtilities/Reachability - "GoogleUtilities/NSData+zlib (8.0.2)": - GoogleUtilities/Privacy - GoogleUtilities/Privacy (8.0.2) - GoogleUtilities/Reachability (8.0.2): - GoogleUtilities/Logger - GoogleUtilities/Privacy - GoogleUtilities/UserDefaults (8.0.2): - GoogleUtilities/Logger - GoogleUtilities/Privacy - nanopb (3.30910.0): - nanopb/decode (= 3.30910.0) - nanopb/encode (= 3.30910.0) - nanopb/decode (3.30910.0) - nanopb/encode (3.30910.0) - PromisesObjC (2.4.0) DEPENDENCIES: - Firebase/Analytics (= 11.0.0) - Firebase/Core (= 11.0.0) - Firebase/Messaging (= 11.0.0) SPEC REPOS: trunk: - Firebase - FirebaseAnalytics - FirebaseCore - FirebaseCoreInternal - FirebaseInstallations - FirebaseMessaging - GoogleAppMeasurement - GoogleDataTransport - GoogleUtilities - nanopb - PromisesObjC SPEC CHECKSUMS: Firebase: 9f574c08c2396885b5e7e100ed4293d956218af9 FirebaseAnalytics: 27eb78b97880ea4a004839b9bac0b58880f5a92a FirebaseCore: 3cf438f431f18c12cdf2aaf64434648b63f7e383 FirebaseCoreInternal: adefedc9a88dbe393c4884640a73ec9e8e790f8c FirebaseInstallations: d0a8fea5a6fa91abc661591cf57c0f0d70863e57 FirebaseMessaging: d2d1d9c62c46dd2db49a952f7deb5b16ad2c9742 GoogleAppMeasurement: 6e49ffac7d3f2c3ded9cc663f912a13b67bbd0de GoogleDataTransport: aae35b7ea0c09004c3797d53c8c41f66f219d6a7 GoogleUtilities: 26a3abef001b6533cf678d3eb38fd3f614b7872d nanopb: fad817b59e0457d11a5dfbde799381cd727c1275 PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47 PODFILE CHECKSUM: 38f2732c8a68405bfb714b91517ba11f90e9526e COCOAPODS: 1.14.3 ```
google-oss-bot commented 3 months ago

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

jbattersby-gg commented 3 months ago

Same thing happens with the tar package

jbattersby-gg commented 3 months ago

Crash doesn't occur with 12.1.0

argzdev commented 3 months ago

Thanks for reaching out, @jbattersby-gg. This looks like a duplicate of #1091. In order to keep a single line of communication, I'll go ahead and close this thread for now.

Feel free to continue your report on the linked thread, and kindly leave a thumbs up on the author's post. It'll help us prioritize issues based on severity. Thanks!