Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cant upload file #1073

Open
kamyabrs opened this issue Jan 7, 2022 · 3 comments
Open

cant upload file #1073

kamyabrs opened this issue Jan 7, 2022 · 3 comments

Comments

@kamyabrs
Copy link

kamyabrs commented Jan 7, 2022

I try to upload file on some website through inappwebview but the app crashes

@github-actions
Copy link

github-actions bot commented Jan 7, 2022

👋 @kamyabrs

NOTE: This comment is auto-generated.

Are you sure you have already searched for the same problem?

Some people open new issues but they didn't search for something similar or for the same issue. Please, search for it using the GitHub issue search box or on the official inappwebview.dev website, or, also, using Google, StackOverflow, etc. before posting a new one. You may already find an answer to your problem!

If this is really a new issue, then thank you for raising it. I will investigate it and get back to you as soon as possible. Please, make sure you have given me as much context as possible! Also, if you didn't already, post a code example that can replicate this issue.

In the meantime, you can already search for some possible solutions online! Because this plugin uses native WebView, you can search online for the same issue adding android WebView [MY ERROR HERE] or ios WKWebView [MY ERROR HERE] keywords.

Following these steps can save you, me, and other people a lot of time, thanks!

@FatihBaycu
Copy link

https://stackoverflow.com/a/71968030/16504129
This worked for me. I used the code as is, I did not make any changes.

@jrmessias
Copy link

Versions:
Flutter: 3.22.2
Dart: 3.4.3
InAppWebView: 6.0.0

I have the same problem...

The @FatihBaycu solution doesn't work for me.

At html file is used input file, when has clicked opens option to use camera or file select.

When I use file select the error occurs:

D/SessionLifecycleClient(17130): Sending lifecycle 2 to service
D/SessionLifecycleService(17130): Activity backgrounding at 4011771
I/FA (17130): Application backgrounded at: timestamp_millis: 1725883925529
D/Surface (17130): Surface::disconnect
D/BLASTBufferQueue(17130): SurfaceView[br.com.iopoint.app/br.com.iopoint.app.MainActivity]#1 destructor()
D/BufferQueueConsumer(17130): SurfaceView[br.com.iopoint.app/br.com.iopoint.app.MainActivity]#1(BLAST Consumer)1 disconnect
D/Surface (17130): Surface::disconnect
D/BLASTBufferQueue(17130): VRI[MainActivity]#0 destructor()
D/BufferQueueConsumer(17130): VRI[MainActivity]#0(BLAST Consumer)0 disconnect
[AndroidInAppWebViewController] (android) WebView ID 0 calling "onWindowBlur" using []
D/AndroidRuntime(17130): Shutting down VM
E/AndroidRuntime(17130): FATAL EXCEPTION: main
E/AndroidRuntime(17130): Process: br.com.iopoint.app, PID: 17130
E/AndroidRuntime(17130): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1, result=-1, data=Intent { dat=content://com.android.providers.media.documents/... flg=0x1 }} to activity {br.com.iopoint.app/br.com.iopoint.app.MainActivity}: java.lang.NullPointerException
E/AndroidRuntime(17130): at android.app.ActivityThread.deliverResults(ActivityThread.java:5654)
E/AndroidRuntime(17130): at android.app.ActivityThread.handleSendResult(ActivityThread.java:5693)
E/AndroidRuntime(17130): at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:67)
E/AndroidRuntime(17130): at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)
E/AndroidRuntime(17130): at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:139)
E/AndroidRuntime(17130): at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:96)
E/AndroidRuntime(17130): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2547)
E/AndroidRuntime(17130): at android.os.Handler.dispatchMessage(Handler.java:111)
E/AndroidRuntime(17130): at android.os.Looper.loopOnce(Looper.java:242)
E/AndroidRuntime(17130): at android.os.Looper.loop(Looper.java:362)
E/AndroidRuntime(17130): at android.app.ActivityThread.main(ActivityThread.java:8393)
E/AndroidRuntime(17130): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(17130): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
E/AndroidRuntime(17130): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:992)
E/AndroidRuntime(17130): Caused by: java.lang.NullPointerException
E/AndroidRuntime(17130): at br.com.gryfo.flutter_gryfo_lib.FlutterGryfoLibPlugin.onActivityResult(FlutterGryfoLibPlugin.kt:752)
E/AndroidRuntime(17130): at io.flutter.embedding.engine.FlutterEngineConnectionRegistry$FlutterEngineActivityPluginBinding.onActivityResult(FlutterEngineConnectionRegistry.java:774)
E/AndroidRuntime(17130): at io.flutter.embedding.engine.FlutterEngineConnectionRegistry.onActivityResult(FlutterEngineConnectionRegistry.java:422)
E/AndroidRuntime(17130): at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onActivityResult(FlutterActivityAndFragmentDelegate.java:964)
E/AndroidRuntime(17130): at io.flutter.embedding.android.FlutterFragment.onActivityResult(FlutterFragment.java:1240)
E/AndroidRuntime(17130): at io.flutter.embedding.android.FlutterFragmentActivity.onActivityResult(FlutterFragmentActivity.java:647)
E/AndroidRuntime(17130): at android.app.Activity.dispatchActivityResult(Activity.java:9086)
E/AndroidRuntime(17130): at android.app.ActivityThread.deliverResults(ActivityThread.java:5647)
E/AndroidRuntime(17130): ... 13 more
D/TrafficStats(17130): tagSocket(190) with statsTag=0xffffffff, statsUid=-1
I/Process (17130): Sending signal. PID: 17130 SIG: 9
Lost connection to device.

With camera works normally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants