Skip to content
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

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" #10945

Closed
KMWenyon opened this issue Mar 23, 2021 · 11 comments
Labels
need-info Waiting for more information before the bug can be investigated support The issue is related to support
Milestone

Comments

@KMWenyon
Copy link

Steps to Reproduce

  1. Update to latest stable Visual Studio for Mac (8.9.2 build 0)
  2. Update Xcode to 12.4 (17801)
  3. Open existing solution and build debug for iPhone (14.4)

Expected Behavior

For solution to build and deploy to iPhone without error

Actual Behavior

Solution builds with error MT0000: Unexpected error - Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new

Environment


Additiponal Monotouch arguments: -v -v -v -v -cxx --optimize=-static-block-to-delegate-lookup 

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

Version 8.9.2 (build 0)
Installation UUID: 29798531-c7dc-4c2c-b499-98f7dfd86f91
	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.201/Sdks
SDK Versions:
	5.0.201
	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.4
	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.407

=== Xamarin.Profiler ===

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

=== Updater ===

Version: 11

=== 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.0
SDK Build Tools Version: 30.0.3

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/d16-9
Build date: 2021-03-05 19:52:30 UTC

=== Android Device Manager ===

Version: 16.9.0.17
Hash: fc2b3db
Branch: remotes/origin/d16-9
Build date: 2021-03-05 19:52:54 UTC

=== Xamarin Designer ===

Version: 16.9.0.316
Hash: 2241b204a
Branch: tags/vsm-rel/d16.9-4540908
Build date: 2021-03-10 22:18:10 UTC

=== Apple Developer Tools ===

Xcode 12.4 (17801)
Build 12D4e

=== Xamarin.Mac ===

Version: 7.8.2.5 (Visual Studio Enterprise)
Hash: 3836759d4
Branch: d16-9
Build date: 2021-02-10 17:56:43-0500

=== Xamarin.iOS ===

Version: 14.14.2.5 (Visual Studio Enterprise)
Hash: 3836759d4
Branch: d16-9
Build date: 2021-02-10 17:56:44-0500

=== Build Information ===

Release ID: 809020000
Git revision: a69906fb0095d046b113a63419c9af3034ce104e
Build date: 2021-03-11 14:01:37-05
Build branch: release-8.9
Xamarin extensions: a69906fb0095d046b113a63419c9af3034ce104e

=== Operating System ===

Mac OS X 10.15.7
Darwin 19.6.0 Darwin Kernel Version 19.6.0
    Mon Aug 31 22:12:52 PDT 2020
    root:xnu-6153.141.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+<Read>d__16.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+<>c__DisplayClass4_0.<ExecuteBuildTasks>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.

Example Project (If Possible)

@KMWenyon
Copy link
Author

Additional MonoTouch Buld Arguments
-v -v -v -v -cxx --optimize=-static-block-to-delegate-lookup --registrar:static --gcc_flags="-ObjC -lc++ -framework QuickLook -framework LocalAuthentication -framework SystemConfiguration -framework Security -framework MobileCoreServices -framework QuartzCore -framework CoreTelephony -framework MessageUI -framework AdSupport -framework DeviceCheck -framework SafariServices -framework WebKit -B ${ProjectDir}"
iOSBuildSetting
References

@mandel-macaque
Copy link
Member

Very interesting, can you provide a binlog so that we can look at all the build steps. Also, can you try cleaning the solution and rebuilding?

@mandel-macaque mandel-macaque added the need-info Waiting for more information before the bug can be investigated label Mar 25, 2021
@mandel-macaque mandel-macaque added this to the Future milestone Mar 25, 2021
@KMWenyon
Copy link
Author

Tried and rebuilt several times with no success.

@KMWenyon
Copy link
Author

I have also sent build logs to (mandel) via email on March 25, 2021

@KMWenyon
Copy link
Author

KMWenyon commented Apr 1, 2021

Any updates since sending build logs?

@KMWenyon
Copy link
Author

KMWenyon commented Apr 1, 2021

Below is a drobox link with sample apps that produce the MT0000 error. You can try the BlankApp in the XamarinForms\Examples folder.

https://www.dropbox.com/sh/05xahnt24e964iy/AABfLuEmOUmq9wKT-68nFNika?dl=0

If you have any questions or need more information, please feel free to contact me.

@mandel-macaque
Copy link
Member

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:

  1. 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
  2. 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'
  3. 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: 9.0.0.75
  • Black Berry Launcher Library: 3.1.1.279
  • Xamarin Dynamics SDK Bindings: 8.0.0.19
  • 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.

@mandel-macaque mandel-macaque added the support The issue is related to support label Apr 6, 2021
@KMWenyon
Copy link
Author

KMWenyon commented Apr 8, 2021

THANK YOU FOR YOUR RESPONSE AND TIME ON THE PHONE EARLIER TODAY, YOU GUYS ROCK!!

I spent the rest of the day trying different versions of Xcode, Xamarin.macos and Xamarin.iOS

I uninstalled Xcode 12.4 using the following script:
xcode_uninstall.txt

image

image

Below are the Xamarin mac and ios Files used:
image
image

I will open a ticket with BlackBerry and point them to this issue.
Thanks Again.

@mandel-macaque
Copy link
Member

@KMWenyon do we have any feedback from blackberry on this? I think we can close this issue but I'd like to confirm with you.

@spouliot
Copy link
Contributor

spouliot commented Jun 3, 2021

@KMWenyon let us know when you hear back from blackberry. If needed we can re-open the issue, but we'd like to know in any case :) Thanks!

@spouliot spouliot closed this as completed Jun 3, 2021
@KMWenyon
Copy link
Author

KMWenyon commented Jun 3, 2021

@ghost ghost locked as resolved and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
need-info Waiting for more information before the bug can be investigated support The issue is related to support
Projects
None yet
Development

No branches or pull requests

3 participants