Uh oh!
There was an error while loading. Please reload this page.
[webview_flutter] Adds onHttpError callback to NavigationDelegate to catch HTTP error status codes - #3278
[webview_flutter] Adds onHttpError callback to NavigationDelegate to catch HTTP error status codes#3278HugoOlthof wants to merge 21 commits into
Conversation
cc7b6ad to
50559aeCompare
bparrishMines
left a comment
There was a problem hiding this comment.
Thanks for working on this! I made a first pass through.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
db91fe9 to
3021c65Compare
bparrishMines
left a comment
There was a problem hiding this comment.
Thanks for the work on this! This looks mostly ready. I just had a few more comments about documentation.
This is also missing integration tests for Android, iOS, and the app-facing api. They're located at:
https://github.com/flutter/packages/blob/main/packages/webview_flutter/webview_flutter_android/example/integration_test/webview_flutter_test.dart
The test called onWebResourceError should be a good example for each file. And you should be able to use '$prefixUrl/favicon.ico' as the test url that returns a 404 status code.
I think this is ready for a secondary review since only documentation and integration tests are left.
@cyanglaz can you look over the webview_flutter_wkwebview code as a secondary reviewer?
@stuartmorgan can you look over the platform interface/app-facing code as secondary reviewer?
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
stuartmorgan-g
commented
Mar 28, 2023
@HugoOlthof Are you planning on updating this based on the review feedback above? |
HugoOlthof
commented
Mar 28, 2023
@stuartmorgan Yes, I will update the PR as soon as possible! |
c1153fb to
390aee0Compare
bparrishMines
left a comment
There was a problem hiding this comment.
LGTM! with a handful of nits
After fixing the comments, you can go ahead and create the PR with just the code in webview_flutter_platform_interface.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
HugoOlthof
commented
Apr 5, 2023
This is the PR for |
Signed-off-by: Hugo Olthof <hugo@moneybird.com>
HugoOlthof
commented
Apr 12, 2023
The PR for the platform implementations: #3695 |
stuartmorgan-g
commented
May 16, 2023
Update from triage: this is waiting for the sub-PR to complete the review process. |
stuartmorgan-g
commented
Jun 13, 2023
Update from triage: sub-PR is still in progress. |
stuartmorgan-g
commented
Jul 13, 2023
Update from triage: Still waiting on #3695 |
Hixie
commented
Oct 24, 2023
stuartmorgan-g
commented
Jan 9, 2024
Update from triage: #5790 has been created as a copy of the blocking PR, to try to start unwinding this stack. |
stuartmorgan-g
commented
Jan 30, 2024
Update from triage: the last PR in the stack is resolved, and this is now blocked on getting the next PR over the line. |
stuartmorgan-g
commented
Mar 5, 2024
Update from triage: implementation PR (referenced just above) is still in progress. |
…plementations for onHttpError (#6149) Copy of #3695 since it doesn't contain permission to edit from contributors. Part of flutter/flutter#39502 Full PR #3278
bparrishMines
commented
Mar 23, 2024
closing in favor of #6378 |
…catch HTTP error status codes (#6378) This is a copy of #3278 since it doesn't allow for contributor access. Fixesflutter/flutter#39502
…plementations for onHttpError (#6149) Copy of flutter/packages#3695 since it doesn't contain permission to edit from contributors. Part of flutter/flutter#39502 Full PR flutter/packages#3278
…plementations for onHttpError (flutter#6149) Copy of flutter#3695 since it doesn't contain permission to edit from contributors. Part of flutter/flutter#39502 Full PR flutter#3278
…catch HTTP error status codes (flutter#6378) This is a copy of flutter#3278 since it doesn't allow for contributor access. Fixesflutter/flutter#39502
…plementations for onHttpError (flutter#6149) Copy of flutter#3695 since it doesn't contain permission to edit from contributors. Part of flutter/flutter#39502 Full PR flutter#3278
…catch HTTP error status codes (flutter#6378) This is a copy of flutter#3278 since it doesn't allow for contributor access. Fixesflutter/flutter#39502
This PR adds the onHttpError callback to NavigationDelegate to catch HTTP error status codes. In our app we need to catch the status codes to show native error pages/alerts or redirect users to the native login screen if the user is unauthenticated. The existing onWebResourceError is not sufficient.
The Android implementation uses the onReceiveHttpError callback from WebViewClient and the iOS implementation uses the decidePolicyForNavigationResponse delegate from WKWebView.
Fixesflutter/flutter#39502.
Pre-launch Checklist
dart format.)[shared_preferences]pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.mdto add a description of the change, following repository CHANGELOG style.///).