Closed PureWeen closed 6 months ago
Hello, I'm the original owner of the bug. Did you have time to have a preliminary look into this? Is there any suggestion for a workaround or possible solution? Thanks.
@radekdoulik we'd need an advice if you can: is there any other way to strip IL code plus compiling to native (achieving the sort of obfuscation / IP protection that we need) without using hybrid AOT? This would enable us to workaround this problem. Thanks!
Hello, I have the same problem with one of my customers apps. I described it here: https://forums.xamarin.com/discussion/177766/invalid-il-code-at-runtime-after-hybrid-aot-compilation After opening a support request with microsoft, the microsoft engineer told me to post here. Can you help me with this problem? Thanks, Timo
I am sorry for the delay. I have tested the App1
project with current master today and it doesn't crash. So hopefully it was fixed meanwhile.
I will try it with older version to make sure I can reproduce it and thus that it was indeed fixed.
Thanks a lot, we are currently on Commercial Xamarin.Android 10.1 (d16-4)
hi @radekdoulik any thoughts about this boolean issue? (https://github.com/xamarin/Xamarin.Forms/issues/9876)
This is still an issue with VS 2019 16.5
Microsoft Visual Studio Professional 2019 Version 16.5.0 VisualStudio.16.Release/16.5.0+29911.84
Xamarin 16.5.000.521 (d16-5@b3ea41e)
Xamarin.Android SDK 10.2.0.100 (d16-5/988c811) Mono: c0c5c78 Java.Interop: xamarin/java.interop/d16-5@fc18c54 ProGuard: xamarin/proguard/master@905836d SQLite: xamarin/sqlite/3.28.0@46204c4 Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-5@9f4ed4b
Hello @radekdoulik, any news on this matter?
It's been almost half-a-year we can't publish with hybrid aot due to this bug.. A workaround, anyone?..
I've had a look at it and to me it looks like hybrid AOT is not stripping at all anymore. The compiler says it's stripping but then in the apk you find the dlls with all the code visibile.
Please kindly read this thread https://forums.xamarin.com/discussion/comment/415044
Thanks. It says it has been fixed but then again it proposes a workaround (moreover a workaround that I can't apply to CI pipelines). All the AOT bugs on github aren't receiving much attention. Some have been open for months/years.
Yes, looks like this get be passed through with a workaround, have been told that Hybrid is experimental and not an official feature so no wonder the priority is kinda low.. It's a shame since this experimental feature makes xamarin viable out-of-the-box for commercials products with requirement to security.
I think the fix is still not live, tried today, crashed with stripped hybrid..
With support for Classic Xamarin.Android ended May 1st, 2024, this issue is likely no longer relevant.
If this still persists in .NET 8+, please open a new issue with updated information based on net8.0-android
or greater. Please include a link to this issue for context.
Original Issue https://github.com/xamarin/Xamarin.Forms/issues/8117
Description
Starting an android application made with xamarin.forms with hybrid aot and llvm enabled crashes at startup. The configuration worked with previous versions of VisualStudio. The same happens when building the application on a pipeline hosted on azure.
Steps to Reproduce
https://github.com/xamarin/Xamarin.Forms/files/3754036/App1.zip
Create an empty Xamarin.Forms project
Put the following configuration in the andorid csproj for Release:
Build, deply and run the application.
Expected Behavior
The application opens correctly.
Actual Behavior
The application crashes. Here is the log:
Basic Information
Version with issue: 4.2.0.709249 - it doesn't look like it is related to .Forms version
IDE: VS2019 16.3.5 windows - happens when buliding in azure cloud pipelines
Platform Target Frameworks:
Nuget Packages: None added
Affected Devices: tested on Samsung and Huawei 64bit devices.