Swift: Preview on Device fails with "Error encountered when sending 'display' message to agent." - ios

I am trying to get a device preview running on my iPad Pro (4th Gen.) running iOS 14.3. My MacBook Pro is running macOS Big Sure v11.2.1 and Xcode (Version 12.4 (12D4e)).
I am using a project provided by Apple (SwiftUI Tutorial). You can download the project profiles here: https://developer.apple.com/tutorials/swiftui/building-lists-and-navigation
When I want to preview this project, the iPad runs Preview, the App opens as far as I can see but the screen remains white.
The Error I am receiving:
RemoteHumanReadableError: Failed to update preview.
Error encountered when sending 'display' message to agent.
==================================
| RemoteHumanReadableError
|
| LoadingError: failed to load library at path "/private/var/mobile/Containers/Data/Application/5C0603D6-DFAC-4045-AEB5-1F52FE81F045//tmp/E035A269-7512-4B63-A05C-26D2BF6E4226-ContentView.2.preview-thunk.dylib": Optional(dlopen(/private/var/mobile/Containers/Data/Application/5C0603D6-DFAC-4045-AEB5-1F52FE81F045/tmp/E035A269-7512-4B63-A05C-26D2BF6E4226-ContentView.2.preview-thunk.dylib, 2): no suitable image found. Did find:
| /private/var/mobile/Containers/Data/Application/5C0603D6-DFAC-4045-AEB5-1F52FE81F045/tmp/E035A269-7512-4B63-A05C-26D2BF6E4226-ContentView.2.preview-thunk.dylib: code signature invalid for '/private/var/mobile/Containers/Data/Application/5C0603D6-DFAC-4045-AEB5-1F52FE81F045/tmp/E035A269-7512-4B63-A05C-26D2BF6E4226-ContentView.2.preview-thunk.dylib'
| )
I can't imagine that this is caused by a bug from Apple, so I wonder how I could fix this. I would appreciate any help a lot.

I have a part answer to my problem. Instead of starting the real device preview from the preview panel on the right, I chose the play button on the top left. This way, you have to restart the preview every time you made changes and want to see them on the real device but at least building and previewing is fast.
Make sure that your connected device at the top bar is selected (on the screenshot it is not, you can see that because of the blue icon)
xcode real device preview screenshot

Related

EXC_BAD_ACCESS at lauch for EAGLContext renderbufferStorage: fromDrawable: in Cocos2d app whie debugging

Using default cocos2d-swift app I'm receiving the error EXC_BAD_ACCESS on my iPad Mini 2 at the line:
BOOL rb_status = [_context renderbufferStorage:GL_RENDERBUFFER fromDrawable:layer];
But if I try to launch the app without debug all works fine. If I use debug on any virtual device I receive no error too.
Why it doesn't work? How to remove this error?
Looks like this is an issue on certain devices on iOS 8.3+. It works for me on almost all devices but the iPad mini 2 fails for me as well. The short of it is that there's nothing wrong with the call itself. Seems to be an Xcode bug with those devices for some reason. You can get around it (until Apple fixes it) by:
In Xcode, go to Product -> Scheme -> Edit Scheme ...
And for the Run Debug configuration (on left side) choose "Options" (on right side) and configure "GPU Frame Capture" as Disabled.
For more information, check out this thread:
https://github.com/BradLarson/GPUImage/issues/2022#issuecomment-118943746
I found the device hadn't got the last iOS version. When I updated the iOS version of the devices the error has removed.

Xcode attach to process could not locate installed application

When I use the iOS simulator I've no issues with attaching to a process. But when I want to attach to a process on my iPhone it doesn't work. When I type in the process name and click on Attach it takes a while before showing me the following error:
It seems that I get the same error for any process identifier, even when the process identifier doesn't exist:
I think this issue is due to my iPhone (5S iOS 8.3), because on another iPhone (5) I don't have this issue. Can someone please help me...
This issue was only occurring on my iPhone 5S and after a factory reset the issue didn't occur anymore.

iPhone 6 not displaying in IBM Test Workbench Mobile Devices Tab

