Application Crashes due to java.lang.SecurityException:

I think you have used Clock component and One Signal component and did something wrong with those blocks. :thinking:

i used in screen 1 one signal but not used clock in home screen. but i used clock in other all screen.

and about the block i not used any block of one signal and for clock i used only 3 block set timer enable to true falls and when timer

This error means that a thread has been started again after a complete execution. Your main thread has been started twice and it is not a good practice.

Any solution ?

i receive today Today, 8:18 PM on this ANRs

Broadcast of Intent { act=android.intent.action.SCREEN_OFF flg=0x58200010 }

(no location available)

From the Android Documentation:

Security Exception is thrown by the security manager to indicate a security violation.

An example of security violation, is trying to accessing, reading or writing data in android, which your app isn’t allowed to access it by the android security manager possibly due on of the following:

  • Not declaring sufficient permissions
    Permissions are declared in the app’s manifest using the <uses-permission> tag. Almost all components and extensions do this already. But in case it doesn’t, you will need to decompile the APK or AAB and add it manually.
  • The protection level of one of the required declared permissions is dangerous, which means that the user must accept it in the runtime starting from Android 6 ( using the Screen. AskPermission block. ).
    Most of the components asks the user to accept the permission already, but it’s possible you will need to ask it using the mentioned blocks when using some components or extensions.
  • One of the features you use requires your app to be signed as a system app.

An example is:

  • Accessing the user location ( using the location sensor for example or Google Maps), without having the location permissions.
  • Accessing the internet without the internet permission.
  • Reading/Writing files from the device’s storage ( excluding app specific directories which apps have access to it by default )
    Well explained here.
  • And so on…
1 Like

and what about this ?

recently i received this one more ANRs

executing service “my app package name”/com.onesignal.SyncJobService


1 Like

i confirm this. same issue is also happening in one of my apps.
i did not use location detection in app.
its working best in my infinix hot 8 android 9. but today i tested my app in oppo F1s android 5.1
then i faced the very same error.
the major componets i used are tiny db and web .
and all other are simple alighmnts buttons and lables along with dynamic components extension bt @yusufcihan
scrol handler by @colintree
taifun clipboard by @Taifun

1 Like

you might want to replace my extension by the built in Device Utilities component and its Copy/Paste methods

1 Like

in my app only location permission and i am asking for this. no other permission in my app.

this ANRs i am facing in android 9

Yup i will
But in another app of mine with same configuration 100% same (but data is changed) everything is fine
I have an hypothesis not yet confirmed that tinydb might be the cause.
Now i get confirmed details why its happening
Actually i have used perdiza sqlite extension that’s now has become a component but when i created this app i was unaware of the fact that this extension is now a component so i imported that extension and used and later on i used another method to store data with tiny db and forget to remove that extension from my app

Now that extension is causing runtime exception issue… not security issue.

Detailed information is taken from play console and by some permanent users help.

1 Like

@Taifun actually this is not the solution for@jiks_devloper 's issue.
So i unmarked the solution.

ok, I understand, thank you…
you also used this thread and meanwhile found your solution, which is great… but @Jiks_Devloper actually had another problem…



Thank you @golumaths100
above 2 crashes now fixed .

but recently i received this new crashes please check.

  #00  pc 000000000004aab8  /system/lib/ (tgkill+12)
  #01  pc 0000000000048233  /system/lib/ (pthread_kill+34)
  #02  pc 000000000001dca9  /system/lib/ (raise+10)
  #03  pc 0000000000019341  /system/lib/ (__libc_android_abort+34)
  #04  pc 00000000000173a8  /system/lib/ (abort+4)
  #05  pc 000000000000c615  /system/lib/ (__android_log_assert+112)
  #06  pc 00000000000edd01  /system/lib/ (android::MediaCodec::onMessageReceived(android::sp<android::AMessage> const&)+11104)
  #07  pc 000000000000f485  /system/lib/ (android::AHandler::deliverMessage(android::sp<android::AMessage> const&)+24)
  #08  pc 0000000000011715  /system/lib/ (android::AMessage::deliver()+60)
  #09  pc 000000000000ffff  /system/lib/ (android::ALooper::loop()+398)
  #10  pc 000000000000e4a5  /system/lib/ (android::Thread::_threadLoop(void*)+264)
  #11  pc 000000000006a29d  /system/lib/ (android::AndroidRuntime::javaThreadShell(void*)+80)
  #12  pc 0000000000047d03  /system/lib/ (__pthread_start(void*)+22)
  #13  pc 000000000001a00d  /system/lib/ (__start_thread+6)

These lines indicate that the error is occurring in the thread. May I ask you about all the components you are using in your app?

here is the all components list whose in my application.

This all components i used in home screen

this all components i used in all other screen

Note : in some screen i used 1 components 2 or more time like Notifier i used in 2 times and clock component i used in 6 times in some screen.

See, these two errors show that the OS is shutting down the app. You can read Diagnosing Native Crashes  |  Android Open Source Project for more info and how to resolve these errors.

Also read this for further help: android - Native crashes on abort in developer console with Oreo (8.1) - Stack Overflow

Hope it will help you. :slight_smile:

Thank you :+1:t2:

1 Like