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

Conversation

@mklim
Copy link
Contributor

@mklim mklim commented Oct 15, 2019

Description

The V2 embedding in webview_flutter depends on an extremely new bugfix
in flutter/engine. This was mentioned in the git log but that's
difficult to find. Add more warnings in the docs surrounding the new
code path.

In general this is an interesting problem. We can't select for the
higher version as a min SDK requirement because the old embedding path
doesn't need this bugfix. Ideally we should figure out a way to
programmatically enforce this constraint instead of relying on developer
documentation. This kind of problem is likely to happen again.

Related Issues

flutter/flutter#41851
flutter/engine#13015
flutter/flutter#42792

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (flutter analyze) does not report any problems on my PR.
  • I read and followed the Flutter Style Guide.
  • The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy.
  • I updated CHANGELOG.md to add a description of the change.
  • I signed the CLA.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • Yes, this is a breaking change (please indicate a breaking change in CHANGELOG.md and increment major revision).
  • No, this is not a breaking change.

/cc @matthew-carroll

@mklim mklim requested a review from amirh October 15, 2019 20:55
The V2 embedding in webview_flutter depends on an extremely new bugfix
in flutter/engine. This was mentioned in the git log but that's
difficult to find. Add more warnings in the docs surrounding the new
code path.

In general this is an interesting problem. We can't select for the
higher version as a min SDK requirement because the old embedding path
doesn't need this bugfix. Ideally we should figure out a way to
programmatically enforce this constraint instead of relying on developer
documentation. This kind of problem is likely to happen again.
Copy link
Contributor

@matthew-carroll matthew-carroll left a comment

Choose a reason for hiding this comment

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

LGTM

@mklim mklim merged commit 3305e37 into flutter:master Oct 15, 2019
@mklim mklim deleted the webview_docs branch October 15, 2019 22:06
@lbsfei
Copy link

lbsfei commented Oct 16, 2019

Hi Sir!
There is a bug for webview_flutter-0.3.15 : (you can see the jenkins logs)
[ ] /root/.pub-cache/hosted/pub.dartlang.org/webview_flutter-0.3.15/android/src/main/java/io/flutter/plugins/webviewflutter/WebViewFlutterPlugin.java:60: error: cannot find symbol
[ ] .getPlatformViewsController()
[ ] ^
[ ] symbol: method getPlatformViewsController()
[ ] location: class FlutterEngine
[ ] /root/.pub-cache/hosted/pub.dartlang.org/webview_flutter-0.3.15/android/src/main/java/io/flutter/plugins/webviewflutter/FlutterWebView.java:100: error: method does not override or implement a method from a supertype
[ ] @OverRide
[ ] ^
[ ] /root/.pub-cache/hosted/pub.dartlang.org/webview_flutter-0.3.15/android/src/main/java/io/flutter/plugins/webviewflutter/FlutterWebView.java:105: error: method does not override or implement a method from a supertype
[ ] @OverRide
[ ] ^
[ ] Note: Some input files use or override a deprecated API.
[ ] Note: Recompile with -Xlint:deprecation for details.
[ ] 3 errors
-------------------------------------bug as above-----------------------------------

@amirh
Copy link
Contributor

amirh commented Oct 16, 2019

Seems like we've used an engine Java method that's not available on stable :(

I feel like we should wait for this to be available on master before adding it to the plugin. My suggestion would be to revert this change and re-publish a v1 only version.

Alternatively we could consider using reflection to access this method, but this is getting dirtier...

@mklim @matthew-carroll

@mklim
Copy link
Contributor Author

mklim commented Oct 16, 2019

@lbsfei thanks for the bug report!

@amirh looks like that method rolled in v1.8.1. flutter/flutter@763ce63, flutter/engine#9206, which is below the latest stable. The problem here looks like the plugin is set to require something lower than the latest stable in its pubspec.yaml, 1.6.7. The other plugins only needed that version so it looks like I probably bumped it and missed that this broke on that version.

@amirh
Copy link
Contributor

amirh commented Oct 16, 2019

@mklim make sense.
Lets move the discussion to an issue: flutter/flutter#42860

mormih pushed a commit to mormih/plugins that referenced this pull request Nov 17, 2019
The V2 embedding in webview_flutter depends on an extremely new bugfix
in flutter/engine. This was mentioned in the git log but that's
difficult to find. Add more warnings in the docs surrounding the new
code path.

In general this is an interesting problem. We can't select for the
higher version as a min SDK requirement because the old embedding path
doesn't need this bugfix. Ideally we should figure out a way to
programmatically enforce this constraint instead of relying on developer
documentation. This kind of problem is likely to happen again.
sungmin-park pushed a commit to sungmin-park/flutter-plugins that referenced this pull request Dec 17, 2019
The V2 embedding in webview_flutter depends on an extremely new bugfix
in flutter/engine. This was mentioned in the git log but that's
difficult to find. Add more warnings in the docs surrounding the new
code path.

In general this is an interesting problem. We can't select for the
higher version as a min SDK requirement because the old embedding path
doesn't need this bugfix. Ideally we should figure out a way to
programmatically enforce this constraint instead of relying on developer
documentation. This kind of problem is likely to happen again.
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