Xamarin.Mac Deployment issue - macos

I am trying to deploy and debug a xamarin.mac app inside a xamarin.forms application. I can build it but am not able to deploy it to my mac. (I am using VS for mac) the error pop up is not helpful either as the link supplied leaves me at a 404 page.
No one else in my team has this issue and build configurations and settings are the same.
Error message
Unable to launch application to debug, possibly due to it crashing quickly.
See https://aka.ms/xm-crash-no-output for more help.
Could not open /Users/sam/myapp: pid returned -1

Related

No debug logs and app crashes on device in xcode (React Native)

I'm building an app with React Native. When I run the app through 'react-native run-ios' everything is fine, when I try to run it from xcode on my device through Product -> Run, the debug window is completely empty of any log and the app just crashes.
I suspect this has to do something with main.jsbundle, because before having an empty debug window, the build was running and then I got an error message "No bundle URL present" and I had to delete and regenerate main.jsbundle and then add it as a file to the project in xcode, this partially solved it but since then, as mentioned, the app crashes and there is absolutely no logs in the debug area (where they used to be).
versions:
xcode: 13.4.1
RN: 0.68.2

Cannot debug UWP app on Simulator: foreground can not be acquired

With Visual Studio for Windows, if I debug my Xamarin.Forms UWP app in "Local Machine" it works fine, but if I choose "Simulator", I get the following error when launching the debug session:
Unable to activate Windows Store app '10509MyNameAndSurname.myappname_6k78edmmrpdam!App'. The activation request failed with error 'Activate Application failed as foreground can not be acquired in Windows Simulator'. See help for advice on troubleshooting the issue.
If I click Help, it sends me to this page, which doesn't really mention my problem above. Any way to fix this? The main reason I want to know if it runs this way is because I'm getting a lot of "Cannot launch App" errors from the Windows App Certification Kit.
I restarted the OS and tried with a Blank App (C#, UWP): and got a different error:
Then I retried debugging my app, and got yet a new error:
Error DEP0700: Registration of the app failed. [0x80073CF6] An
internal error occurred with error 0x80073D05. See
http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app
deployment issues.

How do I access Xcode crash logs when attempting to "Validate App" or "Distribute App"?

I'm trying to submit a build to TestFlight. I created an archive by choosing "Generic iOS Device" Product > Archive. It then opened up the Window > Organizer.
There I'm presented with two options:
Distribute App
Validate App
If I choose Validate App, Xcode crashes immediately, and I can't see any error message. If I choose Distribute App > iOS App Store > Upload, it says "analyzing signature" and crashes immediately again (no error message).
If I try to Validate a different app, it succeeds. Thus there is something wrong with the set up of this project. However, because it instantly crashes and doesn't show an error message, I can't know what that is in order to resolve it.
Is there a way to view crash logs anywhere so I have a better understanding as to how to fix this problem?
I tried running on Xcode 10.1 and Xcode 10.2 beta 4. Both have the same behavior.
Method #1:
You can check all crash logs from the Console app
Applications > Utilities > Console
or
Spotlight Search > Console
Click on User Reports in the sidebar and open the crash logs starting with the Xcode
Method #2:
The actual files are located here:
~/Library/Logs/DiagnosticReports/
Paste this in Finder > Go > Go to Folder

Xcode 7.3 wont attach to simulator to debug

So I upgraded to Xcode 7.3.1 and now my Xcode will build, and deploy my apps (yes every app, even a brand new blank one) to the simulator but the app never launches on the simulator and the debugger never attaches, Xcode just hangs and has to be force quit. I've completely wiped out Xcode and all simulators and re-installed to no avail. I've scoured Stack Overflow and Google trying every piece of advice and still no luck. Anyone anywhere have any idea how to solve this issue? If I downgrade to 7.2.1 I'm able to debug in the simulator just fine.
Let me know if you need more information.
My Apps run just fine on the simulator, and if I try to attach the debugger to a running app it wont and Xcode hangs in the attempt, when attempting to attach this way at least Xcode doesn't have to be force quit.
FYI, I can debug on a device this is only a simulator issue.
I had this same issue, and tried fixing my projects and reinstalled Xcode twice before I was able to get Simulator to crash and give me an error report that called out Cylance. Luckily I have access to administer our Cylance portal, so I was able to work through the issue to narrow down the problem.
Symptoms:
When running an app from Xcode, the Simulator launches but the application does not launch within the Simulator
Trying to stop the application from within Xcode does not work, and generates no messages
Trying to re-run the application from within Xcode generates the following message: ‘An instance of “APPLICATION NAME” is already running. Choose “Stop” to terminate and launch a new instance.’ But pressing Stop does nothing.
Xcode will not quit, and eventually the user must Force Quit to exit Xcode
Within the OS X console, the following messages are displayed:
6/3/16 7:35:38.000 PM kernel[0]: AMFI: com.apple.dt.ins(pid 2239) - [deny-mmap] main process is a platform binary, but mapped executable file is not: /Library/Application Support/Cylance/Desktop/CyMemDef.dylib
6/3/16 7:35:38.000 PM kernel[0]: AMFI: com.apple.dt.ins(pid 2239) - [deny-mmap] mapped file has team identifier XXXX: /Library/Application Support/Cylance/Desktop/CyMemDef.dylib
Resolution:
The problem is caused by Memory Protection being turned on within the policy assigned to the Mac within the Cylance portal.
To resolve the issue, place the Mac into a zone/policy that does not have Memory Protection turned on. Auto Quarantine and Protection Settings can be left on.
During my testing, I was not able to come up with a list of exclusions that allowed me to leave Memory Protection on, so I ended up disabling it completely.

How to debug a framework in OS X

SDL2 framework causes a crash in my application. I would like to debug the framework code (i.e. place a breakpoint in a file inside the framework) to examine the problem further. How can I do this?
I have the SDL2 framework project with the source code. I can build both projects with debugging information etc.
I tried to attach (Debug > Attach to Process... > APPNAME) the SDL2 project to the running instance of my app, but I receive the following error:
Lost connection to "My Mac". Restore the connection to "My Mac" and
run APPNAME again, or if APPNAME is still running, you can attach to
it by selecting Debug > Attach to Process > APPNAME.
If debugging a framework is impossible, I'd like to know the best way to debug a third-party library in OS X. The SDL2 project gives option to build the library as a static or dynamic library as well.

Resources