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

[APMIdentity appInstanceID] main thread block #6392

Closed
yingpaihuai opened this issue Sep 2, 2020 · 50 comments
Closed

[APMIdentity appInstanceID] main thread block #6392

yingpaihuai opened this issue Sep 2, 2020 · 50 comments
Assignees
Milestone

Comments

@yingpaihuai
Copy link

yingpaihuai commented Sep 2, 2020

[REQUIRED] Step 1: Describe your environment

  • Xcode version: 11.6
  • Firebase SDK version: 6.31.0
  • Firebase Component: Analytics (Auth, Core, Database, Firestore, Messaging, Storage, etc)
  • Installation method: CocoaPods

[REQUIRED] Step 2: My Question

Same issue there,For iOS 14,we have to update it. when update 'Firebase/Analytics' to 6.31.0,It happens very ofen.now this is our top one main thread block.Please try to fix it.

Sdk version:
'Firebase/Analytics' 6.31.0
Google-Mobile-Ads-SDK (>= 7.55.0)

Key Stack Info Below:

Thread 0:
0 libsystem_kernel.dylib 0x188acb93c kevent_id (in libsystem_kernel.dylib) + 8
1 libdispatch.dylib 0x18892bbf0 _dispatch_kq_poll (in libdispatch.dylib) + 332
2 libdispatch.dylib 0x18892c6dc _dispatch_event_loop_wait_for_ownership$VARIANT$mp (in libdispatch.dylib) + 412
3 libdispatch.dylib 0x18891be9c DISPATCH_WAIT_FOR_QUEUE (in libdispatch.dylib) + 296
4 libdispatch.dylib 0x18891bad4 _dispatch_sync_f_slow (in libdispatch.dylib) + 140
5 XXXX 0x102398bb4 -[APMIdentity appInstanceID] (in XXXX) + 144
6 XXXX 0x1023ac194 -[APMIdentifiers appInstanceID] (in XXXX) + 188
7 XXXX 0x10252a9a8 GADAnalyticsAdRequestDictionary (in XXXX) + 132
8 XXXX 0x1024eb840 GADAnalyticsSettingsSignalSource (in XXXX) + 168
9 XXXX 0x10251bb84 GAD_GADSignals_arm64_7_55_0 (in XXXX) + 3868
10 libdispatch.dylib 0x18896ca38 _dispatch_call_block_and_release (in libdispatch.dylib) + 24
11 libdispatch.dylib 0x18896d7d4 _dispatch_client_callout (in libdispatch.dylib) + 16
12 libdispatch.dylib 0x18891b004 _dispatch_main_queue_callback_4CF$VARIANT$mp (in libdispatch.dylib) + 1068
13 CoreFoundation 0x188ebec1c CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE (in CoreFoundation) + 12
14 CoreFoundation 0x188eb9b54 __CFRunLoopRun (in CoreFoundation) + 1924
15 CoreFoundation 0x188eb90b0 CFRunLoopRunSpecific (in CoreFoundation) + 436
16 GraphicsServices 0x18b0b979c GSEventRunModal (in GraphicsServices) + 104
17 UIKitCore 0x1b56ef978 UIApplicationMain (in UIKitCore) + 212
18 XXXX 0x1030560ec _main (in XXXX) (main.m:49)
19 libdyld.dylib 0x18897e8e0 start (in libdyld.dylib) + 4

Thread 42:
0 libsystem_kernel.dylib 0x188acb93c kevent_id (in libsystem_kernel.dylib) + 8
1 libdispatch.dylib 0x18892bbf0 _dispatch_kq_poll (in libdispatch.dylib) + 332
2 libdispatch.dylib 0x18892c2a0 _dispatch_event_loop_wake_owner$VARIANT$mp (in libdispatch.dylib) + 368
3 libdispatch.dylib 0x18891cc44 _dispatch_waiter_wake (in libdispatch.dylib) + 60
4 libdispatch.dylib 0x18891bf70 _dispatch_sync_complete_recurse (in libdispatch.dylib) + 60
5 libdispatch.dylib 0x18891bffc _dispatch_sync_invoke_and_complete_recurse (in libdispatch.dylib) + 88
6 libdispatch.dylib 0x18891baf0 _dispatch_sync_f_slow (in libdispatch.dylib) + 168
7 XXXX 0x102398bb4 -[APMIdentity appInstanceID] (in XXXX) + 144
8 XXXX 0x1023d2a20 -[APMMeasurement(Event) createRawEventMetadataWithUserAttributes:] (in XXXX) + 340
9 XXXX 0x1023d53ec -[APMMeasurement(Event) writeEvent:isPublicEvent:isRealtime:] (in XXXX) + 796
10 XXXX 0x1023d2888 __49-[APMMeasurement(Event) writeEventOnWorkerQueue:]_block_invoke (in XXXX) + 604
11 XXXX 0x1023beda8 -[APMSqliteStore performTransactionWithError:block:] (in XXXX) + 176
12 XXXX 0x10238bb14 -[APMDatabase performTransaction:] (in XXXX) + 48
13 XXXX 0x1023d254c -[APMMeasurement(Event) writeEventOnWorkerQueue:] (in XXXX) + 820
14 XXXX 0x1023d20a8 -[APMMeasurement(Event) handleEventOnWorkerQueue:] (in XXXX) + 540
15 XXXX 0x10239e580 -[APMMeasurement logEventOnWorkerQueue:notifyEventListeners:] (in XXXX) + 148
16 XXXX 0x10239e378 -[APMMeasurement logEventOnWorkerQueueWithOrigin:isPublicEvent:name:parameters:timestamp:enabled:ignoreEnabled:ignoreInterceptor:interceptor:addedScreenParameters:] (in XXXX) + 340
17 XXXX 0x10239e17c __151-[APMMeasurement logEventWithOrigin:isPublicEvent:name:parameters:timestamp:enabled:ignoreEnabled:ignoreInterceptor:interceptor:addedScreenParameters:]_block_invoke (in XXXX) + 68
18 XXXX 0x1023a9f84 __51-[APMScheduler scheduleOnWorkerQueueBlockID:block:]_block_invoke (in XXXX) + 44
19 libdispatch.dylib 0x18896ca38 _dispatch_call_block_and_release (in libdispatch.dylib) + 24
20 libdispatch.dylib 0x18896d7d4 _dispatch_client_callout (in libdispatch.dylib) + 16
21 libdispatch.dylib 0x188916320 _dispatch_lane_serial_drain$VARIANT$mp (in libdispatch.dylib) + 592
22 libdispatch.dylib 0x188916e3c _dispatch_lane_invoke$VARIANT$mp (in libdispatch.dylib) + 428
23 libdispatch.dylib 0x18891f4a8 _dispatch_workloop_worker_thread (in libdispatch.dylib) + 596
24 libsystem_pthread.dylib 0x188b4d114 _pthread_wqthread (in libsystem_pthread.dylib) + 304

Thread 68:
0 libsystem_kernel.dylib 0x188abf0f4 mach_msg_trap (in libsystem_kernel.dylib) + 8
1 libsystem_kernel.dylib 0x188abe5a0 mach_msg (in libsystem_kernel.dylib) + 72
2 libdispatch.dylib 0x188924880 _dispatch_mach_send_and_wait_for_reply (in libdispatch.dylib) + 500
3 libdispatch.dylib 0x188924d10 dispatch_mach_send_with_result_and_wait_for_reply$VARIANT$mp (in libdispatch.dylib) + 52
4 libxpc.dylib 0x188b8391c xpc_connection_send_message_with_reply_sync (in libxpc.dylib) + 204
5 Foundation 0x189aafa28 NSXPCCONNECTION_IS_WAITING_FOR_A_SYNCHRONOUS_REPLY (in Foundation) + 12
6 Foundation 0x189892f60 -[NSXPCConnection sendInvocation:orArguments:count:methodSignature:selector:withProxy:] (in Foundation) + 3608
7 CoreFoundation 0x188f3276c forwarding (in CoreFoundation) + 552
8 CoreFoundation 0x188f3475c forwarding_prep_0 (in CoreFoundation) + 92
9 CoreServices 0x1b1896ce4 -[LSApplicationWorkspace deviceIdentifierForAdvertising] (in CoreServices) + 160
10 AdSupport 0x198f70a60 -[ASIdentifierManager advertisingIdentifier] (in AdSupport) + 56
11 XXXX 0x100afc998 -[APMASIdentifierWrapper resettableDeviceIDStringIfAvailable] (in XXXX) + 140
12 XXXX 0x1023997e0 __32-[APMIdentity updateIdentifiers]_block_invoke (in XXXX) + 452
13 libdispatch.dylib 0x18896ca38 _dispatch_call_block_and_release (in libdispatch.dylib) + 24
14 libdispatch.dylib 0x18896d7d4 _dispatch_client_callout (in libdispatch.dylib) + 16
15 libdispatch.dylib 0x188916320 _dispatch_lane_serial_drain$VARIANT$mp (in libdispatch.dylib) + 592
16 libdispatch.dylib 0x188916e3c _dispatch_lane_invoke$VARIANT$mp (in libdispatch.dylib) + 428
17 libdispatch.dylib 0x18891f4a8 _dispatch_workloop_worker_thread (in libdispatch.dylib) + 596
18 libsystem_pthread.dylib 0x188b4d114 _pthread_wqthread (in libsystem_pthread.dylib) + 304

I think it's thread 68 call [APMIdentity updateIdentifiers] and trigger xpc_connection_send_message.this may cost a lot of time sometimes.So when in main thread call -[APMIdentity appInstanceID],we must wait xpc done and main thrad block happen.maybe can we dispatch GADAnalyticsAdRequestDictionary to other thread?

If you need more info,please reply me thanks.

@google-oss-bot
Copy link

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.

@paulb777
Copy link
Member

paulb777 commented Sep 2, 2020

Revival of #5223. Tracked internally at b/152743115.

@Zeta-XL
Copy link

Zeta-XL commented Feb 10, 2021

Hardware Model: iPhone8,1
Code Type: ARM-64
OS Version: iPhone OS 14.4 (18D52)

We track the issue device info like this.
Maybe it only repo on these special devices

@dconeybe
Copy link
Contributor

This bug looks eerily similar to firebase/quickstart-unity#918, where the combination of iOS 14.2 or 14.3 and ARKit leads to intermittent behavior where dispatch_async_f() returns as if successful but never actually invokes the given function. I have been investigating this issue and so far as I can tell it looks a lot like a bug in iOS; however, I cannot confirm this yet.

@yingpaihuai Are you using ARKit in your app?

@yingpaihuai
Copy link
Author

yingpaihuai commented Apr 12, 2021

Yes,we user ARKit to realize some stricker but the block isn't happen in iOS 14.2 or 14.3.
In our records,it's happen in all iOS system version and all device
企业微信20210412-165523

@adamszeremeta
Copy link

Hello,
I'm experiencing same issue while using Firebase SDK 8.8.0 and Google Mobile Ads in version 8.12.0. App can freeze up to 2-3s on UI and does not react at all for touches. I was able to observe this also on profiler while looking at main thread in Blocked state (small fragment how this can look is attached as screenshot).

From my investigations, this issue happens only for rectangle ads - if they are not present I don't see any freezes.

thread_blocked

@tsunghung
Copy link
Contributor

The main thread was waiting for the worker thread, which was blocked in ASIdentifierManager.advertisingIdentifier. We asked the threading assumption/requirement of ASIdentifierManager in the apple developer forum but have not received any clarification.

We created a workaround in Firebase Analytics 8.7.0+ for testing, but we need help from app developers to verify.

  1. The apps must integrate with Firebase Analytics 8.7.0+.
  2. Please provide the bundle IDs of your apps. We will enable the workaround for your apps. It may take a few days to adopt the new configurations.
  3. Please help to monitor the issue count with time and let us know whether the workaround helps.

@adamszeremeta
Copy link

@tsunghung Okey, could you enable then this workaround for bundle id: "pl.onet.onetnews" ?
And how can we verify that workaround is in place? So we can determine if this helps solving the issue or not?

@tsunghung
Copy link
Contributor

@adamszeremeta Thanks, we will enable the bundle ID next week and let you know. It could take a few days to adopt the new configurations. Please help to monitor the crash count and crash report to see if it helps. You should see less crash count and [APMIdentifiers appInstanceID] in the stack trace of crash reports if the workaround helps.

@adamszeremeta
Copy link

@tsunghung Thanks! Just to clarify - we don't see any crashes related to that for now, we can just observe UI lags/freezes when using the app and we can reproduce it in dev environment and production one.

@tsunghung
Copy link
Contributor

@adamszeremeta Thanks for the info. If you don't mind, I have more questions for you.

  1. Are you sure your UI lags/freezes are related to this issue? Did you see [APMIdentifiers appInstanceID] in the stack trace when it happened?
  2. How easy/difficult to reproduce the issue with your app? I would like to give it a try if it's easy to reproduce.
  3. What's the procedure to reproduce the issue? It happened the first time launching the app or it consistently happened afterward?

@adamszeremeta
Copy link

  1. I'm not 100% sure but only this stands out for me when I'm looking at the profiler. And for me it was not looking like main thread and CPU had too much to do, it was showing no activity at this moment like it was just waiting for something.

I was not able to catch this with debugger, just what you saw above with the profiler.

I have a feeling that on version 8.8.0 of Analytics and Google-Mobile-Ads-SDK 8.12.0 it is better but I was still able to see the freeze. Only thing I know for sure is that when we don't have any active instance of 'GAMBannerView' I was not able to reproduce the problem.

2/3. It's not deterministic, but just scrolling through the app and over ads was enough to sometimes cause a freeze.
On production we have version 8.4 (Analytics) and 8.8 (Google Ads) but you can try for yourself if you want. App is called "Onet" on AppStore.

@tsunghung
Copy link
Contributor

Thanks a lot for your information. I really appreciate it.
I installed the app from App Store and scrolled the listview from different tabs for around 10 minutes, but I didn’t see any obvious UI freeze.

We have enabled the workaround for your app. Could you please help to test your app for a few days?

  1. Make sure to install the app with Analytics 8.7.0+ integrated. Please don’t reinstall the app for the following few days.
  2. Try to reproduce the issue twice a day with at least a 5-hour gap.
  3. Please do step 2 for the following 3 days.

Please share your observations with us and let us know whether the issue still happens, thanks.

@tsunghung
Copy link
Contributor

@adamszeremeta Hi, how is the experiment going? Is there any update you can share with us?

@adamszeremeta
Copy link

@tsunghung Hello, we were/are testing but nothing conclusive to say at this time...

A couple of loose thoughts:

  • I have a feeling that it's better on my iPhone 7 with old battery (80%) but still can experience small freeze (didn't check it with profiler yet)
  • on my other newer iPhone I can't reproduce the issue but my colleague can (we will check this with profiler next week probably)
  • we have not small amount of ads in the app and those are heavy on cpu/gpu so it's also hard to definitely say that freeze is coming from this threading issue - for sure app without those ads is nice and smooth

@tsunghung
Copy link
Contributor

Thanks a lot for the update. I really appreciate it.

@ecerney
Copy link

ecerney commented Dec 1, 2021

Hey @adamszeremeta / @tsunghung any update if that fix worked? These APMIdentity crashes are our biggest in production but we are on an older version of the frameworks. Waiting to go through the effort to update many of these related google frameworks until we know there's a fix for this issue. Thanks!

@tsunghung
Copy link
Contributor

Unfortunately, the experiment result is not positive. The bug may happen before the new configurations are adopted. We will need a different approach to test the workaround.

@ecerney
Copy link

ecerney commented Dec 1, 2021

Bummer :(. Please keep us posted @tsunghung on this issue here if anything changes. We could potentially test any fixes with you as well since we have millions of user sessions per day which makes this crash occur often enough.

Crash Type 1:
5 XXXX -[APMIdentity appInstanceID]
6 XXXX -[APMIdentifiers appInstanceID]
7 XXXX GADAnalyticsAdRequestDictionary
8 XXXX GADAnalyticsSettingsSignalSource
9 XXXX GAD_GADSignals_arm64_7_69_0

Crash Type 2:
5 XXXX -[APMIdentity appIDFromGMP]
6 XXXX -[APMIdentifiers analyticsAppID]
7 XXXX GADApplicationVerifyPublisherInitializedAnalyticsCorrectly
8 XXXX GADAnalyticsAdRequestDictionary
9 XXXX GADAnalyticsSettingsSignalSource
10 XXXX GAD_GADSignals_arm64_7_69_0

@adamszeremeta
Copy link

Hi guys,
we are also developing and testing our app daily (with updated dependencies) and we can still see the problems described above. We have not yet released app with updated dependencies to AppStore.

Maybe @tsunghung we could get some kind of feature flag with new SDK to enable manually this workaround?

@sotrosh
Copy link

sotrosh commented Dec 5, 2021

I'm receiving the same crashes with Firebase 8.9.1.

  • 80% of crashes happens on iPad devices.
  • All crashes happen on devices with iOS 15.0+

Screen Shot 2021-12-05 at 1 35 51 PM

@BoySimonHu
Copy link

Is there any progress on this issue now?

@tsunghung
Copy link
Contributor

In early 2022, we will provide an Early Access Program (EAP) build, which would enable the workaround by default. This will require app developers to rebuild apps with the EAP, publish apps to the App Store, and monitor crashes of new apps. Once we have the EAP build, I will update the related info here.

@hawkit
Copy link

hawkit commented Jan 11, 2022

image

image

I have found it's the multi-thread access cause these two threads call appIDFromGMP(sync methods) to enter deadlock. appIDFromGMP is not thread safe is the key problem of this issue.

@tsunghung
Copy link
Contributor

Integration

  1. To ensure compatibility with other Firebase SDKs, first integrate with Google Analytics for Firebase version 8.10.0.
    • If using Cocoapods: Ensure your project’s Podfile contains either
      pod 'Firebase/Analytics', '8.10.0'
      or
      pod 'Firebase/AnalyticsWithoutAdIdSupport', '8.10.0'
      before running commands pod install and pod update.
    • If not using Cocoapods: Download the public zip file of Firebase version 8.10.0 from the firebase-ios-sdk GitHub repo. Follow the README instructions from the public zip file to add the frameworks to the project directly. Ensure that the -ObjC linker flag is added to your app target’s build settings.
  2. After integrating with Google Analytics for Firebase 8.10.0 with any method above, replace GoogleAppMeasurement.xcframework with the one from the EAP build. (For Cocoapods, it's under Pods/GoogleAppMeasurement/Frameworks/.)
    NOTE:
    • If your app is using CocoaPods, it is possible for this EAP version to be overwritten with public versions on subsequent runs of pod install or pod update.
  3. Enable debug mode by adding -FIRDebugEnabled under 'Arguments Passed on Launch' in Xcode's scheme editor. Uninstall the app from the device/simulator. Upon launching the app in Xcode, ensure that gmp_version=80902 appear in the Xcode debug console:
Downloading data. Host: https://app-measurement.com/config/app/xxx?xxx&gmp_version=80902&xxx

@tsunghung
Copy link
Contributor

@hawkit We are focusing on [APMIdentity appInstanceID] in this issue. appIDFromGMP is thread safe, so it can be accessed by multiple threads. If you observe a deadlock there, please file another issue. It would be helpful to provide the all thread stacks related to APMIdentity so that we can identify where the dispatch queue tread is blocked. Thanks.

@adamszeremeta
Copy link

Hello,
I did some testing with old frameworks (Firebase/Analytics 8.8.0) and new ones (Firebase/Analytics 8.10.0) together with experimental build. Below are my findings.

As for old versions, unfortunately I was not able to reproduce the issue where threads are blocked and I was able to see it in Xcode profiler. Also "visually" I was not able to reproduce the issue, where our app would freeze the UI and was not responding to touches for a moment. Only thing I was able to see is that profiler shows [APMIdentity appInstanceId] takes significant time to do it's thing. Screen below.

analytics_8_8_0

As for new versions with experimental frameworks, situation was pretty similar - no UI freeze reproductions. Only thing I was able to see was [APMIdentity appIDFromGMP] to take significant time to do it's thing. Screen below.

analytics_8_10_0

Maybe it's a good thing but I can't say 100% that issue was present and now it's gone in our app. If we will encounter it again, we will post an update.
Subjective opinion without any numbers - our app could be smoother on Analytics 8.10.0 and experimental framework then on 8.8.0 but maybe it's my imagination :)

PS. Tested on iPhone 7. Quick note, on iOS 14.2.1 our app was laggy and slow and after system update to iOS 15.2.1 suddenly everything is smooth. Take it with a grain of salt as I had problems on 14.2.1 even with AppStore sytem app so maybe something was corrupted on my device.

@hawkit
Copy link

hawkit commented Jan 19, 2022

We have uploaded a new version by replacing appInstanceID and appIDFromGMP methods with locker to fix multi thread access, but it seems this issue still happen. And following screens for all of the threads infos.

image

image

image

image

image

image

image

@tsunghung
Copy link
Contributor

@hawkit Thank you so much for the feedback! I really appreciate it!
The issue seems worse than expected. The root cause is the same:
"The main thread was waiting for the worker thread, which was blocked in ASIdentifierManager.advertisingIdentifier."
But this time we have the main thread blocked in appIDFromGMP instead of appInstanceID.

@tsunghung
Copy link
Contributor

tsunghung commented Jan 26, 2022

Integration

  1. To ensure compatibility with other Firebase SDKs, first integrate with Google Analytics for Firebase version 8.10.0.
    • If using Cocoapods: Ensure your project’s Podfile contains either
      pod 'Firebase/Analytics', '8.10.0'
      or
      pod 'Firebase/AnalyticsWithoutAdIdSupport', '8.10.0'
      before running commands pod install and pod update.
    • If not using Cocoapods: Download the public zip file of Firebase version 8.10.0 from the firebase-ios-sdk GitHub repo. Follow the README instructions from the public zip file to add the frameworks to the project directly. Ensure that the -ObjC linker flag is added to your app target’s build settings.
  2. After integrating with Google Analytics for Firebase 8.10.0 with any method above, replace GoogleAppMeasurement.xcframework with the one from the EAP build. (For Cocoapods, it's under Pods/GoogleAppMeasurement/Frameworks/.)
    NOTE:
    • If your app is using CocoaPods, it is possible for this EAP version to be overwritten with public versions on subsequent runs of pod install or pod update.
  3. Enable debug mode by adding -FIRDebugEnabled under 'Arguments Passed on Launch' in Xcode's scheme editor. Uninstall the app from the device/simulator. Upon launching the app in Xcode, ensure that gmp_version=80903 appear in the Xcode debug console:
Downloading data. Host: https://app-measurement.com/config/app/xxx?xxx&gmp_version=80903&xxx

@tsunghung
Copy link
Contributor

We created the EAP build v8.9.3 to make the worker thread not be blocked by ASIdentifierManager.advertisingIdentifier. Hopefully, the main thread would not hang indefinitely by waiting for the worker thread.

@xidipeng
Copy link

We created the EAP build v8.9.3 to make the worker thread not be blocked by ASIdentifierManager.advertisingIdentifier. Hopefully, the main thread would not hang indefinitely by waiting for the worker thread.

EAP v8.9.3 crash the same
DDC9D40F-3976-4723-AA14-74680332B87B

@tsunghung
Copy link
Contributor

tsunghung commented Feb 10, 2022

@xidipeng Did you replace GoogleAppMeasurementIdentitySupport.xcframework from EAP v8.9.3? I am sorry; GoogleAppMeasurementIdentitySupport.xcframework replacement is also required for EAP v8.9.3.

Correction: GoogleAppMeasurementIdentitySupport.xcframework replacement is not necessary for EAP v8.9.3.

@xidipeng
Copy link

@tsunghung YES update sdk to v8.9.3 and replece EAP GoogleAppMeasurement.xcframework GoogleAppMeasurementIdentitySupport.xcframework crash also.

@tsunghung
Copy link
Contributor

@xidipeng Please provide stack traces related to APMIdentity. There should be a worker thread. It would be very helpful to see what's blocking the worker thread. Thanks a lot.

@xidipeng
Copy link

image
image
image
image
@tsunghung

@xidipeng
Copy link

i have send the crash log files to tsunghung@google.com. @tsunghung

@tsunghung
Copy link
Contributor

@xidipeng Sorry for the misleading, GoogleAppMeasurementIdentitySupport.xcframework replacement actually is optional for EAP v8.9.3.

Thanks a lot for the stack traces. However, it does not look like you have EAP v8.9.3 integrated correctly. [APMDefaultIdentitySupport resettableDeviceID] would not call [APMPlatformIdentitySupport resettableDeviceID] directly in EAP v8.9.3. Please double check your integration or release processes.

  1. Did you see the correct gmp_version during integration tests? (integration)
  2. Would GoogleAppMeasurement.xcframework be overwritten during your release process? For example, you should avoid doing pod install or pod update after integrating EAP v8.9.3.

@bird-xiong
Copy link

@tsunghung After integrate EAP v8.9.3, no crash happen, thanks a lot.

@xidipeng
Copy link

@xidipeng Sorry for the misleading, GoogleAppMeasurementIdentitySupport.xcframework replacement actually is optional for EAP v8.9.3.

Thanks a lot for the stack traces. However, it does not look like you have EAP v8.9.3 integrated correctly. [APMDefaultIdentitySupport resettableDeviceID] would not call [APMPlatformIdentitySupport resettableDeviceID] directly in EAP v8.9.3. Please double check your integration or release processes.

  1. Did you see the correct gmp_version during integration tests? (integration)
  2. Would GoogleAppMeasurement.xcframework be overwritten during your release process? For example, you should avoid doing pod install or pod update after integrating EAP v8.9.3.

OK, i will release new ver in future.

@sotrosh
Copy link

sotrosh commented Feb 21, 2022

I still receiving tons of crashes with Firebase iOS version 8.9.1:

Thread 0 name:
Thread 0 Crashed:
0   libsystem_kernel.dylib        	0x00000001b7e3ac54 kevent_id + 8
1   libdispatch.dylib             	0x0000000180c8deac _dispatch_kq_poll + 228 (event_kevent.c:750)
2   libdispatch.dylib             	0x0000000180c8e904 _dispatch_event_loop_wait_for_ownership + 444 (event_kevent.c:2221)
3   libdispatch.dylib             	0x0000000180c7ab80 __DISPATCH_WAIT_FOR_QUEUE__ + 336 (queue.c:1678)
4   libdispatch.dylib             	0x0000000180c7a744 _dispatch_sync_f_slow + 144 (queue.c:1762)
5   Calculator                    	0x00000001007b0fd0 0x1005d0000 + 1970128
6   Calculator                    	0x00000001007affc8 0x1005d0000 + 1966024
7   Calculator                    	0x00000001009690a4 GADAnalyticsAdRequestDictionary + 124 (GADAnalytics.m:68)
8   Calculator                    	0x0000000100929a18 __GADAnalyticsSettingsSignalSource_block_invoke + 76 (GADBlockSignalSourceImplementations.m:112)
9   Calculator                    	0x000000010095b6b0 __64-[GADSignals updatedSignalsWithSignalSources:completionHandler:]_block_invoke_2 + 36 (GADSignals.m:175)
10  libdispatch.dylib             	0x0000000180c69914 _dispatch_call_block_and_release + 32 (init.c:1517)
11  libdispatch.dylib             	0x0000000180c6b660 _dispatch_client_callout + 20 (object.m:560)
12  libdispatch.dylib             	0x0000000180c79b60 _dispatch_main_queue_callback_4CF + 944 (inline_internal.h:2601)
13  CoreFoundation                	0x0000000180fb1cd4 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16 (CFRunLoop.c:1795)
14  CoreFoundation                	0x0000000180f6beac __CFRunLoopRun + 2540 (CFRunLoop.c:3144)
15  CoreFoundation                	0x0000000180f7f3b8 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268)
16  GraphicsServices              	0x000000019c90f38c GSEventRunModal + 164 (GSEvent.c:2200)
17  UIKitCore                     	0x000000018391f6a8 -[UIApplication _run] + 1100 (UIApplication.m:3493)
18  UIKitCore                     	0x000000018369e7f4 UIApplicationMain + 2092 (UIApplication.m:5046)
19  Calculator                    	0x00000001005d6984 main + 68 (HistoryManager.swift:18)
20  dyld                          	0x0000000100f65a24 start + 520 (dyldMain.cpp:876)

@tsunghung
Copy link
Contributor

tsunghung commented Feb 23, 2022

@sotrosh Please try the EAP v8.9.3.

@MartinMcGuinness
Copy link

Is there any solution or workaround like EAP v8.9.3 for the Unity SDK?

@tsunghung
Copy link
Contributor

@MartinMcGuinness
Deep down, the Unity SDK uses CocoaPods to get the GoogleAppMeasurement.xcframework. You can try to replace the GoogleAppMeasurement.xcframework with the EAP v8.9.3 if you want.
We plan to release the patch in v8.14.0, which is targeted to release the week of 3/21/2022. The Unity plugin is targeted to release around 4/1/2022.

@xidipeng
Copy link

new version no crash.

@tsunghung

@paulb777
Copy link
Member

8.14.0 is now available

@Fuduji95
Copy link

Fuduji95 commented Apr 6, 2022

@MartinMcGuinness Deep down, the Unity SDK uses CocoaPods to get the GoogleAppMeasurement.xcframework. You can try to replace the GoogleAppMeasurement.xcframework with the EAP v8.9.3 if you want. We plan to release the patch in v8.14.0, which is targeted to release the week of 3/21/2022. The Unity plugin is targeted to release around 4/1/2022.

Today is April 6th, when will the unity version be updated?

@adrianeui
Copy link

Hi ! I see that there's already a branch for Unity 8.10 is this expected to fix the issue ? I only see FirebaseCore update from 8.10 to 8.13 which not sure if this gets fixed in that one.

Is there any ETA for Unity 8.10 ?

Is it safe to do the update to Unity 8.9.0 and force the Cocodapods to 8.14 Analytics ?

@tsunghung
Copy link
Contributor

tsunghung commented Apr 20, 2022

Sorry for the delay. The plan now is to release Firebase Unity 8.10, which will contain Firebase 8.14+, next week.

@firebase firebase locked and limited conversation to collaborators Apr 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests