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

[Bug]: com.onesignal.FocusTimeController.getTimeFocusedElapsed #621

Open
1 task done
shefich opened this issue Jul 6, 2023 · 3 comments
Open
1 task done

[Bug]: com.onesignal.FocusTimeController.getTimeFocusedElapsed #621

shefich opened this issue Jul 6, 2023 · 3 comments

Comments

@shefich
Copy link

shefich commented Jul 6, 2023

What happened?

Devices: Samsung, Motorola, Huawei, General Mobile.
OSs: Android 8, 10, 12, 13.

Steps to reproduce?

1. Don't know how

What did you expect to happen?

I expected not to see these crashes

Unity version

2021.2.12 (latest)

OneSignal Unity SDK version

3.0.10

Platform

Android

Relevant log output

Caused by java.lang.RuntimeException: Unable to pause activity {com.xxx.xxx/com.bytedance.sdk.openadsdk.activity.TTFullScreenExpressVideoActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'long java.lang.Long.longValue()' on a null object reference
       at android.app.ActivityThread.performPauseActivityIfNeeded(ActivityThread.java:5704)
       at android.app.ActivityThread.performPauseActivity(ActivityThread.java:5655)
       at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:5607)
       at android.app.servertransaction.PauseActivityItem.execute(PauseActivityItem.java:47)
       at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)
       at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
       at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2571)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loopOnce(Looper.java:226)
       at android.os.Looper.loop(Looper.java:313)
       at android.app.ActivityThread.main(ActivityThread.java:8741)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)

Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'long java.lang.Long.longValue()' on a null object reference
       at com.onesignal.FocusTimeController.getTimeFocusedElapsed(FocusTimeController.java:98)
       at com.onesignal.FocusTimeController.appStopped(FocusTimeController.java:50)
       at com.onesignal.ActivityLifecycleHandler.handleLostFocus(ActivityLifecycleHandler.java:182)
       at com.onesignal.ActivityLifecycleHandler.onActivityPaused(ActivityLifecycleHandler.java:102)
       at com.onesignal.ActivityLifecycleListener.onActivityPaused(ActivityLifecycleListener.java:97)
       at android.app.Application.dispatchActivityPaused(Application.java:480)
       at android.app.Activity.dispatchActivityPaused(Activity.java:1523)
       at android.app.Activity.onPause(Activity.java:2445)
       at com.bytedance.sdk.openadsdk.activity.TTBaseVideoActivity.onPause(TTBaseVideoActivity.java:277)
       at android.app.Activity.performPause(Activity.java:8765)
       at android.app.Instrumentation.callActivityOnPause(Instrumentation.java:1585)
       at android.app.ActivityThread.performPauseActivityIfNeeded(ActivityThread.java:5694)
       at android.app.ActivityThread.performPauseActivity(ActivityThread.java:5655)
       at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:5607)
       at android.app.servertransaction.PauseActivityItem.execute(PauseActivityItem.java:47)
       at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)
       at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
       at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2571)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loopOnce(Looper.java:226)
       at android.os.Looper.loop(Looper.java:313)
       at android.app.ActivityThread.main(ActivityThread.java:8741)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)

Code of Conduct

  • I agree to follow this project's Code of Conduct
@emawby
Copy link
Contributor

emawby commented Jul 10, 2023

Thank you for reporting we will investigate

@nan-li
Copy link

nan-li commented Jul 17, 2023

Hi @shefich,

Can you let us know many devices and crashes you are seeing? How often does this happen?

@shefich
Copy link
Author

shefich commented Jul 17, 2023

Hi @nan-li,
67 crashes, 70 devices for the last 90 days. So not often.
But this for the readable crashes. I'm not sure, but I think some unreadable logs can be connected to the same issue.
Attached devices and Android versions:
img
img2

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