Describe the bug
Exported data on old phone. Tried to import csv on new phone, app crashed. Same behavior with old export file from 2022 that worked previously.
To Reproduce
Steps to reproduce the behavior:
Go to import
Select CSV
See error
Error Details:
Build version: 2.5.2
Build date: 1981-01-01 01:01:02
Current date: 2024-01-15 23:37:30
Device: Google Pixel 8 Pro
OS version: Android 14 (SDK 34)
Stack trace:
java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=100, result=-1, data=Intent { dat=content://org.nextcloud.documents/... flg=0x1 }} to activity {com.health.openscale/com.health.openscale.gui.MainActivity}: android.os.NetworkOnMainThreadException
at android.app.ActivityThread.deliverResults(ActivityThread.java:5568)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:5607)
at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:67)
at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:139)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:96)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2468)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:205)
at android.os.Looper.loop(Looper.java:294)
at android.app.ActivityThread.main(ActivityThread.java:8248)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)
Caused by: android.os.NetworkOnMainThreadException
at android.os.Parcel.createExceptionOrNull(Parcel.java:3067)
at android.os.Parcel.createException(Parcel.java:3041)
at android.os.Parcel.readException(Parcel.java:3024)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:190)
at android.database.DatabaseUtils.readExceptionWithFileNotFoundExceptionFromParcel(DatabaseUtils.java:153)
at android.content.ContentProviderProxy.openTypedAssetFile(ContentProviderNative.java:814)
at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:2043)
at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:1858)
at android.content.ContentResolver.openInputStream(ContentResolver.java:1528)
at com.health.openscale.core.OpenScale.importData(OpenScale.java:513)
at com.health.openscale.gui.MainActivity.onActivityResult(MainActivity.java:1016)
at android.app.Activity.dispatchActivityResult(Activity.java:8969)
at android.app.ActivityThread.deliverResults(ActivityThread.java:5561)
... 13 more
Describe the bug Exported data on old phone. Tried to import csv on new phone, app crashed. Same behavior with old export file from 2022 that worked previously.
To Reproduce Steps to reproduce the behavior:
Error Details: Build version: 2.5.2 Build date: 1981-01-01 01:01:02 Current date: 2024-01-15 23:37:30 Device: Google Pixel 8 Pro OS version: Android 14 (SDK 34)
Stack trace:
java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=100, result=-1, data=Intent { dat=content://org.nextcloud.documents/... flg=0x1 }} to activity {com.health.openscale/com.health.openscale.gui.MainActivity}: android.os.NetworkOnMainThreadException at android.app.ActivityThread.deliverResults(ActivityThread.java:5568) at android.app.ActivityThread.handleSendResult(ActivityThread.java:5607) at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:67) at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:139) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:96) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2468) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:205) at android.os.Looper.loop(Looper.java:294) at android.app.ActivityThread.main(ActivityThread.java:8248) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971) Caused by: android.os.NetworkOnMainThreadException at android.os.Parcel.createExceptionOrNull(Parcel.java:3067) at android.os.Parcel.createException(Parcel.java:3041) at android.os.Parcel.readException(Parcel.java:3024) at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:190) at android.database.DatabaseUtils.readExceptionWithFileNotFoundExceptionFromParcel(DatabaseUtils.java:153) at android.content.ContentProviderProxy.openTypedAssetFile(ContentProviderNative.java:814) at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:2043) at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:1858) at android.content.ContentResolver.openInputStream(ContentResolver.java:1528) at com.health.openscale.core.OpenScale.importData(OpenScale.java:513) at com.health.openscale.gui.MainActivity.onActivityResult(MainActivity.java:1016) at android.app.Activity.dispatchActivityResult(Activity.java:8969) at android.app.ActivityThread.deliverResults(ActivityThread.java:5561) ... 13 more