Xcode simulator no crash but real device problems - xcode

I run my app in Xcode through the simulator and it builds with no crashes. When I run on real device it successfully builds but I get crash errors. Someone suggested it might be the cordova screen lock but I tried it without and still have problems.
Running on real device: a blinking screen or it keeps reloading the first screen, never to make it to the next one. Please help!
Here are the different lines I am seeing when compared to the simulator:
Metal API Validation Enabled
<UMP SDK> To enable debug mode for this device, set: UMPDebugSettings.testDeviceIdentifiers = #[ #"___________________________________" ];
THREAD WARNING: ['CDVOrientation'] took '44.751953' ms. Plugin should use a background thread.
[Process] 0x10f003740 - [PID=1655] WebProcessProxy::didClose: (web process 0 crash)
[Process] 0x10f003740 - [PID=1655] WebProcessProxy::processDidTerminateOrFailedToLaunch: reason=4
[ProcessSuspension] 0x10e0042a0 - ProcessAssertion: Failed to acquire RBS Background assertion 'ConnectionTerminationWatchdog' for process because PID 0 is invalid
[ProcessSuspension] 0x10e0042a0 - ProcessAssertion::acquireSync Failed to acquire RBS assertion 'ConnectionTerminationWatchdog' for process with PID=0, error: (null)
0x150842818 - [pageProxyID=13, webPageID=14, PID=1655] WebPageProxy::processDidTerminate: (pid 1655), reason 4
[assertion] Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}>
[ProcessSuspension] 0x10e004300 - ProcessAssertion::acquireSync Failed to acquire RBS assertion 'WebProcess Background Assertion' for process with PID=1655, error: Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}
[Loading] 0x150842818 - [pageProxyID=13, webPageID=14, PID=1655]
WebPageProxy::dispatchProcessDidTerminate: reason=Crash
[XPC] Handle connection with error: Connection interrupted
[Process] 0x10f004110 - [PID=0] WebProcessProxy::didFinishLaunching: Invalid connection identifier (web process failed to launch)
[Process] 0x10f004110 - [PID=0] WebProcessProxy::processDidTerminateOrFailedToLaunch: reason=4
[Process] 0x150842818 - [pageProxyID=13, webPageID=14, PID=0] WebPageProxy::processDidTerminate: (pid 0), reason 4
[ServicesDaemonManager] interruptionHandler is called. -[FontServicesDaemonManager connection]_block_invoke
[Process] 0x10f0048f0 - [PID=1682] WebProcessProxy::didClose: (web process 0 crash)
[Process] 0x10f0048f0 - [PID=1682] WebProcessProxy::processDidTerminateOrFailedToLaunch: reason=4
THREAD WARNING: ['AdMob'] took '30.550049' ms. Plugin should use a background thread.
THREAD WARNING: ['Consent'] took '10.710205' ms. Plugin should use a background thread.

We saw this issue on Xcode 14.2 where web views were not loading.
Our WKWebViews had Content Rule List set.
The root cause was it compiled the Content Rule List to the underlying chipset (non-Intel), instead of respecting the Rosetta.
This issue was not seen when Xcode was launched without Rosetta.

Related

encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted

Testing failed:
CoreAppTests:
CoreApp.app (10848) encountered an error (Early unexpected exit, operation never finished bootstrapping -
no restart will be attempted. (Underlying error: Crash: CoreApp (10848): Namespace SPRINGBOARD, Code 0x8badf00d))
After updating my Mac mini OS to latest and XCode to 11.1 getting the error message. I'm running test cases for an IOS app using Jenkins and Sonar Qube, build is happening perfectly but test cases are not getting executed. Even sometimes i'm getting the following error, and after that the job fails.
Finished requesting crash reports. Continuing with testing - Jenkins
I even downgraded my XCode back to 10.3 but the issue is still there.

Getting error while launching AUT for recording - Timeout error :AUT doesn't respond

