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

Opening WebView crashes on iOS 12.1 simulator #261

Closed
BOBODDY opened this issue Dec 4, 2018 · 1 comment
Closed

Opening WebView crashes on iOS 12.1 simulator #261

BOBODDY opened this issue Dec 4, 2018 · 1 comment

Comments

@BOBODDY
Copy link

BOBODDY commented Dec 4, 2018

I'm using flutter_webview_plugin: ^0.3.0+2 in the recently announced flutter 1.0.0 to try to load an OAuth sign-in page. It works on Android but on iOS I get a crash when trying to load the web view.

This is how I'm creating the WebView:

WebviewScaffold(
        appBar: AppBar(
          title: Text("Sign in"),
        ),
        url: authUrl,
        userAgent: widget._userAgent,
  )

where authUrl is https://accounts.google.com/o/oauth2/v2/auth?scope=email+profile... with the rest of the OAuth parameters included and the user agent is Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36.

The crash that happens:

*** First throw call stack:
(
	0   CoreFoundation                      0x0000000110fca1bb __exceptionPreprocess + 331
	1   libobjc.A.dylib                     0x0000000110568735 objc_exception_throw + 48
	2   CoreFoundation                      0x0000000110fe8f44 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
	3   CoreFoundation                      0x0000000110fceed6 ___forwarding___ + 1446
	4   CoreFoundation                      0x0000000110fd0da8 _CF_forwarding_prep_0 + 120
	5   Runner                              0x000000010e6c5cd0 -[FlutterWebviewPlugin initWebview:] + 2832
	6   Runner                              0x000000010e6c4b9e -[FlutterWebviewPlugin handleMethodCall:result:] + 254
	7   Flutter                             0x000000010e7769a2 __45-[FlutterMethodChannel setMethodCallHandler:]_block_invoke + 115
	8   Flutter  <…>
Lost connection to device.

I just tried changing the URL to see if that was the case, but trying to open https://www.google.com also caused it to crash.

@BOBODDY
Copy link
Author

BOBODDY commented Dec 5, 2018

I created a new project to try to narrow down the issue but the problem no longer happened so I wonder if something was broken by me updating flutter.

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

1 participant