Uh oh!
There was an error while loading. Please reload this page.
[webview_flutter_web] Migrate to package:web. - #6792
Conversation
Uh oh!
There was an error while loading. Please reload this page.
The tests that seem to be failing now are just the ones in the legacy/ folder, that we require to create a mock And these two calls that i do not understand what it is trying to do. https://github.com/flutter/packages/blob/a598bef16e6f00db6cc12f62c758c70f7b452607/packages/webview_flutter/webview_flutter_web/test/legacy/webview_flutter_web_test.dart#L84 Legacy tests N-2 are failing due to the
nvm, |
79c0198 to
fa99260Compareditman
commented
May 25, 2024
Thanks for the PR @ThomasAunvik! I'll take a look! (Please take into account that next monday is a holiday in the US, so I won't be able to get to this until next tuesday at the earliest) |
uldall
commented
Jun 3, 2024
I have been experimenting with this PR for a few days, and run into the issue that the created <iframe> doesn't have the I think it would make sense to make it possible to specify whether this attribute should be set from Flutter code? |
Looking at the compatability, firefox and safari is not yet supported, but an option to enable it would be beneficial once it is fully supported.
|
uldall
commented
Jun 3, 2024
In most cases people don't own the sites that they iframe, and it can be very hard to convince a third party to add support for these headers.
I don't see why we would wait. The WASM builds are already only supported in Chromium based browsers. But I also understand if you don't want to add it in this PR :) |
Nevermind i got confused on how the cors weirdness works, as i did pain with it too. It would work on setting credentialless on the iframe. It can be easily done by adding this right after _webWebViewParams.iFrame.setAttribute('credentialless', 'true');As the current
|
Here is a proposal on how setting the /// Sets the IFrame Credentialless/// https://developer.mozilla.org/en-US/docs/Web/Security/IFrame_credentiallessvoidsetIFrameCredentialless(bool flag) {
_webWebViewParams.iFrame
.setAttribute('credentialless', flag ?'true':'false');
}And to set it would be as such: if(WebViewPlatform.instance isWebWebViewPlatform) {
WebWebViewController(
constPlatformWebViewControllerCreationParams(),
)
..setIFrameCredentialless(true)
..loadRequest(
LoadRequestParams(
uri:Uri.parse('https://flutter.dev'),
),
))
}
I have set up a branch for it: https://github.com/ThomasAunvik/flutter-packages/tree/wasmcredentialless Would like feedback. Another issue would be that |
uldall
commented
Jun 4, 2024
It seems that on other platforms these kind of platform specific parameters are set on the An example from the Webkit impl. Here some boolean parameters like I am by no means well versed in the Flutter codebase, but this was just my best effort on some feedback. I will be going on vacation for a week, but will test the new branch when I am back :) |
kevmoo
commented
Jun 10, 2024
What's the status here, friends? |
uldall
commented
Jun 12, 2024
kevmoo
commented
Jun 12, 2024
@ditman would you take a look? |
uldall
commented
Jun 12, 2024
I have been testing the PR quite a bit, and created this issue because Godot games being loaded in the iframe resulted in an error: flutter/flutter#150119 However since then I have also started getting the error on other sites (for example https://flutter.dev/). It does however work great on a payment site that I use. (reepay.com). I am not sure what properties of the iframe'ed site makes it throw the error. Maybe the error is unrelated to this PR, and probably a bug in the skwasm renderer? |
ditman
commented
Jun 26, 2024
This is next on my radar, after this lands: |
Co-authored-by: Navaron Bracke <brackenavaron@gmail.com>
Just verified in CI that this package enables the If this works for @ThomasAunvik, I think it's ready to land! |
Works as expected. Experiencing an issue when re-opening the iframe (and be using the same pdf blob data / url), iframe doesn't render properly, showing nothing just the background of the parent widget, until resizing the window. (on wasm only). |
ThomasAunvik
commented
Jul 9, 2024
Created a reproducible example: ThomasAunvik/flutter_webview_wasm_error@f75fddb Seems like this time I managed to make the iframe not appear at all when using Left is wasm on chrome, right is non-wasm using firefox. error.mp4Unless it is an issue with this package alone, i don't see it to be needing to not merge it with this issue, if that is also just a lower level flutter issue. |
@ThomasAunvik I think you've encountered something like this: Platform Views in Wasm have some positioning issues yet (it can also be seen with the default example app, I think) |
Let's try to autoland the PR! |
auto label is removed for flutter/packages/6792, due to This PR has not met approval requirements for merging. The PR author is not a member of flutter-hackers and needs 1 more review(s) in order to merge this PR.
|
kevmoo
commented
Jul 10, 2024
Rerunning failures and adding back auto-submit! |
auto label is removed for flutter/packages/6792, due to This PR has not met approval requirements for merging. The PR author is not a member of flutter-hackers and needs 1 more review(s) in order to merge this PR.
|
flutter/packages@14341d1...ea35fc6 2024-07-10 737941+loic-sharma@users.noreply.github.com [camera_avfoundation] Adds Swift Package Manager compatibility (flutter/packages#7080) 2024-07-10 737941+loic-sharma@users.noreply.github.com [webview_flutter_wkwebview] Adds Swift Package Manager compatibility (flutter/packages#7091) 2024-07-10 contact@thaun.dev [webview_flutter_web] Migrate to package:web. (flutter/packages#6792) 2024-07-10 stuartmorgan@google.com [camera] Clean up `maxDuration` code (flutter/packages#7039) 2024-07-10 reidbaker@google.com Update espresso dependencies (flutter/packages#7048) 2024-07-09 stuartmorgan@google.com [camera] Fix iOS torch mode regression (flutter/packages#7085) 2024-07-09 stuartmorgan@google.com [google_maps_flutter] Convert Obj-C->Dart calls to Pigeon (flutter/packages#7086) 2024-07-09 engine-flutter-autoroll@skia.org Roll Flutter from fafd67d to 5103d75 (27 revisions) (flutter/packages#7084) 2024-07-09 30872003+misos1@users.noreply.github.com [camera_avfoundation] fix sample times not being numeric after pause/resume. (flutter/packages#6897) 2024-07-09 stuartmorgan@google.com [camera] Convert Windows to Pigeon (flutter/packages#6925) 2024-07-09 stuartmorgan@google.com [camera] Deprecate `maxDuration` in platform interface (flutter/packages#7078) 2024-07-09 stuartmorgan@google.com [google_maps_flutter] Semi-convert remaining iOS host API calls to Pigeon (flutter/packages#7079) 2024-07-09 stuartmorgan@google.com [path_provider] Remove `win32` (flutter/packages#7073) 2024-07-08 stuartmorgan@google.com [google_maps_flutter] Move iOS inspector to Pigeon (flutter/packages#6937) 2024-07-08 49699333+dependabot[bot]@users.noreply.github.com [camera]: Bump com.android.tools.build:gradle from 7.3.0 to 8.5.0 in /packages/camera/camera_android_camerax/android (flutter/packages#7072) 2024-07-08 49699333+dependabot[bot]@users.noreply.github.com [local_auth]: Bump com.android.tools.build:gradle from 7.3.1 to 8.5.0 in /packages/local_auth/local_auth_android/android (flutter/packages#7069) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC flutter-ecosystem@google.com,rmistry@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
* Migrates to `package:web` flutter/flutter#139749 * Updates `HttpRequestFactory.request` to use `package:http` `BrowserClient` * Updates `ìndex.html` in the example to use `flutter_bootstrap.js` * Updates minimum dart sdk requirement to `^3.3.0` Would appreciate help with completing the mock tests if in case it does not work. (I am somehow stuck with 'loading...' when attempting to test with mockito with --platform chrome) Integration tests from what i was able to test passes. Migrated to using BrowserClient for web due to issues creating mock tests with `XMLHttpRequest` which is returned from `package:web`'s `HttpRequest.request` following error: `Bad state: Interface type 'XMLHttpRequest' which is nether an enum, nor a class, nor a mixin. This case is unknown, please report a bug.` Co-authored-by: David Iglesias <ditman@gmail.com> Co-authored-by: Navaron Bracke <brackenavaron@gmail.com>
* Migrates to `package:web` flutter/flutter#139749 * Updates `HttpRequestFactory.request` to use `package:http` `BrowserClient` * Updates `ìndex.html` in the example to use `flutter_bootstrap.js` * Updates minimum dart sdk requirement to `^3.3.0` Would appreciate help with completing the mock tests if in case it does not work. (I am somehow stuck with 'loading...' when attempting to test with mockito with --platform chrome) Integration tests from what i was able to test passes. Migrated to using BrowserClient for web due to issues creating mock tests with `XMLHttpRequest` which is returned from `package:web`'s `HttpRequest.request` following error: `Bad state: Interface type 'XMLHttpRequest' which is nether an enum, nor a class, nor a mixin. This case is unknown, please report a bug.` Co-authored-by: David Iglesias <ditman@gmail.com> Co-authored-by: Navaron Bracke <brackenavaron@gmail.com>

package:web[webview_flutter] migrate to pkg:web flutter#139749HttpRequestFactory.requestto usepackage:httpBrowserClientìndex.htmlin the example to useflutter_bootstrap.js^3.3.0Would appreciate help with completing the mock tests if in case it does not work.
(I am somehow stuck with 'loading...' when attempting to test with mockito with --platform chrome)
Integration tests from what i was able to test passes.
Migrated to using BrowserClient for web due to issues creating mock tests with
XMLHttpRequestwhich is returned frompackage:web'sHttpRequest.requestfollowing error:Bad state: Interface type 'XMLHttpRequest' which is nether an enum, nor a class, nor a mixin. This case is unknown, please report a bug.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.///).If you need help, consider asking for advice on the #hackers-new channel on Discord.
Co-authored-by: David Iglesias ditman@gmail.com
Co-authored-by: Navaron Bracke brackenavaron@gmail.com