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

ANR - Reason: executing service com.onesignal.SyncJobService #284

Open
Dipannita20 opened this issue Apr 1, 2022 · 5 comments
Open

ANR - Reason: executing service com.onesignal.SyncJobService #284

Dipannita20 opened this issue Apr 1, 2022 · 5 comments

Comments

@Dipannita20
Copy link

Dipannita20 commented Apr 1, 2022

Description:
I am seeing consistent ANR on tap of push when app is in closed state. In every 2nd/3rd push tap ANR is thrown

Environment

OneSginal Xamarin SDK to 4.0.0-beta 4 and Visual Studio to 2022
OneSginal Xamarin SDK to 3.10.6 and Visual Studio to 2019

Configuration details for OneSginal Xamarin SDK to 3.10.6 and Visual Studio to 2019
minSdkVersion 23
targetSdkVersion 30
Xamarin Forms: 5.0.0.2401
Found Java SDK version 1.8.0.
Found Java SDK version 1.8.0.
Dex Fast Deployment Enabled: False
MonoAndroid Tools: C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Xamarin\Android
Android Platform API level: 30
TargetFrameworkVersion: v11.0
Android NDK: C:\Users\xxxxx\AppData\Local\Android\Sdk
dk-bundle
Android SDK: C:\Users\xxxxx\AppData\Local\Android\Sdk
Android SDK Build Tools: C:\Users\xxxxx\AppData\Local\Android\Sdk\build-tools\30.0.2
Testing Device: Pixel 3XL (Android 12)

<ItemGroup>
    <PackageReference Include="Com.OneSignal">
      <Version>3.10.6</Version>
    </PackageReference>
    <PackageReference Include="Microsoft.AppCenter.Analytics">
      <Version>3.1.0</Version>
    </PackageReference>
    <PackageReference Include="Microsoft.AppCenter.Crashes">
      <Version>3.1.0</Version>
    </PackageReference>
    <PackageReference Include="reactiveui">
      <Version>11.2.3</Version>
    </PackageReference>
    <PackageReference Include="ReactiveUI.Events.XamForms">
      <Version>15.1.1</Version>
    </PackageReference>
    <PackageReference Include="ReactiveUI.XamForms">
      <Version>11.2.3</Version>
    </PackageReference>
    <PackageReference Include="Rg.Plugins.Popup">
      <Version>2.0.0.14</Version>
    </PackageReference>
    <PackageReference Include="Shiny.Jobs">
      <Version>2.4.3.3003</Version>
    </PackageReference>
    <PackageReference Include="Shiny.Locations">
      <Version>2.4.3.3003</Version>
    </PackageReference>
    <PackageReference Include="Shiny.Notifications">
      <Version>2.4.3.3003</Version>
    </PackageReference>
    <PackageReference Include="SkiaSharp.Views.Forms">
      <Version>2.80.3</Version>
    </PackageReference>
    <PackageReference Include="sqlite-net-sqlcipher">
      <Version>1.6.292</Version>
    </PackageReference>
    <PackageReference Include="Xamarin.AndroidX.Migration">
      <Version>1.0.8</Version>
    </PackageReference>
    <PackageReference Include="Xamarin.FFImageLoading.Svg.Forms">
      <Version>2.4.11.982</Version>
    </PackageReference>
    <PackageReference Include="Xamarin.FFImageLoading.Transformations">
      <Version>2.4.11.982</Version>
    </PackageReference>
    <PackageReference Include="Xamarin.Forms" Version="5.0.0.2125" />
    <PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
    <PackageReference Include="Xamarin.Android.Support.Core.Utils" Version="28.0.0.3" />
    <PackageReference Include="Xamarin.Essentials" Version="1.5.1" />
    <PackageReference Include="Xamarin.GooglePlayServices.Location">
      <Version>118.0.0.2</Version>
    </PackageReference>
  </ItemGroup>

Steps to Reproduce Issue:

  1. Install the app and open the app to capture the device
  2. Close the app send couple of push
  3. Tap any one of them open the app correctly
  4. Again close the app
  5. tap any of the remaining
  6. App stuck at white splash screen

Anything else:

(crash stacktraces, as well as any other information here)
OneSginal Xamarin SDK to 3.10.6 and Visual Studio to 2019
logcat_3.10.6_fail.txt

OneSginal Xamarin SDK to 4.0.0-beta 4 and Visual Studio to 2022 configuration details and stacktraces can be found here. #247

Please let me know if you need any more information.

@jkasten2
Copy link
Member

@Dipannita20 Thanks for the logcat, I found the following entries which shows some detail about he ANR detected.

04-01 11:50:26.772  1862  1862 W JobServiceContext: Time-out while trying to bind f5ef0e0 #u0a814/2071862118 com.dciartform.brandambassador.soa.dev/com.onesignal.SyncJobService, dropping.

...


04-01 11:50:46.780  1862  1911 W ActivityManager: Timeout executing service: ServiceRecord{b745aa2 u0 com.dciartform.brandambassador.soa.dev/com.onesignal.SyncJobService}
04-01 11:50:46.847  1862 23354 I ActivityManager: dumpStackTraces pids={2320=true, 2450=true, 2671=true, 2719=true, 2844=true, 2959=true, 3284=true, 3337=true, 3338=true, 3454=true, 3488=true, 3509=true, 3513=true, 3526=true, 3763=true, 5689=true, 6029=true, 7617=true, 7691=true, 8703=true, 8807=true, 12622=true, 16036=true, 16368=true, 16392=true, 17408=true, 17627=true, 17819=true, 18604=true, 19745=true, 19949=true, 20048=true, 20095=true, 20181=true, 20208=true, 20435=true, 20598=true, 20871=true, 21798=true, 21809=true, 21813=true, 21919=true, 22159=true, 22668=true, 23049=true, 23211=true} nativepids=[706, 728, 736, 1072, 1120, 1188, 1267, 1316, 1331, 1333, 1340, 1349, 1358, 2320]
04-01 11:50:47.244  1862 23354 I ActivityManager: Skipping next CPU consuming process, not a java proc: 1862
04-01 11:50:47.244  1862 23354 I ActivityManager: Skipping next CPU consuming process, not a java proc: 34
04-01 11:50:47.244  1862 23354 I ActivityManager: Skipping next CPU consuming process, not a java proc: 620
04-01 11:50:47.244  1862 23354 I ActivityManager: Skipping next CPU consuming process, not a java proc: 685
04-01 11:50:47.244  1862 23354 I ActivityManager: Skipping next CPU consuming process, not a java proc: 1072
04-01 11:50:47.244  1862 23354 I ActivityManager: Skipping next CPU consuming process, not a java proc: 1166
04-01 11:50:47.244  1862 23354 I ActivityManager: Skipping next CPU consuming process, not a java proc: 1314

...

04-01 11:51:01.298  1862 23354 E ActivityManager: ANR in com.dciartform.brandambassador.soa.dev
04-01 11:51:01.298  1862 23354 E ActivityManager: PID: 22878
04-01 11:51:01.298  1862 23354 E ActivityManager: Reason: executing service com.dciartform.brandambassador.soa.dev/com.onesignal.SyncJobService
04-01 11:51:01.298  1862 23354 E ActivityManager: Frozen: false
04-01 11:50:47.244  1862 23354 I ActivityManager: Skipping next CPU consuming process, not a java proc: 2492
04-01 11:50:47.244  1862 23354 I ActivityManager: Skipping next CPU consuming process, not a java proc: 22148
04-01 11:50:47.245  1862 23354 I ActivityManager: Dumping to /data/anr/anr_2022-04-01-11-50-47-245

We haven't been able to reproduce the issue yet. Could you also share the log from /data/anr/anr_2022-04-01-11-50-47-245? It should contain a list of all thread and their fullstack traces so we can see exactly where it is stuck.

@Dipannita20
Copy link
Author

@jkasten2 sorry I don't have that day anr log, it has been overwritten by latest, but it is same issue, I get ANR only on com.onesignal.SyncJobService

anr_2022-04-25-17-05-02-557.zip

@jkasten2
Copy link
Member

jkasten2 commented May 2, 2022

@Dipannita20 Thanks for getting us the log, I wasn't able to find what the root cause of the issue is from it. It seems to be missing a number of details, is this the full log? Normally it is closer to 10,000 lines long.

I was expected a number of entries like this with more Java related details:

AsyncTask #2" prio=5 tid=18 Runnable
  | group="main" sCount=0 dsCount=0 obj=0x12c333a0 self=0x94c87100
  | sysTid=25287 nice=10 cgrp=default sched=0/0 handle=0x94b80920
  | state=R schedstat=( 0 0 0 ) utm=757 stm=0 core=3 HZ=100
  | stack=0x94a7e000-0x94a80000 stackSize=1038KB
  | held mutexes= "mutator lock"(shared held)
  at com.android.developer.anrsample.BubbleSort.sort(BubbleSort.java:8)
  at com.android.developer.anrsample.MainActivity$LockTask.doInBackground(MainActivity.java:147)
  - locked <0x083105ee> (a java.lang.Boolean)
  at com.android.developer.anrsample.MainActivity$LockTask.doInBackground(MainActivity.java:135)
  at android.os.AsyncTask$2.call(AsyncTask.java:305)
  at java.util.concurrent.FutureTask.run(FutureTask.java:237)
  at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:243)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
  at java.lang.Thread.run(Thread.java:761)

ANR example from: https://developer.android.com/topic/performance/vitals/anr#lock_contention

If this was the full log, what version of Android and device model did you capture if from? Can you try getting the ANR from another device?

@Dipannita20
Copy link
Author

@jkasten2 please find adb bugreport import
anr_2022-04-25-17-05-02-557.zip

@jkasten2
Copy link
Member

jkasten2 commented May 7, 2022

@Dipannita20 Thanks, but the file seems to be exactly the same as the old one above. If you didn't change the file in anyway after you extracted it from the device can you try a different device to get a log like I noted above?

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

3 participants