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

FCM plugin exception - Namespace SPRINGBOARD, Code 0x8badf00d #28

Closed
meghanadixit1 opened this issue Apr 1, 2020 · 16 comments
Closed

Comments

@meghanadixit1
Copy link

Facing below exception while using FCM plugin.
This is observed in iOS device only, n every app launch app is crashing.

Incident Identifier: 1467E172-6976-4820-BC8F-EC117C872B1A
CrashReporter Key: c6d17c65815372ba349e2a14fc1fcc9a155742c0
Hardware Model: iPhone8,1
Process: MyAppName [394]
Path: /private/var/containers/Bundle/Application/EC6C615A-938D-4771-8CA5-5B0C7BF58FCA/MyAppName.app/MyAppName
Identifier: MyPackageName
Version: 0.6.2 (0.6.2)
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: MyPackageName [490]

Date/Time: 2020-03-27 17:44:05.4206 +0530
Launch Time: 2020-03-27 17:43:44.7608 +0530
OS Version: iPhone OS 13.3 (17C54)
Release Type: User
Baseband Version: 7.30.02
Report Version: 104

Exception Type: EXC_CRASH (SIGKILL)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace SPRINGBOARD, Code 0x8badf00d
Termination Description: SPRINGBOARD, scene-create watchdog transgression: application:394 exhausted real (wall clock) time allowance of 19.78 seconds | ProcessVisibility: Foreground | ProcessState: Running | WatchdogEvent: scene-create | WatchdogVisibility: Foreground | WatchdogCPUStatistics: ( | "Elapsed total CPU time (seconds): 20.470 (user 20.470, system 0.000), 51% CPU", | "Elapsed application CPU time (seconds): 0.568, 1% CPU" | )
Triggered by Thread: 0

Thread 0 name: Dispatch queue: com.google.FirebaseInstanceID.Keychain
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x0000000185eb8634 0x185eb5000 + 13876
1 libsystem_kernel.dylib 0x0000000185eb7aa0 0x185eb5000 + 10912
2 libdispatch.dylib 0x0000000185d6a7cc 0x185d53000 + 96204
3 libdispatch.dylib 0x0000000185d6ab94 0x185d53000 + 97172
4 libxpc.dylib 0x0000000185cae440 0x185ca3000 + 46144
5 Security 0x0000000186f0d224 0x186eed000 + 131620
6 Security 0x0000000186f0dc38 0x186eed000 + 134200
7 Security 0x0000000186f8e17c 0x186eed000 + 659836
8 Security 0x0000000186f8d054 0x186eed000 + 655444
9 Security 0x0000000186f8b92c 0x186eed000 + 649516
10 Security 0x0000000186f8c2d4 0x186eed000 + 651988
11 Security 0x0000000186f8e084 0x186eed000 + 659588
12 Security 0x0000000186f89f48 0x186eed000 + 642888
13 Security 0x0000000186f8c6f4 0x186eed000 + 653044

Struggling with this issue since 3 days. PLease help ASAP!!!

@andrehtissot
Copy link
Owner

The thread dying is concerning, yes, but did experience functionality issues?

Would you be able to share a repository of which the app presents this error?

I'll investigate as soon as possible.
But until then, if you can send your findings.

Thank you

@meghanadixit1
Copy link
Author

Hi,
Thanks for reverting back!!

Below is a demo repo created. In this new project, only FCM plugin is installed and on launch the app is crashing
https://github.com/meghanadixit1/FCMDemo

When for the first time, app is installed to the device via xcode, it works well, for the subsequent launches, it crashes everytime.

Since it is crashing on app launch, we are not able to test any functionality.

Attached are the XCode logs and the mobile device logs and my environement info

IonicInfo.docx
FcmDemoLog.docx

Please let me know if any other info is required.

.

@andrehtissot
Copy link
Owner

I've found the thread firebase/firebase-ios-sdk#1399 that mentions that, this issue occurs due to keychain deadlocks.

I'll investigate possible solutions.

@meghanadixit1
Copy link
Author

Hello There,
Any updates on this??

@andrehtissot
Copy link
Owner

Hi, I've written a simple experiment, that just delay the Firebase initialisation by 10 seconds. Just to check if a solution like this could work in your case (master...andrehtissot:delayed-firebase-initialization-experiment).

So, from the root app directory, execute something like:

cd ..
git clone https://github.com/andrehtissot/cordova-plugin-fcm-with-dependecy-updated.git
cd -
cd ../cordova-plugin-fcm-with-dependecy-updated
git checkout delayed-firebase-initialization-experiment
cd -
ionic cordova plugin remove cordova-plugin-fcm-with-dependecy-updated
ionic cordova plugin add ../cordova-plugin-fcm-with-dependecy-updated

And please let me know if the crashes still happen.

@meghanadixit1
Copy link
Author

Will check and revert to you!
Thanks

@meghanadixit1
Copy link
Author

meghanadixit1 commented Apr 8, 2020 via email

@andrehtissot
Copy link
Owner

This is an error due to Androidx migration.

I suggest you to try some of the solutions found in https://stackoverflow.com/questions/51918301/program-type-already-present-android-support-v4-app-inotificationsidechannelst.

If those don't work, let me know, then you might have to use a special version of the plugin, of which won't require androidx, by not importing androidx.core.app.NotificationCompat.

@andrehtissot
Copy link
Owner

But it's good to know that this solution avoids crashing on iOS.

In the near future, I intend on implement the feature requested in #31, which, in theory would also fix the issue you found.

@meghanadixit1
Copy link
Author

HI

Tried the solution in below link-
https://stackoverflow.com/questions/51918301/program-type-already-present-android-support-v4-app-inotificationsidechannelst.

But still could not be successful.
ALso tried something as below

arnesson/cordova-plugin-firebase#1083 (comment)

But then also ran into an error

@andrehtissot
Copy link
Owner

I'll try to minimize the reliance on AndroidX dependency to avoid these compatibility issues. I'll update here, when I get it working.

@andrehtissot
Copy link
Owner

Also, just to let you know, a small delay was added to the main release version, so the first issue you mentioned (ios thread crashing), should not occur anymore.

@andrehtissot
Copy link
Owner

andrehtissot commented Apr 15, 2020

Hi @meghanadixit1, I published a new version of cordova-plugin-fcm-with-dependecy-updated@beta, which, besides a lot refactoring on the ios side, has fewer androidx dependencies.

Would you give it a try, and let me know if it fixes the build on Android, and if for iOS it still works as expected?

@andrehtissot
Copy link
Owner

The new release v5.0.0 has the changes I mentioned.

@andrehtissot
Copy link
Owner

Issue closed due to inactivity.

@meghanadixit1
Copy link
Author

Hey,
Sorry about the delayed response -
Here is the observation -
With the code in branch "delayed-firebase-initialization-experiment" the code builds and notifications are also received.
But when tested with below versions-

V5.0.0 beta
V5.0.0
V5.1.0
V6.0.0
V6.0.1

The code is built but notification is not received in iOS devices.
Can you please look into further.

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

2 participants