Closed tranb3r closed 6 years ago
This is also happening with the release of version 15.7.0.
Microsoft Visual Studio Enterprise 2017 Version 15.7.0 VisualStudio.15.Release/15.7.0+27703.1 Mono Debugging for Visual Studio 4.10.5-pre (ab58725) Xamarin 4.10.0.442 (396b18cef) Xamarin.Android SDK 8.3.0.19 (HEAD/342b2ce96)
This is also happening with the release of VS 2017 community edition. It works fine for the debug build but produces error while running release build.
Setting Enable "Bundle Assemblies into Native Code" option : false in csproj for Release configuration group fixes this issue. But It's a work around.
Development environment info. Visual Studio Community 2017 for Mac Version 7.5 (build 1254) Installation UUID: e1436f78-c6f3-45bb-883a-d0fd263fac97 Runtime: Mono 5.10.1.47 (2017-12/8eb8f7d5e74) (64-bit) GTK+ 2.24.23 (Raleigh theme) Xamarin.Mac 4.4.0.36 (master / 0c7c49a6)
Package version: 510010047
NuGet Version: 4.3.1.4445
.NET Core Runtime: /usr/local/share/dotnet/dotnet Runtime Version: 2.0.5 SDK: /usr/local/share/dotnet/sdk/2.1.4/Sdks SDK Version: 2.1.4 MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.10.1/lib/mono/msbuild/15.0/bin/Sdks
Xamarin.Profiler Version: 1.6.2 Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
Apple Developer Tools Xcode 9.3 (14154) Build 9E145
Xamarin.Mac Version: 4.4.1.176 (Visual Studio Community)
Xamarin.iOS Version: 11.10.1.177 (Visual Studio Community) Hash: 7e782c1e Branch: d15-7 Build date: 2018-04-25 15:27:13-0400
Xamarin.Android Version: 8.3.0.19 (Visual Studio Community) Android SDK: /Users/webwerks/Library/Developer/Xamarin/android-sdk-macosx Supported Android versions: 5.1 (API level 22) 6.0 (API level 23) 7.0 (API level 24) 7.1 (API level 25) 8.0 (API level 26) 8.1 (API level 27)
SDK Tools Version: 26.1.1 SDK Platform Tools Version: 27.0.1 SDK Build Tools Version: 28.0.0 rc1
Java SDK: /usr java version "1.8.0_131" Java(TM) SE Runtime Environment (build 1.8.0_131-b11) Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
Android Designer EPL code available here: https://github.com/xamarin/AndroidDesigner.EPL
Xamarin Inspector Version: 1.4.0 Hash: b3f92f9 Branch: master Build date: Fri, 19 Jan 2018 22:00:34 GMT Client compatibility: 1
Build Information Release ID: 705001254 Git revision: 498923ea36d2c7fe440c4e4b8cfb75bd50bbd748 Build date: 2018-05-05 10:35:24-04 Xamarin addins: 219f1c4943b4693b837b4173dd10ea982a47c852 Build lane: monodevelop-lion-d15-7
Operating System Mac OS X 10.13.4 Darwin 17.5.0 Darwin Kernel Version 17.5.0 Fri Apr 13 19:32:32 PDT 2018 root:xnu-4570.51.2~1/RELEASE_X86_64 x86_64
I received another report of this and was able to reproduce both on Visual Studio 2017 Windows and VS for Mac (all updated to 15.7) with a template Xamarin.Forms app. I am attaching adb logcat log that show the error and a test project.
I'm also suffering from the same problem, after I updated my Visual Studio installation to 15.7.1 this morning. I couldn't get the release version of my Android project to work.
This doesn't seem to be an edge case. How can such an obvious problem escape the testing ? @RajGogri thank you for poviding a workaround, you've saved me a lot of time.
My environment : Windows 10 Enterprise x64, 1709, 16299.431 Microsoft Visual Studio Enterprise 2017 Version 15.7.1 VisualStudio.15.Release/15.7.1+27703.2000 Microsoft .NET FrameworkVersion 4.7.03062 Xamarin 4.10.0.442 (396b18cef) Xamarin Designer 4.12.264 (fc37cd02e) Xamarin.Android SDK 8.3.0.19 (HEAD/342b2ce96)
I also see the issue. I just did a clean install of VS2017 for Mac 7.5 to be sure.
Cross-referencing note for the Microsoft team
A matching error message has also been reported in: https://developercommunity.visualstudio.com/content/problem/249954/build-release-xamarin-android-error-if-check-budle.html
Having the same problem here.
The immediate cause of the breakage is this change to mkbundle
: https://github.com/mono/mono/commit/ca8b8bd346a6
It altered mkbundle
output so that it now had a call to mono_jit_set_aot_mode()
, which results in an undefined symbol in mkbundle output:
$ …/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-nm -D obj/Debug/bundles/armeabi-v7a/libmonodroid_bundle_app.so | grep mono_
U mono_jit_set_aot_mode
00000ed8 T mono_mkbundle_init
This is what results in the dlopen failed: cannot locate symbol "mono_jit_set_aot_mode"
message in adb logcat
.
Furthermore, that mkbundle change (or an earlier one, I haven't dug deeper) has altered the API between xamarin-android and mkbundle output. Xamarin.Android expects a mono_mkbundle_init()
declaration of:
typedef void (*mono_register_bundled_assemblies_fn)(const MonoBundledAssembly **);
typedef void (*mono_register_config_for_assembly_fn)(const char* assembly_name, const char* config_xml);
typedef void (*mono_mkbundle_init_ptr) (mono_register_bundled_assemblies_fn, mono_register_config_for_assembly_fn);
The mono_mkbundle_init
that mkbundle
emits, meanwhile, uses no parameters.
Furthermore, now that mkbundle
wants to invoke mono_jit_set_aot_mode()
, that will also need to be provided as a parameter to mono_mkbundle_init
, thus removing the import from the generated libmonodroid_bundle_app.so
.
@jonpryor Any workaround for this (That is NOT turning off embedding assemblies)? Seems to be an issue in both STABLE and Beta.
@fekberg atm the only workaround i know is to set "Bundle Assemblies into Native Code" to false or downgrade your mono version.
When will this be fixed? We are stuck, not able to make release builds.
@ninaada @fekberg You can set BundleAssemblies flag to false for release config in Android's .csproj file. For the time being you can use this work around for running release build.
@RajGogri That's a terrible workaround. There's a reason BundleAssemblies is set to true..
@fekberg Yes I know it's terrible, but that's the only work around that I found. I am also waiting for the true fix from Xamarin team.
PR with the proposed fix: https://github.com/xamarin/xamarin-android/pull/1683
This is also happening for VSpre 15.8 and VS15.7.1... question is if it is VS2017 related or xamarin packages? so if I can at least install VS earlier version to update my app until it is fixed
@EmilAlipiev the issue is caused by a breaking change in Mono, but we've fixed it entirely within Xamarin.Android, see https://github.com/xamarin/xamarin-android/pull/1683
@grendello cool. please let us know when it is merged and published in any version. thank you
The PR has been committed to Xamarin.Android/master
So are we expecting a VS2017 update soon? or xamarin android update? this is really taking so long and holding us to to do updates.. now weekend and we lose another week. thank you for your quick update
Any time frame as to when we will get this update? We ran out of quota in the app center also & currently have no way of making builds without turning off Bundle assemblies, which we really don't want to do.
This is also causing big problems for our app now, we need to do a new release but turn off bundle assemblies is not an option. Please fix asap.
Come on Microsoft, this problem especially affects VS 2017 Enterprise Edition (and is one of the killer features of Xamarin on VS Enterprise) and each license costs several thousand Euros and still the issue is existing since several weeks... That's a no go! I don't understand how this error could ever pass your QA, since it is in normal release versions and not just Insider Previews or something... Fix this asap..please
Non-engineering-team cross-referencing notes about continuous builds
Since by chance I have a moment this weekend, I'll add a little information that might be of interest to some users over the weekend.
The team is of course coordinating to include this change into Visual Studio as soon as possible, so many users will likely prefer to wait for that.
But if some users would like to try the packages earlier, that is possible. Note that these steps do fall outside of the support policy. I also haven't had a chance to try this preliminary .vsix package myself. (I have used other preliminary Xamarin.Android .vsix packages successfully in the past.) If you would like to test this package locally, I would recommend installing it into a separate instance of Visual Studio (such as the Preview instance) if possible to avoid potential .vsix versioning conflicts when the fix is included into Visual Studio in an upcoming servicing update. You can revert the temporary .vsix installation under the Tools > Extensions and Updates > Installed menu if needed. (In theory, reverting the test package before updating is also sufficient to avoid versioning conflicts.) In Visual Studio for Mac, if you wish to revert the test .pkg, you can reinstall the current Stable channel version using the updater as usual.
(These steps are closely related to the guide on Installing Jenkins Build Artifacts.)
At this time, we have a fix that will be available in Visual Studio 2017 version 15.7.3(Service Release 3) as our fix did not make the cutoff window for 15.7.2(Service Release 2). The release history can be found here. Here's a quick note regarding service updates with respect to a timeframe:
Servicing Updates are very targeted releases that typically contain bug fixes and ship more quickly. These servicing updates can ship often (e.g. weekly). You’ll be able to tell which servicing update you’re running by opening the Help, About and reading the third string in the version, for example 15.1.x, 15.2.y.
https://docs.microsoft.com/en-us/visualstudio/productinfo/vs2017-release-rhythm
To unblock app releases, you can follow @brendanzagaeski comment on Installing Jenkins Build Artifacts until this releases through Visual Studio.
Oh, I see. Thanks for the update!
Downloading the vsix, as suggested by @brendanzagaeski, solved this issue for me on Visual Studio 15.7.2
Seeing this in VSMac 7.5.1 (build 22) When will the fix be for VSMac? Can't release app...
I have tested with the vsix, as suggested by @brendanzagaeski, but it not solve my problem. Unfortunately this is the third time that I update my VS and I'm have blocked without to can generate appstore releases. :((
I can confirm that Xamarin.Android.Sdk.8.3.2.0.vsix provided in the @brendanzagaeski's answer fixes the problem in my VS 2017 15.7.2 installation.
My environment : OS : Windows 10 Enterprise x64, 1709, 16299.431
VS Info Before Install : Microsoft Visual Studio Enterprise 2017 Version 15.7.2 VisualStudio.15.Release/15.7.2+27703.2018 Microsoft .NET Framework Version 4.7.03062 Xamarin 4.10.0.442 (396b18cef) Xamarin Designer 4.12.264 (fc37cd02e) Xamarin.Android SDK 8.3.0.19 (HEAD/342b2ce96)
VS Info After Install : Microsoft Visual Studio Enterprise 2017 Version 15.7.2 VisualStudio.15.Release/15.7.2+27703.2018 Microsoft .NET Framework Version 4.7.03062 Xamarin 4.10.0.448 (4373404db) Xamarin Designer 4.12.270 (82d750d12) Xamarin.Android SDK 8.3.2.0 (HEAD/8be583805)
Cheers.
Thanks. I had an install error. Then VS didn't start. Then tried installing the vsix again. It said "already installed". Then VS started again and I now have 8.3.2.0 installed. I didn't test yet though.
It works in relase mode. But debug mode now only works with "Shared Runtime" turned off. Not sure if related...
Same for me - it's not working with latest stable release of VS on Windows as well as on Mac. Workaround is to download and install latest pre-release of Xamarin.Android SDK from here https://jenkins.mono-project.com/view/Xamarin.Android/job/xamarin-android/lastSuccessfulBuild/Azure/
I see v15.7.3 is released but I don't see this fix is included? https://docs.microsoft.com/en-us/visualstudio/releasenotes/vs2017-relnotes#15.7.3
Oh. Isn't it really fixed?
From: xufeipyxis notifications@github.com Sent: Friday, June 1, 2018 10:11:09 AM To: xamarin/xamarin-android Cc: abdu292; Comment Subject: Re: [xamarin/xamarin-android] Bundled app initialization error (vs 15.7 preview) (#1651)
I see v15.7.3 is released but I don't see this issue is fixed? https://docs.microsoft.com/en-us/visualstudio/releasenotes/vs2017-relnotes#15.7.3
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/xamarin/xamarin-android/issues/1651#issuecomment-393755955, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AMgjmDgkEdMgYRD7wxqAs1CBM0zNJhqKks5t4MXlgaJpZM4T1G7I.
I installed 15.7.3 and it is working for me now.
Dear... Now I can generate appstore releases again, but unfortunately I can't explain exactaly the reason to be used as workaround. I have tested with the vsix, as suggested by @brendanzagaeski, but it not solve my problem. Then I have updated my project to Xamarin Forms 3 and indeed, it works, but I had other minor problems. Then I have downgraded my project to previous Xamarin Forms (2.5) and, without neither hope I have tried rebuild again, but, to my surprise, all worked fine.
Hi, Please reopen this bug. it still doesnt work. this error occurs https://github.com/xamarin/xamarin-android/issues/1760
This is surely related to this problem. when I see the logs, i am seeing this information. what is that supposed to mean? what ArchiveListViewModel and what key does it expect?
Xamarin.VisualStudio.Progress.ProgressReportService|Information|0|Shared Mono runtime is enabled for ''.
Xamarin.VisualStudio.Publishing.Presentation.ViewModels.ArchiveListViewModel|Error|0|System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at Xamarin.VisualStudio.Publishing.Presentation.ViewModels.ArchiveListViewModel.<<SubscribeToEvents>b__56_5>d.MoveNext() in E:\A\_work\5\s\src\Core\VisualStudio.Publishing\Presentation\ViewModels\ArchiveListViewModel.cs:line 262
Xamarin.VisualStudio.Progress.ProgressReportService|Information|0|The selected build configuration is using the shared Mono runtime for faster deployment. Apps cannot be archived with this setting enabled.
Xamarin.VisualStudio.Progress.ProgressReportService|Information|0|Please ensure that you are using a release configuration and that the "Use Shared Mono Runtime" option in your project's build options is unchecked.
Steps to Reproduce
Expected Behavior
No crash. This is actually what happens with VS 2017 15.6.7
Actual Behavior
App crashes (when using VS 2017 15.7 preview) with the following error: bundled app initialization error: dlopen failed: cannot locate symbol "mono_jit_set_aot_mode" referenced by libmonodroid_bundle_app.so
Version Information (causing the error)
Version 15.7.0 Preview 5.0 VisualStudio.15.Preview/15.7.0-pre.5.0+27625.0 Mono Debugging for Visual Studio 4.10.5-pre (ab58725) Xamarin 4.10.0.440 (943b34d9d) Xamarin.Android SDK 8.3.0.18 (HEAD/1f8462ef1)
Version Information (no error)
Version 15.6.7 VisualStudio.15.Release/15.6.7+27428.2043 Mono Debugging for Visual Studio 4.9.11-pre (71eb098) Xamarin 4.9.0.753 (f0f46392f) Xamarin.Android SDK 8.2.0.16 (HEAD/a78295902)