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

Conversation

@matthew-carroll
Copy link
Contributor

Prevent duplicate plugin registration in FlutterEnginePluginRegistry. (#49365)

This change will result in a typical full-Flutter app producing the following log output until we correct the larger meta issue in #49365

One time if v1 plugins are used:

Attempted to register plugin (io.flutter.embedding.engine.plugins.shim.ShimPluginRegistry$ShimRegistrarAggregate@6a8fdeb) but it was already registered with this FlutterEngine (io.flutter.embedding.engine.FlutterEngine@1de0230).

Once for each v2 plugin:

W/FlutterEnginePluginRegistry(14278): Attempted to register plugin (io.flutter.plugins.androidintent.AndroidIntentPlugin@213e748) but it was already registered with this FlutterEngine (io.flutter.embedding.engine.FlutterEngine@1de0230).

@mklim
Copy link
Contributor

mklim commented Jan 24, 2020

Manually spot checked this with mklim/test_plugin@f1a28ec.

Before this patch there were two just from flutter run on the same instance:

onAttachedToEngine: io.flutter.embedding.engine.FlutterEngine@1136d0d
onAttachedToEngine: io.flutter.embedding.engine.FlutterEngine@1136d0d

With this patch it looks like it's catching the second call.

onAttachedToEngine: io.flutter.embedding.engine.FlutterEngine@1136d0d
W/FlutterEnginePluginRegistry(11645): Attempted to register plugin (com.example.test_plugin.TestPlugin@a7a2d3) but it was already registered with this FlutterEngine (io.flutter.embedding.engine.FlutterEngine@1136d0d).

Copy link
Contributor

@mklim mklim left a comment

Choose a reason for hiding this comment

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

LGTM

This should fix firebase/flutterfire#1669 and addresses half of flutter/flutter#49365.

@matthew-carroll
Copy link
Contributor Author

Landed on red LUCI because the GitHub UI was out of sync with the LUCI dashboard. It was really green.

engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jan 25, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jan 25, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jan 25, 2020
engine-flutter-autoroll added a commit to flutter/flutter that referenced this pull request Jan 25, 2020
flutter/engine@51a7964...4218f80

git log 51a7964..4218f80 --first-parent --oneline
2020-01-25 [email protected] Roll fuchsia/sdk/core/mac-amd64 from 7fqYj... to 35pbn... (flutter/engine#15984)
2020-01-25 [email protected] updating the versions of the browsers for flutter web engine unit tests (flutter/engine#15977)
2020-01-25 [email protected] Eliminate unused import in Android embedding (flutter/engine#15975)
2020-01-24 [email protected] Prevent duplicate plugin registration in FlutterEnginePluginRegistry. (#49365) (flutter/engine#15956)
2020-01-24 [email protected] retry logic for another cipd upload (flutter/engine#15974)
2020-01-24 [email protected] Ensure GetFixturesPath works on Fuchsia (flutter/engine#15978)
2020-01-24 [email protected] [web] Calling platform message callback after copy (flutter/engine#15950)
2020-01-24 [email protected] [fuchsia] Expose view_ref as part of dart:fuchsia initialization (flutter/engine#15958)
2020-01-24 [email protected] Refactor ShellTest to allow for different ShellTestPlatformViews (flutter/engine#15972)
2020-01-24 [email protected] Cache computed window.physicalSize in a FrameReference (flutter/engine#15955)
2020-01-24 [email protected] the the fix (flutter/engine#15973)
2020-01-24 [email protected] Optimize drawRRect to use dom_canvas (flutter/engine#15970)
2020-01-24 [email protected] Remove paint apply in draw image (flutter/engine#15969)
2020-01-24 [email protected] Roll fuchsia/sdk/core/mac-amd64 from 6_pZp... to 7fqYj... (flutter/engine#15966)


If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected] on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md
NoamDev added a commit to NoamDev/engine that referenced this pull request Feb 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants