blackberry / BlackBerry-Dynamics-iOS-Samples

Sample applications making use of BlackBerry Dynamics APIs for iOS.
20 stars 23 forks source link

MT0000 - System.IO.FileNotFoundException: Could not find file "/Users/username/TFS/MyApp/.App.iOS/obj/iPhone/Debug/device-builds/iphone8.1-14.4/mtouch-cache/arm64/.App.iOS" #25

Open KMWenyon opened 3 years ago

KMWenyon commented 3 years ago

Xamarin Forms iOS v8.x

=== Visual Studio Enterprise 2019 for Mac ===

Version 8.9.10 (build 4) Installation UUID: e5958dcd-8ee8-47ff-938b-9f57e9f66c2c GTK+ 2.24.23 (Raleigh theme) Xamarin.Mac 6.18.0.23 (d16-6 / 088c73638)

Package version: 612000125

=== Mono Framework MDK ===

Runtime: Mono 6.12.0.125 (2020-02/8c552e98bd6) (64-bit) Package version: 612000125

=== Roslyn (Language Service) ===

3.9.0-6.21152.10+c10f884b30737542ddd84ca889a4aad9281ce210

=== NuGet ===

Version: 5.8.0.6860

=== .NET Core SDK ===

SDK: /usr/local/share/dotnet/sdk/5.0.203/Sdks SDK Versions: 5.0.203 5.0.201 3.1.409 3.1.407 3.1.401 3.1.302 3.1.301 3.1.300 3.1.202 3.1.200 3.1.102 3.1.101 3.1.100 3.0.101 3.0.100 2.1.701 2.1.700 MSBuild SDKs: /Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/bin/MSBuild/Current/bin/Sdks

=== .NET Core Runtime ===

Runtime: /usr/local/share/dotnet/dotnet Runtime Versions: 5.0.6 5.0.4 3.1.15 3.1.13 3.1.7 3.1.6 3.1.5 3.1.4 3.1.2 3.1.1 3.1.0 3.0.1 3.0.0 2.1.23 2.1.21 2.1.20 2.1.19 2.1.18 2.1.17 2.1.16 2.1.15 2.1.14 2.1.13 2.1.12 2.1.11

=== .NET Core 3.1 SDK ===

SDK: 3.1.409

=== Xamarin.Profiler ===

Version: 1.6.15.68 Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Updater ===

Version: 11

=== Apple Developer Tools ===

Xcode 12.5 (18205) Build 12E262

=== Xamarin.Mac ===

Version: 7.10.0.5 (Visual Studio Enterprise) Hash: ab40b131d Branch: xcode12.5 Build date: 2021-04-22 08:56:41-0400

=== Xamarin.iOS ===

Version: 14.16.0.5 (Visual Studio Enterprise) Hash: ab40b131d Branch: xcode12.5 Build date: 2021-04-22 08:56:42-0400

=== Xamarin Designer ===

Version: 16.9.0.324 Hash: b1e216c75 Branch: remotes/origin/d16-9 Build date: 2021-04-16 00:02:50 UTC

=== Xamarin.Android ===

Version: 11.2.2.1 (Visual Studio Enterprise) Commit: xamarin-android/d16-9/877f572 Android SDK: /Users/kenwenyon/Library/Android/sdk Supported Android versions: 5.0 (API level 21) 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: 31.0.2 SDK Build Tools Version: 31.0.0 rc4

Build Information: Mono: 5e9cb6d Java.Interop: xamarin/java.interop/d16-9@54f8c24 ProGuard: Guardsquare/proguard/v7.0.1@912d149 SQLite: xamarin/sqlite/3.34.1@daff8f4 Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-9@d210f11

=== Microsoft OpenJDK for Mobile ===

Java SDK: /Users/kenwenyon/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_1.8.0.25 1.8.0-25 Android Designer EPL code available here: https://github.com/xamarin/AndroidDesigner.EPL

=== Android SDK Manager ===

Version: 16.9.0.22 Hash: a391de2 Branch: remotes/origin/dev/bretjohn/readme-tweak~3 Build date: 2021-05-13 17:03:56 UTC

=== Android Device Manager ===

Version: 16.9.0.17 Hash: fc2b3db Branch: remotes/origin/dev/jmt/d16-9bump~1 Build date: 2021-05-13 17:04:12 UTC

=== Build Information ===

Release ID: 809100004 Git revision: 30612572b7defb0273729cb6b5ea5adc8bd9a147 Build date: 2021-05-13 13:06:24-04 Build branch: release-8.9 Xamarin extensions: 30612572b7defb0273729cb6b5ea5adc8bd9a147

=== Operating System ===

Mac OS X 10.16.0 Darwin 20.4.0 Darwin Kernel Version 20.4.0 Thu Apr 22 21:46:47 PDT 2021 root:xnu-7195.101.2~1/RELEASE_X86_64 x86_64

=== Enabled user installed extensions ===

XAML Styler 2.0.1 NuGet Package Management Extensions 0.26 NuGet Package Explorer 0.6

Build Logs warning MT5203 : Native linking warning : Can't access /Users/username/TFS/MyApp/App.iOS/obj/iPhone/Debug/device-builds/iphone8.1-14.4/mtouch-cache/arm64/App.iOS

