Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Conversation

@hatzyuta
Copy link

On iOS, when WebView failed to load web pages for some reasons(e.g. 'ATS' on iOS),there is no process to show error messages to developers in the current version of 'webview_flutter' plugin.
I added error message display especially on iOS so that developers realize the reason why webview fails to load.

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

@hatzyuta
Copy link
Author

I signed it!

@googlebot
Copy link

CLAs look good, thanks!

@ened
Copy link
Contributor

ened commented Dec 11, 2018

Could this also happen on Android?

@hatzyuta
Copy link
Author

@ened
'ATS' is specific to iOS,but Android's webview often fails to load due to mis-setting(e.g. permission).
Should I add the same code on Android ,too?

@ened
Copy link
Contributor

ened commented Dec 11, 2018

@hatzyuta Perhaps yes, especially as the INTERNET permission on Android is not per se a requirement for WebView. (It could be used to display a bundled HTML file, too). I think it would be good to have complete error logs on all platforms.

@hatzyuta
Copy link
Author

@ened
OK, I will. Thanks.

@hatzyuta
Copy link
Author

@ened
I also added the same code on Android.

@ened
Copy link
Contributor

ened commented Dec 13, 2018

@hatzyuta lovely. @amirh is this something for you?

@cyanglaz cyanglaz added the submit queue The Flutter team is in the process of landing this PR. label Feb 22, 2019
@cyanglaz cyanglaz changed the title Adding error message display on iOS WebView [webview_flutter]Adding error message display on iOS WebView Feb 22, 2019
Copy link
Contributor

@amirh amirh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution! left a comment, this will also need to be rebased.

- (void)webView:(WKWebView*)webView
didFailNavigation:(WKNavigation*)navigation
withError:(NSError*)error {
NSLog(@"%@", error.description);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest that we allow the Flutter application to register error listeners and invoke these, giving the app developer the power to decide whether to print error messages or to do something else with them.

@amirh amirh added in review and removed submit queue The Flutter team is in the process of landing this PR. labels Jul 11, 2019
@amirh
Copy link
Contributor

amirh commented Jul 11, 2019

It actually seems that what I've suggested is addressed by #1788 given that the other PR is closer to be merge-able I'd suggest closing the current PR.

@amirh
Copy link
Contributor

amirh commented Aug 8, 2019

Closing this PR as the issue is addressed by #1788

@amirh amirh closed this Aug 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants