java.lang.IllegalStateException: You can't access the throwable repository if you don't initialize it!
See original GitHub issue✍️ Describe the bug
On the emulator, sometimes, when I click on the Chucker notification, then switch to Response tab, my app gets crashed and I see below error log:
ComponentInfo{net.example.platform/com.chuckerteam.chucker.internal.ui.MainActivity}: java.lang.IllegalStateException: You can't access the throwable repository if you don't initialize it!
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3270)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
Caused by: java.lang.IllegalStateException: You can't access the throwable repository if you don't initialize it!
at com.chuckerteam.chucker.internal.data.repository.RepositoryProvider.throwable(RepositoryProvider.kt:23)
at com.chuckerteam.chucker.internal.ui.MainViewModel.<init>(MainViewModel.kt:35)
at java.lang.Class.newInstance(Native Method)
at androidx.lifecycle.ViewModelProvider$NewInstanceFactory.create(ViewModelProvider.java:219)
at androidx.lifecycle.ViewModelProvider$AndroidViewModelFactory.create(ViewModelProvider.java:278)
at androidx.lifecycle.SavedStateViewModelFactory.create(SavedStateViewModelFactory.java:112)
at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.java:185)
at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.java:150)
at com.chuckerteam.chucker.internal.ui.transaction.TransactionListFragment.onCreate(TransactionListFragment.kt:33)
at androidx.fragment.app.Fragment.performCreate(Fragment.java:2936)
at androidx.fragment.app.FragmentStateManager.create(FragmentStateManager.java:472)
at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:278)
at androidx.fragment.app.FragmentStore.moveToExpectedState(FragmentStore.java:112)
at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1636)
at androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:3112)
at androidx.fragment.app.FragmentManager.dispatchCreate(FragmentManager.java:3045)
at androidx.fragment.app.FragmentController.dispatchCreate(FragmentController.java:240)
at androidx.fragment.app.FragmentActivity.onCreate(FragmentActivity.java:272)
at com.chuckerteam.chucker.internal.ui.BaseChuckerActivity.onCreate(BaseChuckerActivity.kt:11)
at com.chuckerteam.chucker.internal.ui.MainActivity.onCreate(MainActivity.kt:26)
at android.app.Activity.performCreate(Activity.java:7802)
at android.app.Activity.performCreate(Activity.java:7791)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1299)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3245)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
2021-03-04 11:45:44.215 7864-7864/net.example.platform E/BluetoothAdapter: Bluetooth binder is null
2021-03-04 11:45:44.241 7864-7864/net.example.platform E/BluetoothAdapter: Bluetooth binder is null
2021-03-04 11:45:44.252 7864-7864/net.example.platform E/BluetoothAdapter: Bluetooth binder is null
2021-03-04 11:45:44.347 7864-7864/net.example.platform E/BluetoothAdapter: Bluetooth binder is null
2021-03-04 11:45:45.057 7864-7864/net.example.platform E/libc: Access denied finding property "ro.serialno"
2021-03-04 11:45:46.538 7864-7864/net.example.platform E/libc: Access denied finding property "ro.serialno"
2021-03-04 11:45:46.713 7864-7960/net.example.platform E/EGL_emulation: tid 7960: eglQuerySurface(1169): error 0x3001 (EGL_NOT_INITIALIZED)
2021-03-04 11:45:46.713 7864-7960/net.example.platform E/EGL_emulation: tid 7960: eglQuerySurface(1169): error 0x3001 (EGL_NOT_INITIALIZED)
2021-03-04 11:45:46.714 7864-7960/net.example.platform E/EGL_emulation: tid 7960: eglSwapBuffers(1934): error 0x3001 (EGL_NOT_INITIALIZED)
2021-03-04 11:45:46.716 7864-7960/net.example.platform A/OpenGLRenderer: Encountered EGL error 12289 EGL_NOT_INITIALIZED during rendering
2021-03-04 11:45:46.722 7864-7960/net.example.platform A/libc: Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 7960 (RenderThread), pid 7864 (etsafe.platform)
2021-03-04 11:45:47.048 7864-7903/net.example.platform A/libc: FORTIFY: pthread_mutex_lock called on a destroyed mutex (0xe524d000)
2021-03-04 11:45:47.048 7864-8022/net.example.platform A/libc: FORTIFY: pthread_mutex_lock called on a destroyed mutex (0xe524d000)
2021-03-04 11:45:47.090 7864-7917/net.example.platform A/libc: FORTIFY: pthread_mutex_lock called on a destroyed mutex (0xe524d000)
2021-03-04 11:45:47.193 7864-8026/net.example.platform A/libc: FORTIFY: pthread_mutex_lock called on a destroyed mutex (0xe524d000)
2021-03-04 11:45:47.222 7864-7928/net.example.platform E/SQLiteDatabase: Failed to open database '/data/user/0/net.example.platform/databases/google_app_measurement_local.db'.
android.database.sqlite.SQLiteException: not an error (code 0 SQLITE_OK): Could not register Android SQL functions.
at android.database.sqlite.SQLiteConnection.nativeOpen(Native Method)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:215)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:197)
at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:505)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:206)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:198)
at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:915)
at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:895)
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:759)
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:748)
at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:374)
at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:317)
at com.google.android.gms.measurement.internal.zzeb.getWritableDatabase(com.google.android.gms:play-services-measurement-impl@@18.0.2:1)
at com.google.android.gms.measurement.internal.zzec.zzo(com.google.android.gms:play-services-measurement-impl@@18.0.2:1)
at com.google.android.gms.measurement.internal.zzec.zzl(com.google.android.gms:play-services-measurement-impl@@18.0.2:4)
at com.google.android.gms.measurement.internal.zzjb.zzk(com.google.android.gms:play-services-measurement-impl@@18.0.2:7)
at com.google.android.gms.measurement.internal.zzii.run(com.google.android.gms:play-services-measurement-impl@@18.0.2:7)
at com.google.android.gms.measurement.internal.zzjb.zzR(com.google.android.gms:play-services-measurement-impl@@18.0.2:6)
at com.google.android.gms.measurement.internal.zzjb.zzE(com.google.android.gms:play-services-measurement-impl@@18.0.2:4)
at com.google.android.gms.measurement.internal.zzix.run(com.google.android.gms:play-services-measurement-impl@@18.0.2:5)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at com.google.android.gms.measurement.internal.zzfh.run(com.google.android.gms:play-services-measurement-impl@@18.0.2:6)
2021-03-04 11:45:47.224 7864-7928/net.example.platform E/FA: Opening the local database failed, dropping and recreating it
2021-03-04 11:45:47.226 7864-8084/net.example.platform A/etsafe.platfor: mutex.cc:340] destroying mutex with owner or contenders. Owner:7874
2021-03-04 11:45:47.226 7864-8084/net.example.platform A/etsafe.platfor: scoped_thread_state_change-inl.h:39] Check failed: runtime == nullptr || !runtime->IsStarted() || runtime->IsShuttingDown(self_)
2021-03-04 11:45:47.252 7864-8084/net.example.platform A/etsafe.platfor: scoped_thread_state_change-inl.h:39] Check failed: runtime == nullptr || !runtime->IsStarted() || runtime->IsShuttingDown(self_)
2021-03-04 11:45:47.252 7864-7928/net.example.platform E/SQLiteDatabase: Failed to open database '/data/user/0/net.example.platform/databases/google_app_measurement_local.db'.
android.database.sqlite.SQLiteException: not an error (code 0 SQLITE_OK): Could not register Android SQL functions.
at android.database.sqlite.SQLiteConnection.nativeOpen(Native Method)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:215)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:197)
at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:505)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:206)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:198)
at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:915)
at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:895)
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:759)
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:748)
at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:374)
at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:317)
at com.google.android.gms.measurement.internal.zzeb.getWritableDatabase(com.google.android.gms:play-services-measurement-impl@@18.0.2:9)
at com.google.android.gms.measurement.internal.zzec.zzo(com.google.android.gms:play-services-measurement-impl@@18.0.2:1)
at com.google.android.gms.measurement.internal.zzec.zzl(com.google.android.gms:play-services-measurement-impl@@18.0.2:4)
at com.google.android.gms.measurement.internal.zzjb.zzk(com.google.android.gms:play-services-measurement-impl@@18.0.2:7)
at com.google.android.gms.measurement.internal.zzii.run(com.google.android.gms:play-services-measurement-impl@@18.0.2:7)
at com.google.android.gms.measurement.internal.zzjb.zzR(com.google.android.gms:play-services-measurement-impl@@18.0.2:6)
at com.google.android.gms.measurement.internal.zzjb.zzE(com.google.android.gms:play-services-measurement-impl@@18.0.2:4)
at com.google.android.gms.measurement.internal.zzix.run(com.google.android.gms:play-services-measurement-impl@@18.0.2:5)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at com.google.android.gms.measurement.internal.zzfh.run(com.google.android.gms:play-services-measurement-impl@@18.0.2:6)
2021-03-04 11:45:47.268 7864-8084/net.example.platform A/etsafe.platfor: scoped_thread_state_change-inl.h:39] Check failed: runtime == nullptr || !runtime->IsStarted() || runtime->IsShuttingDown(self_)
2021-03-04 11:45:47.295 7864-8084/net.example.platform A/etsafe.platfor: scoped_thread_state_change-inl.h:39] Check failed: runtime == nullptr || !runtime->IsStarted() || runtime->IsShuttingDown(self_)
2021-03-04 11:45:49.213 8097-8097/net.example.platform E/BluetoothAdapter: Bluetooth binder is null
2021-03-04 11:45:49.228 8097-8097/net.example.platform E/BluetoothAdapter: Bluetooth binder is null
2021-03-04 11:45:49.237 8097-8097/net.example.platform E/BluetoothAdapter: Bluetooth binder is null
2021-03-04 11:45:49.294 8097-8097/net.example.platform E/BluetoothAdapter: Bluetooth binder is null
2021-03-04 11:45:50.747 8097-8097/net.example.platform E/libc: Access denied finding property "ro.serialno"
💣 Steps to reproduce
- Click on the notification
- Switch to Response tab
🔧 Expected behavior
Chucker activity - The response tab, should show a list of all monitored network calls.
📱 Tech info
- Device: Android Emulator Pixel 2 API 29 X86
- OS: 10.0
- Chucker version: 3.2.0
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
java.lang.IllegalStateException You can't access the ... - GitHub
MainActivity}: java.lang.IllegalStateException: You can't access the throwable repository if you don't initialize it! -- android.app.ActivityThread.
Read more >How to solve the “failed to lazily initialize a collection of role ...
This annotation in a method creates a transaction that propagates into the repository layer and keeps open the persistence context until the method...
Read more >How to Solve java.lang.IllegalStateException in Java main ...
The exception which is checked by the compiler for the smooth execution of the program at runtime is called a checked exception. In...
Read more >Caused By: java.lang.NoClassDefFoundError: org/apache ...
Solution: If the problem is caused due to the missing log4j.jar file then you can fix it by adding a relevant version of...
Read more >Troubleshoot Tableau Server Install and Upgrade
If you attempt to install Tableau Server and the installation fails with this error: Tableau server initialization failed
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I haven’t seen the issue on 3.4.0. Let’s close this issue. If happened, we could re-open it.
@vbuberen Let me work with the 3.4.0 for a while, I’ll let you know. Thanks!