Mongodb realm Xamarin forms issue

HI there.

I have a problem, and i think it may be related to the realm dotnet.

This is the error i get:

  1. C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Xamarin\iOS\Xamarin.Shared.targets(975,3): warning : [xma]: An error occurred on the receiver while executing a post for topic xvs/build/execute-task/AppName.iOS/be46a7d002fCodesign and client buildbe46a7dea89e48e793bc0f9a0cc351c537bea3be9755ca474d2a7810526c87cc25572Me

  2. C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Xamarin\iOS\Xamarin.Shared.targets(975,3): warning : An error occurred on client Build169000292 while executing a reply for topic xvs/build/execute-task/AppName.iOS/be46a7d002fCodesign

  3. C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Xamarin\iOS\Xamarin.Shared.targets(975,3): warning : at Xamarin.Messaging.Client.ApplicationMessageExtensions.<>c__DisplayClass10_01.b__1(MqttApplicationMessage m) in C:\A\1\230\s\src\Xamarin.Messaging.Client\Extensions\ApplicationMessageExtensions.cs:line 194`

  4. C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Xamarin\iOS\Xamarin.Shared.targets(975,3): warning : at System.Reactive.Linq.ObservableImpl.Select2.Selector._.OnNext(TSource value) in d:\a\1\s\Rx.NET\Source\src\System.Reactive\Linq\Observable\Select.cs:line 39`

  5. C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Xamarin\iOS\Xamarin.Shared.targets(975,3): warning : --- End of stack trace from previous location where exception was thrown ---

  6. C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Xamarin\iOS\Xamarin.Shared.targets(975,3): warning : at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

  7. C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Xamarin\iOS\Xamarin.Shared.targets(975,3): warning : at Xamarin.Messaging.Client.MessagingClient.<PostAsync>d__212.MoveNext() in C:\A\1\230\s\src\Xamarin.Messaging.Client\MessagingClient.cs:line 190`

  8. C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Xamarin\iOS\Xamarin.Shared.targets(975,3): error : MessagingRemoteException: An error occurred on client Build169000292 while executing a reply for topic xvs/build/execute-task/AppName.iOS/be46a7d002fCodesign

  9. C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Xamarin\iOS\Xamarin.Shared.targets(975,3): error : AggregateException: One or more errors occurred.

  10. C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Xamarin\iOS\Xamarin.Shared.targets(975,3): error : DirectoryNotFoundException: Could not find a part of the path '/Users/username/Library/Caches/Xamarin/mtbs/builds/AppName.iOS/be46a7dea89e48e793bc0f9a0cc351c537bea3be9755ca474d2a7810526c87cc/bin/iPhone/Debug/device-builds/iphone11.8-14.4.1/AppName.iOS.app/Frameworks/realm-wrappers.framework/_CodeSignature'.

  11. C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Xamarin\iOS\Xamarin.Shared.targets(975,3): error :

I’ve tried various supposed solutions i’ve found when googling - cleaning buildfolders, deleting bin and obj folders, cleaning the cache on buildhost found at path ~/Library/Caches/Xamarin/mtbs.

I have a valid developer certificate, and provisioning profile - so that should not be the issue…

Finaly i verified i could actually connect to the buildhost by creating a new blank project, and it worked just fine - until i added realm.

I’m all up to date with latest version of xcode and visual studio. I’ve spend a lot of time trying to fix this, so i’m hoping someone can help with a solution.

What makes you think this is Realm related? I don’t see anything that points to Realm in the posted log - am I missing something?

This part - as mentioned i tried with a blank solution, and after adding realm. Worked without - did not work with

Ugh, I can see that now - was truncated when I saw it in my inbox :man_facepalming: This seems to be identical to this issue reported on Github. Unfortunately, the user there didn’t reply, so we haven’t looked at it yet. Can you provide some details about your setup - judging by your comments and the log, it seems like you’re building for device from a Windows machine? If that’s the case, have you tried building from macOS directly? Do you get the same error?

2 Likes

No problem - i also did a pretty poor job at formatting it nicely :smiley:.
Yes, it’s from my windows PC. I tried to set up VS for mac but ran into issues. I’ll give it another go and see if it’ll fix anything.
It started before i updated my mac, xcode and VS on my PC, I actually updated to try and fix the issue. Unfortunately i didn’t notice which version(s) the error occured on.

Ok - I was actually able to deploy it from VS on my Mac…

Hm, so sounds like might be a bug with the latest build host/VS integration. We’ll definitely look into reproducing and identifying the issue but it might be out of our hands. In the meantime is building from macOS a feasible workaround for you or is it too disruptive for your workflow?

Sounds good. Yes - i’ll be able to proceed with my project, so it’s good for now.

@nirinchev I just upgraded VS for PC, and now i get this error message:

PackageInspectionFailed: Failed to load Info.plist from bundle at path /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.fonrLF/extracted/AppName.iOS.app/Frameworks/realm-wrappers.framework; Extra info about “/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.fonrLF/extracted/AppName.iOS.app/Frameworks/realm-wrappers.framework/Info.plist”: Couldn’t stat /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.fonrLF/extracted/AppName.iOS.app/Frameworks/realm-wrappers.framework/Info.plist: No such file or directory

It appears that this is a regression in VS for Windows: ERROR ITMS-90171: "Invalid Bundle Structure" · Issue #11728 · xamarin/xamarin-macios · GitHub and Visual Studio Feedback. 16.10.2 should fix the latter issue and may also fix the former if they stem from the same root cause. We’ll test it out later this week, but it might be something to try if you’ve already upgraded to latest VS.

2 Likes

I can confirm it works just fine on 16.10.2 :+1:

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.