I'm trying to record tests on my app. I could successfully add AUT( in applications view) But when i'm to record test My App is loaded (AUT has splash screen to get credentials, after entering credentials AUT is loaded ) and i can interact with AUT, but RCPTT errors out with message
Timeout error :AUT doesn't respond.
Following is the log:
These are some parts from log.
!ENTRY org.eclipse.emf.ant 4 0 2019-10-08 09:41:24.138
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.emf.ant [146]
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.emf.codegen [147]
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.emf.codegen.ecore [148]
Unresolved requirement: Require-Bundle: org.eclipse.jdt.core; bundle-version="[3.5.0,4.0.0)"
java.lang.IllegalStateException: Workbench has not been created yet.
at org.eclipse.ui.PlatformUI.getWorkbench(PlatformUI.java:93)
Warning: validation was turned on but an org.xml.sax.ErrorHandler was not set, which is probably not what is desired. Parser will use a default ErrorHandler to print the first 0 errors. Please call the setErrorHandler method to fix this
Warning: NLS unused message: DIRView_btnCheckButton_text in: com.student.programs.ui.view.messages
Error: URI=null Line=5448: Attribute value "CVC100150" of type ID must be unique within the document.
Error: URI=null Line=6566: Attribute value "CVC102357" of type ID must be unique within the document.
Error: URI=null Line=6757: The content of element type "lists" must match "(list)+".
UPDATE:
Following is how i'm launching RCPTT IDE.
- Downloaded the RCPTT IDE from eclipse downloads
- Launching RCPTT by using exe
- Create new RCPTT project
- Add AUT to the RCPTT IDE
- start recording test This is when i see the error
The most probable reason is this: RCPTT Runtime plug-in is not being installed/activated in your AUT. Without this being active, the AUT is invisible to the RCPTT Runner.
With OSGi console of the AUT you could have tell that for sure.
I advice you to reach out to developers and find out together why runtime plug-in is not being activated. This should happen once the login screen is gone and the AUT's Workbench is displayed.
Hint: RCPTT's runtime is called Tesla, can you find a line beginning with this?
!MESSAGE Tesla server started on port
Update: I took a look at the log and it is like RCPTT IDE is installed as part of the AUT, not just the Runtime plug-in. Is this intentional? Your application will also be able to create RCPTT tests?

Unable to launch WebDriverAgent because of xcodebuild failure: "xcodebuild failed with code 65" Iphone6 Simulator