MTOUCH : error MT0000: Unexpected error - Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new System.IO.FileNotFoundException: Could not find file "/Users/username/TFS/MyApp/App.iOS/obj/iPhone/Debug/device-builds/iphone8.1-14.4/mtouch-cache/arm64/App.iOS" File name: '/Users/usename/TFS/MyApp/App.iOS/obj/iPhone/Debug/device-builds/iphone8.1-14.4/mtouch-cache/arm64/App.iOS' at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x00259] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:274 at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:91 at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare) at Xamarin.MachO.ReadFile (System.String filename) [0x00001] in /Users/builder/azdo/_work/1/s/xamarin-macios/tools/common/MachO.cs:230 at Xamarin.MachO+d16.MoveNext () [0x00048] in /Users/builder/azdo/_work/1/s/xamarin-macios/tools/common/MachO.cs:239 at Xamarin.MachO.GetNativeDependencies (System.String libraryName) [0x000bb] in /Users/builder/azdo/_work/1/s/xamarin-macios/tools/common/MachO.cs:368 at Xamarin.Bundler.Target.AdjustDylibs (System.String output) [0x00008] in /Users/builder/azdo/_work/1/s/xamarin-macios/tools/mtouch/Target.mtouch.cs:1648 at Xamarin.Bundler.NativeLinkTask.ExecuteAsync () [0x00568] in /Users/builder/azdo/_work/1/s/xamarin-macios/tools/mtouch/BuildTasks.mtouch.cs:335 at Xamarin.Bundler.BuildTask.Execute (Xamarin.Bundler.BuildTasks build_tasks) [0x002a9] in /Users/builder/azdo/_work/1/s/xamarin-macios/tools/common/BuildTasks.cs:259 at Xamarin.Bundler.BuildTask.Execute (Xamarin.Bundler.BuildTasks build_tasks) [0x0038c] in /Users/builder/azdo/_work/1/s/xamarin-macios/tools/common/BuildTasks.cs:274 at Xamarin.Bundler.BuildTask.Execute (Xamarin.Bundler.BuildTasks build_tasks) [0x00368] in /Users/builder/azdo/_work/1/s/xamarin-macios/tools/common/BuildTasks.cs:270 at Xamarin.Bundler.BuildTasks+<>cDisplayClass4_0.b__0 () [0x0002e] in /Users/builder/azdo/_work/1/s/xamarin-macios/tools/common/BuildTasks.cs:50 The command exited with code 1. Done executing task "MTouch" -- FAILED. Done building target "_CompileToNative" in project "App.iOS.csproj" -- FAILED.

Done building project "App.iOS.csproj" -- FAILED.

FROM MICROSOFT:

We have been able to reproduce the issue with the current hash in main (1b6c83e) yet looking at the logs this does not seem to be an issue with our product due to the following:

Looking at the build logs and using the sample application we have found that the black berry third party product uses a none standard linker found at ~/Library/Application Support/BlackBerry/Good.platform/iOS/FIPS_module/arm64.sdk/bin/ld The linker provided by Black Berry fails when trying to perform its work, one of the linking warnings that we find interesting is 'building for iOS, but linking in object file built for free standing, for architecture arm64' One of the steps when building the application, which is not part of our standard msbuild tasks, does the following: Removing /Users/mandel/Downloads/BlackBerry_Dynamics_SDK_for_XamarinForms_v8-2/XamarinForms/Examples/BlankApp/iOS/obj/iPhone/Release/mtouch-cache/arm64/BlankApp.iOS Our tools fail because they try to find the path /Users/mandel/Downloads/BlackBerry_Dynamics_SDK_for_XamarinForms_v8-2/XamarinForms/Examples/BlankApp/iOS/obj/iPhone/Release/mtouch-cache/arm64/BlankApp.iOS which is removed as per point 3. The removal of the .app is not part of our build, we will never use the logs for the linker to remove the .app as it shows in the build logs

warning MT5203 : Native linking warning : Removing /Users/mandel/Downloads/BlackBerry_Dynamics_SDK_for_XamarinForms_v8-2/XamarinForms/Examples/BlankApp/iOS/obj/iPhone/Release/mtouch-cache/arm64/BlankApp.iOS There are certain parts of the build that do worry me, does look like there are several debug prints from the company that wrote the linker, for example:

warning MT5203 : Native linking warning : Getting Clang Path warning MT5203 : Native linking warning : GOT TO HERE warning MT5203 : Native linking warning : Going to plan A, using /Users/mandel/Library/Application Support/BlackBerry/Good.platform/iOS/FIPS_module/arm64.sdk/bin/../bin/incore_macho All of the above are not coming from any of our tools.

All this have been tested with our current stable and the Black Berry Dynamics releases found in https://developers.blackberry.com/us/en/resources/downloads.html, the versions used are:

Static framework SDK for iOS: 8.1.0.37 Black Berry Launcher Library: 3.1.1.279 Xamarin Forms Dynamics SDK: 8.0.0.42 The builds logs of my tests are found in the following gist: https://gist.github.com/mandel-macaque/e159c0fe98b6205f04e5c455c7373cda (you will need to click view raw to view all of it due to its size). My understanding from our communications is that this stopped working when you upgraded. Was this upgrade due to upgrading Xcode to Xcode12.4? It might be the case that BlackBerry Dynamics is not working correctly with your current configuration and our tools are the ones that expose it yet are not the culprit.

This is not a Xamarin issue... Please see: https://github.com/xamarin/xamarin-macios/issues/10945 for full steps to reproduce and to remediate.

KMWenyon commented 3 years ago

This also reproducible using your own sample from the Xamarin.Forms SampleAppSuite app from the latest BBD Xamarin.Forms SDK 8.0.0.42 using the latest version of Xamarin.Forms, XCode and VisualStudio for Mac with Big Sur.