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

Webview crashes on url change on iOS #62

Closed
jimsimon opened this issue Apr 13, 2018 · 13 comments
Closed

Webview crashes on url change on iOS #62

jimsimon opened this issue Apr 13, 2018 · 13 comments

Comments

@jimsimon
Copy link

I'm getting the following error while trying to use the webview on iOS (via the Simulator) which is crashing the app. It only seems to happen for some URLs. On Android everything works fine, but on iOS I'm able to get through the login prompt and oAuth acceptance pages, but then it crashes when it tries to navigate to the actual authenticated app.

Unsupported value: <FlutterError: 0x60800023b740> of type FlutterError
*** First throw call stack:
(
	0   CoreFoundation                      0x000000010dff51e6 __exceptionPreprocess + 294
	1   libobjc.A.dylib                     0x000000010d68a031 objc_exception_throw + 48
	2   CoreFoundation                      0x000000010dffa472 +[NSException raise:format:arguments:] + 98
	3   Foundation                          0x000000010d12d652 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 193
	4   Flutter                             0x000000010b89a808 -[FlutterStandardWriter writeValue:] + 2091
	5   Flutter                             0x000000010b89ae52 -[FlutterStandardMethodCodec encodeMethodCall:] + 136
	6   Flutter                             0x000000010b8945dc -[FlutterMethodChannel invokeMethod:arguments:] + 58
	7   flutter_webview_plugin              0x000000010d052b62 -[FlutterWebviewPlugin webView:didFailNav<…>
Lost connection to device.
@jimsimon
Copy link
Author

I also tried using evalJavascript to change the browser URL to the desired page and that causes it to crash as well.

@lejard-h
Copy link
Collaborator

might be related to this #49

@jimsimon
Copy link
Author

I don't think it is since I'm using an https url.

@jimsimon
Copy link
Author

The only other thing that's weird about the urls involved is that there are two different top level domains involved. The last navigation goes from subdomain.a.com to subdomain.b.com.

@jimsimon
Copy link
Author

FWIW I tried disabling the transport security as mentioned in #49's proposed workaround, but it didn't seem to help.

@js1972
Copy link
Contributor

js1972 commented May 18, 2018

I'm having similar issues on url changing... Doesn't happen all the time. Maybe once every 3 or 4 times for example. Can't duplicate the issue on Android.
Note: Have just run a flutter upgrade and now cannot duplicate the issue on iOS... Something must have changed very recently as I did a flutter upgrade on the beta channel only 2 days ago...

@js1972
Copy link
Contributor

js1972 commented May 18, 2018

... spoke too soon... Just had a straight run with executing my app about ten times in a row with the error but its back... ;-(

It seems to be a stale issue - last update back around a month ago - has anyone found a solution or moved onto a different webview plugin maybe?

@lejard-h
Copy link
Collaborator

can you try with the last version 0.1.6 ?

@gerryhigh
Copy link

It is still crashing in 0.1.6. I am using https and the web content is as well. The last things logged are:

flutter: webview on state changed. Instance of 'WebViewStateChanged'
Unsupported value: <FlutterError: 0x1d4223fc0> of type FlutterError

Note that some URLs work but some don't. And it is only crashing on my iPhone (not on the simulator).

@simon-tse-hs
Copy link

I'm also running into this problem for iOS. It works fine for Android. Using 0.1.6

@jadeboer
Copy link

jadeboer commented Jun 7, 2018

Same issue with iOS webview in simulator.

On attempt to tap on a input field, where the webview would normally show the OSK, the webview immediately crashes ::

Unsupported value: <FlutterError: 0x6080002298c0> of type FlutterError *** First throw call stack: ( 0 CoreFoundation 0x0000000104d2212b __exceptionPreprocess + 171 1 libobjc.A.dylib 0x00000001043b6f41 objc_exception_throw + 48 2 CoreFoundation 0x0000000104d272f2 +[NSException raise:format:arguments:] + 98 3 Foundation 0x0000000103e57d69 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 193 4 Flutter 0x000000010252bf53 -[FlutterStandardWriter writeValue:] + 2091 5 Flutter 0x000000010252a65d -[FlutterStandardMethodCodec encodeMethodCall:] + 136 6 Flutter 0x0000000102525480 -[FlutterMethodChannel invokeMethod:arguments:] + 58 7 Runner 0x000000010248d992 -[FlutterWebviewPlugin webView:didFailNav<…>

@charafau
Copy link
Collaborator

closing because it's fixed.

@tony123S
Copy link

tony123S commented May 6, 2020

fixed? What's the solution?

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

8 participants