Tool: IBM Mobilefirst TestWorkbench 8.6.0.1
OS: Windows 7
Device: iPhone 6 Version: 8.1.2
Laptop and iPhone are on same Network.
Click on Add Devices icon in Mobile Devices tab. Test Workbench URL pops up.
Entered the URL in my Safari browser in iPhone.
IBM Rational Test Workbench Mobile Client opens in my browser.
Problem
The Device does not show up in Mobile Devices Tab.
Able to record a Test in my iPhone6. After recording, getting a pop up in Test Workbench which says "Click here to generate Test Recordings". When i click that i get the below error in Error log
Plug-in: com.ibm.rational.test.lt.recorder.moeb
Message: CRRTWM1201E Unexpected exception while performing test generation.
Exception Stack Trace:
java.io.IOException: Unable to access device used for recording.
at com.ibm.rational.test.lt.recorder.moeb.ui.wizards.CreateTestFromRecordingLogsWizard.getSessionProducer(CreateTestFromRecordingLogsWizard.java:150)
at com.ibm.rational.test.lt.recorder.moeb.ui.wizards.CreateTestFromRecordingLogsWizard.createRecordingSession(CreateTestFromRecordingLogsWizard.java:128)
at com.ibm.rational.test.lt.recorder.moeb.ui.wizards.CreateTestFromRecordingLogsWizard.access$0(CreateTestFromRecordingLogsWizard.java:125)
at com.ibm.rational.test.lt.recorder.moeb.ui.wizards.CreateTestFromRecordingLogsWizard$1.run(CreateTestFromRecordingLogsWizard.java:91)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at com.ibm.rational.test.lt.recorder.moeb.ui.wizards.CreateTestFromRecordingLogsWizard.performFinish(CreateTestFromRecordingLogsWizard.java:86)
at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:853)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:438)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:619)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
Problem Guesses: Had instrumented the iOS app in Mac with jdk1.6
Presently uploaded the instrumented iOS app in Test Workbench in Windows Laptop which has jdk1.7. Could this be the problem ?
No the jdk should not be the issue.
The fact that your device doesn't appear in the mobile devices tab is not normal. This seems to be the origin of the issue.
The version 8.6.0.1 seems to be old... I recommand first that you update to the last one (8.7), re-instrumente the app and try again please ?
Thanks
Dominique

Xcode Organizer - The service is invalid

I'm using XCode 4.3 (on Lion) and my iPod touch 2nd generation does show up, but displays "The service is invalid" (0xE8000022). I've tried every possible combination of restarting/reconnecting the device and have even restored the OS on the device... any ideas on how to further figure this out?
EDIT - initially I suggested restarting the device but I realized you had already done this.
I think this answer might be valid:
Error : The service is invalid

Testing IPad app with GDB hangs with black screen, fine on simulator

I have an app built on iOS 4.2, which works fine on the simulator. When I build and run the app on the device it hangs. The only way to wake it up is to kill GDB (i.e. hit the red stop sign). As long as GDB isn't running the app runs fine. I can open it up from the spring board and test as normal. Although if GDB is still running, and I launch the app from the spring board, the black screen just comes up again.
I don't have any breakpoints, and have Visible at Launch and Full Screen at Launch checked on my MainWindow.xib.
I get the same behaviour on my iPhone as well.
There's something about debugging on the device that just makes it just show a black screen. Although, I can see the status bar.
I've checked the GDB logs, but most just warn me about a device/SDK mismatch between some of the frameworks. Eg:
warning: UUID mismatch detected with
the loaded library - on disk is:
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/System/Library/PrivateFrameworks/AccountSettings.framework/AccountSettings
warning: UUID mismatch detected with
the loaded library - on disk is:
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/System/Library/PrivateFrameworks/MediaToolbox.framework/MediaToolbox
warning: UUID mismatch detected with
the loaded library - on disk is:
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/System/Library/PrivateFrameworks/MobileBluetooth.framework/MobileBluetooth
warning: UUID mismatch detected with
the loaded library - on disk is:
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/System/Library/PrivateFrameworks/VideoToolbox.framework/VideoToolbox
warning: UUID mismatch detected with
the loaded library - on disk is:
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/System/Library/PrivateFrameworks/CrashReporterSupport.framework/CrashReporterSupport
Has anyone else seen this behaviour?
I just updated my SDK and the device with the latest versions from Apple and it seemed to fix this issue.

Resources