I am trying to run the Amazon app on an iPhone 6 simulator using Xcode.
The app is getting installed in the iPhone Simulator, but not able to interact with its elements.
Appium version - 1.7.2
Xcode Version 9.2
Platform Mac- 10.12.6
Downloaded the app - i.e. xxx.app.ipa
Logs:
[Xcode] 2018-02-13 21:23:08.009 xcodebuild[9868:75242] Error Domain=IDEFoundationErrorDomain Code=1 "Cannot launch simulated executable: no file found at /Applications/Xcode.app/Contents/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app" UserInfo={NSLocalizedDescription=Cannot launch simulated executable: no file found at /Applications/Xcode.app/Contents/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app} [Xcode] 2018-02-13 21:23:08.009 xcodebuild[9868:75242]
Error Domain=IDETestOperationsObserverErrorDomain Code=6 "Early unexpected exit, operation never finished bootstrapping - no restart will be attempted" UserInfo={NSLocalizedDescription=Early unexpected exit, operation never finished bootstrapping - no restart will be attempted} [Xcode] [Xcode] 2018-02-13 21:23:08.010 xcodebuild[9868:75259] Connection peer refused channel request for "dtxproxy:XCTestManager_IDEInterface:XCTestManager_DaemonConnectionInterface"; channel canceled
[Xcode] ** TEST EXECUTE FAILED ** [Xcode] [Xcode] 2018-02-13 21:23:08.011 xcodebuild[9868:75318] Error saving test log:
Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory" UserInfo={NSFilePath=/Applications/Xcode.app/Contents/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Logs/Test/921A213D-B7E4-4994-9443-F73DDE5FBD4D.xcactivitylog, NSLocalizedDescription=No such file or directory} | User info: { [Xcode] NSFilePath = "/Applications/Xcode.app/Contents/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Logs/Test/921A213D-B7E4-4994-9443-F73DDE5FBD4D.xcactivitylog"; [Xcode] NSLocalizedDescription = "No such file or directory"; [Xcode] } [Xcode]
[XCUITest] xcodebuild exited with code '65' and signal 'null' [BaseDriver] Event 'wdaStartFailed' logged at 1518585788035 (21:23:08 GMT-0800 (PST)) [XCUITest] Unable to launch WebDriverAgent because of xcodebuild failure: "xcodebuild failed with code 65". [XCUITest] Quitting and uninstalling WebDriverAgent, then retrying [XCUITest] Shutting down sub-processes [XCUITest] Removing WDA application from device [XCUITest] Error: Unable to launch WebDriverAgent because of xcodebuild failure: "xcodebuild failed with code 65". at XCUITestDriver.quitAndUninstall$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:375:13) at tryCatch (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40) at GeneratorFunctionPrototype.invoke as _invoke at GeneratorFunctionPrototype.prototype.(anonymous function) as next at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37) at Error: Unable to launch WebDriverAgent because of xcodebuild failure: "xcodebuild failed with code 65". at XCUITestDriver.quitAndUninstall$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:375:13) at tryCatch (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40) at GeneratorFunctionPrototype.invoke as _invoke at GeneratorFunctionPrototype.prototype.(anonymous function) as next at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37) at [XCUITest] Not clearing log files. Use clearSystemFiles capability to turn on. [XCUITest] Killing running processes 'xcodebuild.B720A212-489B-4A48-BBDB-7119C9763406, B720A212-489B-4A48-BBDB-7119C9763406.*XCTRunner' for the device B720A212-489B-4A48-BBDB-7119C9763406... [XCUITest] 'pgrep -nif xcodebuild.*B720A212-489B-4A48-BBDB-7119C9763406' didn't detect any matching processes. Return code: 1 [XCUITest] 'pgrep -nif B720A212-489B-4A48-BBDB-7119C9763406.XCTRunner' didn't detect any matching processes. Return code: 1 [XCUITest] Deleting simulator created for this run (udid: 'B720A212-489B-4A48-BBDB-7119C9763406') [iOSLog] Stopping iOS log capture
It's saying it can't find the WebDriver app. Can you confirm its existence in /Applications/Xcode.app/Contents/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Build/Products/Debug-iphonesimulator/?
If it doesn't exist, there is something wrong with your Appium install so I'd recommend reinstalling npm uninstall -g appium and npm install -g appium. Probably safe to do that anyway.
Also make sure you restart your device and uninstalling any existing WebDriver app on the device.
Error clear shows -- /Applications/Xcode.app/Contents/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app}
Webdriver agent need to be successfully running on device
Try to configure Webdriver agent and Developer ID ::
Open the existing the WebDriver Agent (double click on WebDriverAgent.xcodeproj)
On top of Xcode you File > New> File , then you will an pop up something like this
Select OSX->.Other-> Select Configuration settings file.
Paste the following things in newly created file.
DEVELOPMENT_TEAM = xxxxxxxxx
CODE_SIGN_IDENTITY = iPhone Developer
Development team is Team ID which your developer should be able to provide . Dont change the CODE_SIGN_IDENTITY.
In device.propoerties file add this
xcodeConfigFile=/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Config.xcconfig
In ConfigCapa.java file add this
capabilities.setCapability(“xcodeConfigFile”,emulatorProp.getProperty(“xcodeConfigFile”));
Open terminal go to
$ cd /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/
$ mkdir -p Resources/WebDriverAgent.bundle
sh ./Scripts/bootstrap.sh –d
Go to terminal type
xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination ‘id=DeviceID’ test Last line on build output above command should be Listening on USB. Then you are all set!
brew install libimobiledevice –HEAD
To run appium type appium &
To find version type appium — v

Xcode server at Xcode 9 ; Bot XCUITest fails: 'Test target encountered an error (Early unexpected exit.....)

We have set up continuous environment at xcode9 at dedicated mac.Xcode-server is set up on that machine and bot has been created to build project and execute tests.
Build required cocoapods , hence pre-integration script is also used.
Now, when bot starts UI tests, the app installs at simulator , but doesn't launch and eventually consoles log following error :
Test Target 'xx' encountered an error (Early unexpected exit , operation never finished bootsrapping - no restart will be attempted)
On investigation of 'Raw build logs' we found Main Thread Checker error shows up with firebase warning.
Main Thread Checker: UI API called on a background thread: -[UIApplication applicationState] PID: 34330, TID: 355611, Thread name: (none), Queue name: NSOperationQueue 0x600000239dc0 (QOS: UNSPECIFIED), QoS: 0 Backtrace:
Had mitigated this issue by unchecking Edit Scheme->Test/Debug->Main Thread Checker under diagnostic section , while running tests locally.
Does same error showing up at continuous environment means that we have to pass the unchecking of Main Thread Checker as an argument ? Or is there something we are missing ?
Kindly help.

Upgrade to new XCode; can't built in Xamarin

