pichillilorenzo / flutter_inappwebview

A Flutter plugin that allows you to add an inline webview, to use a headless webview, and to open an in-app browser window.
https://inappwebview.dev
Apache License 2.0
3.31k stars 1.64k forks source link

"Open camera" click action on the webpage is throwing exception and not working as expected. This happening only in Android and fine in iOS. #1895

Open ananthkumar-gavstech opened 12 months ago

ananthkumar-gavstech commented 12 months ago

I am attaching an image for your reference. Please advise how to fix this issue. This is blocker in our application to release. ![Uploading WhatsApp Image 2023-11-18 at 1.27.01 PM.jpeg…]()

github-actions[bot] commented 12 months ago

👋 @ananthkumar-gavstech

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!

pichillilorenzo commented 12 months ago

I can't see your screenshot. By the way, check https://github.com/pichillilorenzo/flutter_inappwebview/issues/1890

Otherwise, post error logs.

ananthkumar-gavstech commented 12 months ago

Thanks for your response and quick support!

WhatsApp Image 2023-11-18 at 1 27 01 PM

Your can also, find the image here.

https://i.stack.imgur.com/FNHPz.jpg

https://stackoverflow.com/questions/77597649/why-i-am-getting-this-error-when-i-tried-to-open-a-url-through-flutter-inappwebvx

pichillilorenzo commented 12 months ago

This is a javascript error, it's not coming from Flutter plugin. Maybe this doesn't depend on you but on the javascript used in that Website.

For WebRTC setup, check https://inappwebview.dev/docs/web-rtc

pichillilorenzo commented 12 months ago

For camera inputs, check: https://inappwebview.dev/docs/intro#enable-camera-for-html-inputs

ananthkumar-gavstech commented 12 months ago

Thanks for your inputs, I have already requested for all the needs permissions. Also this works perfectly in iOS. Any suggestion on what could changed at the javascript (website) end to get this sorted for Android?

pichillilorenzo commented 12 months ago

I don't know, this is out of scope of the plugin. If possible, you should debug the javascript code

karu26 commented 11 months ago

@ananthkumar-gavstech can you send ios code actually in ios phone not working android fine

rpekarek-tc commented 10 months ago

Same thing happening to us. It works fine in a native browser and on iOS but doesn't work for Android