Crash upon app initialization after most recent update.
RokeJulianLockhart opened this issue · 12 comments
It always occurs. I can't currently use the app.
WOL
Version : https://github.com/Florianisme/WakeOnLan/releases/download/1.8.0/app-release.apk
Origin : https://play.google.com/store/apps/details?id=de.florianisme.wakeonlan&hl=en
OS
Build : FP4.SP28.B.065.20230420
Kernel : 4.19.157-perf+ #1 Thu Apr 20 17:45:29 CST 2023
Android : 12
Hi, how can I reproduce the issue?
Also, what do you mean with the origin? That's a completely different app :)
Also, what do you mean with the origin? That's a completely different app :)
Yeah. I somehow copied the wrong link. Apologies.
Hi, how can I reproduce the issue?
I don't know – all I know is that I can't launch the app anymore with my Fairphone 4. Can I somehow provide a useful stacktrace to you? (I think adb
lets me.)
Ah I see! No problem.
It should actually happened automatically if the Play Framework is installed on your phone (should be by default).
Android automatically collects crash logs and pushes them into the developer console. I'll take a look at it!
Is there a way you can capture the Logcat output? The stacktraces in the Developer Console don't help me at all sadly :/
Yeah, @Florianisme, I imagine they don't – per https://forum.fairphone.com/t/market-feedback-agent-unusable-since-a12-update/95335?u=rokejulianlockhart, I doubt that my device is even sending logs, rather unfortunately.
I'll try to dump logcat today for ya.
Hi, did you manage to get anything yet? It looks like it's happening to others aswell, but I wasn't able to reproduce anything yet.
I think you are the only one with the required technical knowledge to help me in this situation 😁
I think I just encountered exactly what you were describing:
FATAL EXCEPTION: main Process: de.florianisme.wakeonlan, PID: 12717 java.lang.RuntimeException: Unable to start activity ComponentInfo{de.florianisme.wakeonlan/de.florianisme.wakeonlan.ui.MainActivity}: android.view.InflateException: Binary XML file line #30 in de.florianisme.wakeonlan:layout/activity_main: Binary XML file line #18 in de.florianisme.wakeonlan:layout/content_main: Error inflating class fragment at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3645) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3782) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101) 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:2307) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:201) at android.os.Looper.loop(Looper.java:288) at android.app.ActivityThread.main(ActivityThread.java:7872) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936) Caused by: android.view.InflateException: Binary XML file line #30 in de.florianisme.wakeonlan:layout/activity_main: Binary XML file line #18 in de.florianisme.wakeonlan:layout/content_main: Error inflating class fragment Caused by: android.view.InflateException: Binary XML file line #18 in de.florianisme.wakeonlan:layout/content_main: Error inflating class fragment Caused by: java.lang.IllegalStateException: A migration from 4 to 3 was required but not found. Please provide the necessary Migration path via RoomDatabase.Builder.addMigration(Migration ...) or allow for destructive migrations via one of the RoomDatabase.Builder.fallbackToDestructiveMigration* methods. at androidx.room.RoomOpenHelper.onUpgrade(RoomOpenHelper.kt:110) at androidx.room.RoomOpenHelper.onDowngrade(RoomOpenHelper.kt:123) at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper$OpenHelper.onDowngrade(FrameworkSQLiteOpenHelper.kt:269) at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:414) at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:316) at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper$OpenHelper.getWritableOrReadableDatabase(FrameworkSQLiteOpenHelper.kt:231) at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper$OpenHelper.innerGetDatabase(FrameworkSQLiteOpenHelper.kt:189) at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper$OpenHelper.getSupportDatabase(FrameworkSQLiteOpenHelper.kt:151) at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper.getWritableDatabase(FrameworkSQLiteOpenHelper.kt:104) at androidx.room.RoomDatabase.inTransaction(RoomDatabase.kt:629) at androidx.room.RoomDatabase.assertNotSuspendingTransaction(RoomDatabase.kt:448) at de.florianisme.wakeonlan.persistence.DeviceDao_Impl.getAll(DeviceDao_Impl.java:198) at de.florianisme.wakeonlan.persistence.repository.DeviceRepository.getAll(DeviceRepository.java:33) at de.florianisme.wakeonlan.ui.list.DeviceListFragment.instantiateRecyclerView(DeviceListFragment.java:54) at de.florianisme.wakeonlan.ui.list.DeviceListFragment.onViewCreated(DeviceListFragment.java:43) at androidx.fragment.app.Fragment.performViewCreated(Fragment.java:3128) at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:552) at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:261) at androidx.fragment.app.FragmentStore.moveToExpectedState(FragmentStore.java:113) at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1433) at androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:2977) at androidx.fragment.app.FragmentManager.dispatchViewCreated(FragmentManager.java:2888) at androidx.fragment.app.Fragment.performViewCreated(Fragment.java:3129) at androidx.fragment.app.FragmentStateManager.ensureInflatedView(FragmentStateManager.java:394) at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:260) at androidx.fragment.app.FragmentLayoutInflaterFactory.onCreateView(FragmentLayoutInflaterFactory.java:142) at androidx.fragment.app.FragmentController.onCreateView(FragmentController.java:136) at androidx.fragment.app.FragmentActivity.dispatchFragmentsOnCreateView(FragmentActivity.java:248) at androidx.fragment.app.FragmentActivity.onCreateView(FragmentActivity.java:227) at android.view.LayoutInflater.tryCreateView(LayoutInflater.java:1073) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:1001) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:965) at android.view.LayoutInflater.rInflate(LayoutInflater.java:1127) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1088) at android.view.LayoutInflater.parseInclude(LayoutInflater.java:1267) at android.view.LayoutInflater.rInflate(LayoutInflater.java:1123) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1088) at android.view.LayoutInflater.rInflate(LayoutInflater.java:1130) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1088) at android.view.LayoutInflater.inflate(LayoutInflater.java:686) at android.view.LayoutInflater.inflate(LayoutInflater.java:538) at de.florianisme.wakeonlan.databinding.ActivityMainBinding.inflate(ActivityMainBinding.java:54) at de.florianisme.wakeonlan.databinding.ActivityMainBinding.inflate(ActivityMainBinding.java:48) at de.florianisme.wakeonlan.ui.MainActivity.onCreate(MainActivity.java:34) at android.app.Activity.performCreate(Activity.java:8305) at android.app.Activity.performCreate(Activity.java:8284) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1417) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3626) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3782) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101) 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:2307) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:201) at android.os.Looper.loop(Looper.java:288) at android.app.ActivityThread.main(ActivityThread.java:7872) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
For some reason it says:
A migration from 4 to 3 was required but not found
Did you manually install the version from #7 before, specifically the one from this comment? #7 (comment)
Theres actually another one which might explain, why the beta users are experiencing the same erroneous behavior:
Caused by: java.lang.IllegalStateException: Migration didn't properly handle: Devices(de.florianisme.wakeonlan.persistence.entities.DeviceEntity). Expected: TableInfo{name='Devices', columns={ssh_port=Column{name='ssh_port', type='INTEGER', affinity='3', notNull=false, primaryKeyPosition=0, defaultValue='undefined'}, ssh_command=Column{name='ssh_command', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='undefined'}, broadcast_address=Column{name='broadcast_address', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='undefined'}, status_ip=Column{name='status_ip', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='undefined'}, ssh_address=Column{name='ssh_address', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='undefined'}, enable_remote_shutdown=Column{name='enable_remote_shutdown', type='INTEGER', affinity='3', notNull=true, primaryKeyPosition=0, defaultValue='false'}, port=Column{name='port', type='INTEGER', affinity='3', notNull=true, primaryKeyPosition=0, defaultValue='undefined'}, secure_on_password=Column{name='secure_on_password', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='undefined'}, mac_address=Column{name='mac_address', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='undefined'}, name=Column{name='name', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='undefined'}, id=Column{name='id', type='INTEGER', affinity='3', notNull=true, primaryKeyPosition=1, defaultValue='undefined'}, ssh_password=Column{name='ssh_password', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='undefined'}, ssh_user=Column{name='ssh_user', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='undefined'}}, foreignKeys=[], indices=[]} Found: 2023-05-30 19:37:55.015 15310-15310 AndroidRuntime de.florianisme.wakeonlan E TableInfo{name='Devices', columns={id=Column{name='id', type='INTEGER', affinity='3', notNull=true, primaryKeyPosition=1, defaultValue='undefined'}, name=Column{name='name', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='undefined'}, mac_address=Column{name='mac_address', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='undefined'}, broadcast_address=Column{name='broadcast_address', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='undefined'}, port=Column{name='port', type='INTEGER', affinity='3', notNull=true, primaryKeyPosition=0, defaultValue='undefined'}, status_ip=Column{name='status_ip', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='undefined'}, secure_on_password=Column{name='secure_on_password', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='undefined'}, enable_remote_shutdown=Column{name='enable_remote_shutdown', type='BOOLEAN', affinity='1', notNull=false, primaryKeyPosition=0, defaultValue='undefined'}, ssh_address=Column{name='ssh_address', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='undefined'}, ssh_port=Column{name='ssh_port', type='INTEGER', affinity='3', notNull=false, primaryKeyPosition=0, defaultValue='undefined'}, ssh_user=Column{name='ssh_user', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='undefined'}, ssh_password=Column{name='ssh_password', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='undefined'}, ssh_command=Column{name='ssh_command', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='undefined'}}, foreignKeys=[], indices=[]} at androidx.room.RoomOpenHelper.onUpgrade(RoomOpenHelper.kt:94) at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper$OpenHelper.onUpgrade(FrameworkSQLiteOpenHelper.kt:252)
This time I think it's because I made a mistake in the migration file, not setting a default value for the enable_remote_shutdown
column.
Looking at the most recent crash statistics this seems to be fixed. Thanks for your report :)
Looking at the most recent crash statistics this seems to be fixed. Thanks for your report :)
Yes, sorry, @Florianisme. Week's been hectic. It has indeed been fixed for me too.
Glad it's working for you now! Thanks again :)