-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Comments
I found a few problems with this issue:
|
Revival of #5223. Tracked internally at b/152743115. |
Hardware Model: iPhone8,1 We track the issue device info like this. |
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 @yingpaihuai Are you using ARKit in your app? |
Hello, From my investigations, this issue happens only for rectangle ads - if they are not present I don't see any freezes. |
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.
|
@tsunghung Okey, could you enable then this workaround for bundle id: "pl.onet.onetnews" ? |
@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 |
@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. |
@adamszeremeta Thanks for the info. If you don't mind, I have more questions for you.
|
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. |
Thanks a lot for your information. I really appreciate it. We have enabled the workaround for your app. Could you please help to test your app for a few days?
Please share your observations with us and let us know whether the issue still happens, thanks. |
@adamszeremeta Hi, how is the experiment going? Is there any update you can share with us? |
@tsunghung Hello, we were/are testing but nothing conclusive to say at this time... A couple of loose thoughts:
|
Thanks a lot for the update. I really appreciate it. |
Hey @adamszeremeta / @tsunghung any update if that fix worked? These |
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. |
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: Crash Type 2: |
Hi guys, Maybe @tsunghung we could get some kind of feature flag with new SDK to enable manually this workaround? |
Is there any progress on this issue now? |
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. |
Integration
|
@hawkit We are focusing on |
Hello, 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 As for new versions with experimental frameworks, situation was pretty similar - no UI freeze reproductions. Only thing I was able to see was 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. 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 Thank you so much for the feedback! I really appreciate it! |
Integration
|
We created the EAP build v8.9.3 to make the worker thread not be blocked by |
@xidipeng Correction: |
@tsunghung YES update sdk to v8.9.3 and replece EAP GoogleAppMeasurement.xcframework GoogleAppMeasurementIdentitySupport.xcframework crash also. |
@xidipeng Please provide stack traces related to |
i have send the crash log files to tsunghung@google.com. @tsunghung |
@xidipeng Sorry for the misleading, Thanks a lot for the stack traces. However, it does not look like you have EAP v8.9.3 integrated correctly.
|
@tsunghung After integrate EAP v8.9.3, no crash happen, thanks a lot. |
OK, i will release new ver in future. |
I still receiving tons of crashes with Firebase iOS version 8.9.1:
|
@sotrosh Please try the EAP v8.9.3. |
Is there any solution or workaround like EAP v8.9.3 for the Unity SDK? |
@MartinMcGuinness |
new version no crash. |
8.14.0 is now available |
Today is April 6th, when will the unity version be updated? |
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 ? |
Sorry for the delay. The plan now is to release Firebase Unity 8.10, which will contain Firebase 8.14+, next week. |
[REQUIRED] Step 1: Describe your environment
[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:
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.
The text was updated successfully, but these errors were encountered: