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

Fatal Crash on ARKit with 8.9.0 (not with 8.8.0) #8895

Closed
nidegen opened this issue Nov 1, 2021 · 8 comments · Fixed by #8898
Closed

Fatal Crash on ARKit with 8.9.0 (not with 8.8.0) #8895

nidegen opened this issue Nov 1, 2021 · 8 comments · Fixed by #8898

Comments

@nidegen
Copy link

nidegen commented Nov 1, 2021

[REQUIRED] Step 1: Describe your environment

  • Xcode version: 13.1
  • Firebase SDK version: 8.9
  • Installation method: Swift Package Manager
  • Firebase Component: not sure (Auth, Core, Database, Firestore, Messaging, Storage, etc)

[REQUIRED] Step 2: Describe the problem

Steps to reproduce:

Launch ARKit while using: Auth, Firestore Listeners

Relevant Code:

Unfortunately, I am not sure where the bug gets triggered. It seems to originate in some App Check code.

What I am doing is launch a view controller for an ARKit Session. If i go back to 8.8 it works without issues.

Also what I have noticed is that tokenDidChangeNotificationName's notification observer gets called very often before the crash happens. I'd say a few dozen times per second.

Screenshot 2021-11-01 at 15 30 56
Screenshot 2021-11-01 at 15 30 43
`

@google-oss-bot
Copy link

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

@paulb777
Copy link
Member

paulb777 commented Nov 1, 2021

@nidegen Thanks for the report. The issue is likely related to the Firestore AppCheck integration that was introduced in 8.9.0

@nidegen
Copy link
Author

nidegen commented Nov 1, 2021

That's what I was also thinking, but was unable to trace the exact origin. The often called AppCheck Notification Observer of tokenDidChangeNotificationName did always have if (![[contents->app name] isEqual:notified_app_name]) { return } return in FirebaseAppCheckCredentialsProvider.

@nidegen
Copy link
Author

nidegen commented Nov 1, 2021

(Line 52 of firebase_app_check_credentials_provider_apple.mm)

@maksymmalyhin
Copy link
Contributor

@nidegen Do you install App Check SDK as well?

I guess the issue may be due to app_check == nil here so nil is passed as a notification name to the method which means the class subscribes to basically all possible notifications.

cc @schmidt-sebastian

@nidegen
Copy link
Author

nidegen commented Nov 1, 2021

Nope, I do not use it or link to it!

@schmidt-sebastian
Copy link
Contributor

The underlying issue seems to be that the AppCheck callback is processing a notification whose userInfo is not an NSDictionary. While this does not conform to the NSNotification API, this can easily happen in Objective C. 8.9.1 will start to ignore these notifications.

@paulb777
Copy link
Member

paulb777 commented Nov 2, 2021

@nidegen Firebase 8.9.1 is now available. We would appreciate your confirmation that it fixes the issue.

@firebase firebase locked and limited conversation to collaborators Dec 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.