I think that one of the last XCode upgrades that came in last week appears to have broken my Xamarin iOS builds. They fail with:
Failed to locate a valid instance of CoreSimulatorService in the bootstrap. Adding it now.
Or
.../SignInUniversalController_iPhone.storyboard: Error: 2016-07-31 12:11:38.046 ibtoold[23284:2756861] [MT] IBPlatformTool: *** Failed to launch tool with description <IBCocoaTouchPlatformToolDescription: 0x7fce44256b20> System content 1x for IBCocoaTouchFramework-NineOneAndLater w/ default fidelity:
Failed to find or create execution context for description <IBCocoaTouchPlatformToolDescription: 0x7fce44256b20> System content 1x for IBCocoaTouchFramework-NineOneAndLater w/ default fidelity (Failure reason: Software caused connection abort): Failed to find a suitable device for the type SimDeviceType : com.apple.dt.Xcode.IBSimDeviceType.iPad-1x with runtime SimRuntime : 9.3 (13E230) - com.apple.CoreSimulator.SimRuntime.iOS-9-3 (Failure reason: Failed to create SimDeviceSet at path /Users/eric/Library/Developer/Xcode/UserData/IB Support/Simulator Devices. You'll want to check the logs in ~/Library/Logs/CoreSimulator to see why creating the SimDeviceSet failed.): Failed to initialize simulator device set. (Failure reason: Failed to subscribe to notifications from CoreSimulatorService.): Error returned in reply to notification request: Connection invalid (Failure reason: Software caused connection abort)
2016-07-31 12:11:46.096 ibtoold[23284:2756861] [MT] IBPlatformTool: Wrote failed marshalling request diagnostics to path: /var/folders/t9/t9xl93t50ql14mr0lxmmw_2r0000gn/T/IB-agent-diagnostics_2016-07-31_12-11-46_067000
Error: Internal error. Please file a bug at bugreport.apple.com and attach "/var/folders/t9/t9xl93t50ql14mr0lxmmw_2r0000gn/T/IB-agent-diagnostics_2016-07-31_12-11-46_067000".
The logs mentioned in the first error message doesn't appear to be more verbose than the above:
Failed to find or create execution context for description <IBCocoaTouchPlatformToolDescription: 0x7fce44256b20> System content 1x for IBCocoaTouchFramework-NineOneAndLater w/ default fidelity (Failure reason: Software caused connection abort): Failed to find a suitable device for the type SimDeviceType : com.apple.dt.Xcode.IBSimDeviceType.iPad-1x with runtime SimRuntime : 9.3 (13E230) - com.apple.CoreSimulator.SimRuntime.iOS-9-3 (Failure reason: Failed to create SimDeviceSet at path /Users/eric/Library/Developer/Xcode/UserData/IB Support/Simulator Devices. You'll want to check the logs in ~/Library/Logs/CoreSimulator to see why creating the SimDeviceSet failed.): Failed to initialize simulator device set. (Failure reason: Failed to subscribe to notifications from CoreSimulatorService.): Error returned in reply to notification request: Connection invalid (Failure reason: Software caused connection abort)
Error Domain=NSPOSIXErrorDomain Code=53 "Software caused connection abort" UserInfo={NSLocalizedDescription=Failed to find or create execution context for description <IBCocoaTouchPlatformToolDescription: 0x7fce44256b20> System content 1x for IBCocoaTouchFramework-NineOneAndLater w/ default fidelity, NSUnderlyingError=0x7fce44152c40 {Error Domain=NSPOSIXErrorDomain Code=53 "Software caused connection abort" UserInfo={NSUnderlyingError=0x7fce441b8150 {Error Domain=NSPOSIXErrorDomain Code=53 "Software caused connection abort" UserInfo={NSLocalizedFailureReason=Failed to subscribe to notifications from CoreSimulatorService., NSLocalizedDescription=Failed to initialize simulator device set., NSUnderlyingError=0x7fce44155b00 {Error Domain=NSPOSIXErrorDomain Code=53 "Software caused connection abort" UserInfo=0x7fce441c31b0 (not displayed)}}}, NSLocalizedFailureReason=Failed to create SimDeviceSet at path /Users/eric/Library/Developer/Xcode/UserData/IB Support/Simulator Devices. You'll want to check the logs in ~/Library/Logs/CoreSimulator to see why creating the SimDeviceSet failed., NSLocalizedDescription=Failed to find a suitable device for the type SimDeviceType : com.apple.dt.Xcode.IBSimDeviceType.iPad-1x with runtime SimRuntime : 9.3 (13E230) - com.apple.CoreSimulator.SimRuntime.iOS-9-3}}}
This is an iPhone project, but uses a Universal component; I note that since the above says iPad.
When it fails, it opens up the Storyboard editor and it appears to be OK there; there's nothing that seems surprising at first glance.
XCode: Version 7.3.1 (7D1014)
Xamarin: Latest Stable; no updates available
Any insight or thoughts? Thanks!

Resources