Not sure if this is the best place to ask about this but here goes anyway.
When I attempt to add a document to an expense via the “Take Picture” function, the app crashes and the document is not saved to the expense record.
Steps to reproduce:
Go to existing expense or create new one in the Android app.
Go to “Documents” tab and tap “Take Picture.”
When the camera viewer shows up, take a photo.
Once a photo has been taken, tap the tick in the bottom-right corner. The app will immediately crash at this point with 100% reliability.
Work-around: you can take a photo with the regular camera app and then choose “Upload File” in step 2. This works just fine.
App version: 5.0.93 (F-Droid). 5.0.90 also has the same error.
Android version: LineageOS 18.1 (Xiaomi Redmi Note 7/Android 11)
Web app version: 5.5.24-C93 self-hosted (probably doesn’t matter though)
Partial stack trace:
FATAL EXCEPTION: main
Process: com.invoiceninja.app, PID: 5656
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:5013)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:5054)
at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:51)
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:2066)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7664)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: java.lang.IllegalStateException: Reply already submitted
at io.flutter.embedding.engine.f.e$g.a(DartMessenger.java:4)
at i.a.c.a.k$a$a.a(MethodChannel.java:1)
at m.a.a.a.a.b.a(ImageCropperDelegate.java:6)
at io.flutter.embedding.engine.d$c.g(FlutterEngineConnectionRegistry.java:2)
at io.flutter.embedding.engine.d.a(FlutterEngineConnectionRegistry.java:3)
at io.flutter.embedding.android.g.o(FlutterActivityAndFragmentDelegate.java:4)
at io.flutter.embedding.android.k.H0(FlutterFragment.java:2)
at io.flutter.embedding.android.l.onActivityResult(FlutterFragmentActivity.java:2)
at android.app.Activity.dispatchActivityResult(Activity.java:8304)
at android.app.ActivityThread.deliverResults(ActivityThread.java:5006)
… 11 more
Has anyone experienced this or have any solutions (other than my work-around)?
I’ve never managed to crash the app by attaching an existing picture. Only using the camera within the app 100% reliably crashes. The issue you linked to looks quite similar but they report that crashes occur only sometimes whereas mine is always. Other than that, the error message is a little different, but still similar. I will monitor that issue and see where it leads so thanks for the link. At least I have a reliable work-around so it won’t stop me from doing what I need to do.