-
Notifications
You must be signed in to change notification settings - Fork 26.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dart_plugin_registrant.dart + AOT + --obfuscation #137972
Comments
There needs to be a |
Just to confirm: are you saying that if you pass |
Correct. It's as if in the non-working case it's taking an alternate entry. Non-working cases default to platform channel. The other pattern I determined is the working cases are all "local" packages. The non-working case use "remote" packages. Not sure if Android and iOS default to having obfuscation set. If so that might explain why it's now showing up. There was another issue a while back about obfuscation breaking dart registration I was looking at. Which introduced the --source solution. |
@jwinarske , would it be possible for you to make actual repro out of https://github.com/flutter/packages/tree/main/packages/flutter_image/example for example? This should help understand better where in the stack there is obfuscate vs non-obfuscate confusion. cc'ing @stuartmorgan since it seems to be in plugins/packages realm. |
It is unclear to me what the expected outcome of this issue is given that #103660 and #107762 both explained that what this issue lists under "expected results" is in fact a bug that we intend to fix. As far as I can tell this is a duplicate of #107762. |
@stuartmorgan this is a new issue. Which in everything I've read should not behave this way. There is also another issue that drove the --source option; where dart plugin registrant was ignored only when obfuscated was set. Which indicated this might be a leftover corner case. Cross compiling an AOT by script or manually on a host machine is a valid use case. Dart pluginn registrant (vm entry) works today if I enable obsfucation when dealing with "remote package" definitions. In all cases of "local packages" plug-in references work with or without obfuscation. |
It would be helpful if you could add more detail to the STR then. Right now the STR section is just links to a script that appear to be part of a build process rather than actual steps, so I was trying to extrapolate from that, and it appeared that you were describing a situation where—when building for a third-party embedding—the |
@stuartmorgan your referenced case is the difference of dart plugin registrant between debug and AOT. I resolved issue on my side using the --source options (third party tooling). This case is related to obfuscation and dart plugin registration. Two independent things. The build steps I referenced is one way to reproduce this issue. Is obfuscation enabled by default for mobile? |
I understand that the exact details of what you are saying is different between the case where the registration runs and the case where it doesn't are different. That's why I said it would be the same "in the important respects". I'm still not clear whether my understanding of the issue described in my last comment is correct or not. Please provide actual steps to reproduce the issue so that it's clear what the scenario is here. |
I'm removing |
Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
Is there an existing issue for this?
Steps to reproduce
Manually build AOT components where you can control use of the --obfuscate flag.
Build sequences:
https://github.com/meta-flutter/meta-flutter/blob/kirkstone/conf/include/flutter-app.inc#L269
https://github.com/meta-flutter/meta-flutter/blob/kirkstone/conf/include/flutter-app.inc#L318-L329
Expected results
correctly register plugins regardless of obfuscate flag
Actual results
without passing --obfuscate to
gen_snapshot
:passing --obfuscate to
gen_snapshot
:Dumping symbols from AOT in both cases using readelf, the expected entry points are present:
working
not working
Code sample
NA
Screenshots or Video
NA
Logs
NA
Flutter Doctor output
Doctor output
The text was updated successfully, but these errors were encountered: