invoiceninja / admin-portal

Invoice Ninja: Desktop/mobile admin portal built with Flutter
https://demo.invoiceninja.com
Other
1.62k stars 548 forks source link

Android APP: Take Picture to add to expense crashes the app #576

Closed db4rne closed 1 year ago

db4rne commented 1 year ago

Setup

Describe the bug

In expenses, taking a picture to add as a document doesn't work on Android

Steps To Reproduce

Expense -> Create an Expense, try to add a Picture under Documents "Take Picture". It will show a Camera, lets you take a Picture but once you click on the green checkmark, it will close the app. Upload a file works.

Expected Behavior

It should take a picture and upload it.

Additional context

I'm using the Android app from the Fdroid store.

Logs

Android Log I could save:

type: crash
osVersion: google/bluejay/bluejay:13/TQ2A.230505.002/2023051600:user/release-keys
package: com.invoiceninja.app:114
process: com.invoiceninja.app
processUptime: 9455 + 251 ms

java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=69, result=0, data=null} to activity {com.invoiceninja.app/com.invoiceninja.app.MainActivity}: java.lang.IllegalStateException: Reply already submitted
    at android.app.ActivityThread.deliverResults(ActivityThread.java:5349)
    at android.app.ActivityThread.handleSendResult(ActivityThread.java:5388)
    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:138)
    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2311)
    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:7903)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
    at com.android.internal.os.ExecInit.main(ExecInit.java:49)
    at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
    at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:355)
Caused by: java.lang.IllegalStateException: Reply already submitted
    at x0.c$g.a(DartMessenger.java:4)
    at k1.k$a$a.a(MethodChannel.java:1)
    at d3.b.a(ImageCropperDelegate.java:8)
    at io.flutter.embedding.engine.c$c.b(FlutterEngineConnectionRegistry.java:2)
    at io.flutter.embedding.engine.c.a(FlutterEngineConnectionRegistry.java:3)
    at io.flutter.embedding.android.d.o(FlutterActivityAndFragmentDelegate.java:4)
    at io.flutter.embedding.android.h.F0(FlutterFragment.java:2)
    at io.flutter.embedding.android.i.onActivityResult(FlutterFragmentActivity.java:2)
    at android.app.Activity.dispatchActivityResult(Activity.java:8711)
    at android.app.ActivityThread.deliverResults(ActivityThread.java:5342)
    ... 15 more

I also tried finding Logs about it on the server side, but there was nothing. If I can take any more steps/try anything else please let me know, I'm just not really knowledgeable in debugging Android.

hillelcoren commented 1 year ago

Thanks for reporting this! It should be corrected in the next release.