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

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.

Related

Xcode simulator no crash but real device problems

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.

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.

Issue installing openwhisk with incubator-openwhisk-devtools

I have a blocking issue installing openwhisk with docker
I typed make quick-start right after a git pull of the project incubator-openwhisk-devtools. My OS is Fedora 29, docker version is 18.09.0, docker-compose version is 1.22.0. JDk 8 Oracle.
I get the following error:
[...]
adding the function to whisk ...
ok: created action hello
invoking the function ...
error: Unable to invoke action 'hello': The server is currently unavailable (because it is overloaded or down for maintenance). (code ciOZDS8VySDyVuETF14n8QqB9wifUboT)
[...]
[ERROR] [#tid_sid_unknown] [Invoker] failed to ping the controller: org.apache.kafka.common.errors.TimeoutException: Expiring 1 record(s) for health-0: 30069 ms has passed since batch creation plus linger time
[ERROR] [#tid_sid_unknown] [KafkaProducerConnector] sending message on topic 'health' failed: Expiring 1 record(s) for health-0: 30009 ms has passed since batch creation plus linger time
Please note that controller-local-logs.log is never created.
If I issue a touch controller-local-logs.log in the right directory the log file is always empty after I try to issue make quick-start again.
http://localhost:8888/ping gives me the right answer: pong.
http://localhost:9222 is not reacheable.
Where am I wrong?
Thank you in advance

TFS2015 Test Agent Aborted - PowerShell script completed with errors

I am running a TFS nightly build that for the last few days has not been able to complete all its tests. It fails after several hours with a "Test run is aborted" message. Previous to this the tests always ran successfully, and no major changes(or even minor) have been made to the system that runs these tests.
Information:
Two MStest runs in the build(unit tests)
Timeout is set to 20 hours
Runs for approx. 15 hours before failure
Tests are set to continue on failure
When I look in the TFS log for the latest run it lists the following(2017-04-11T06:42:47.5500707Z):
[warning]DistributedTests: Test run is aborted. Logging details of the run logs.
[warning]DistributedTests: New test run created.
[warning]Test Run queued for Project Collection Build Service
[warning]DistributedTests: Test discovery started.
[warning]DistributedTests: Test Run Discovery Completed . Test run id: 533
[warning]DistributedTests: 290 test cases discovered.
[warning]DistributedTests: Test execution started. Test run id : 533
[warning]DistributedTests: Test run timed out. Test run id : 533
[warning]DistributedTests: Test run aborted. Test run id: 533
[error]The test run was aborted, failing the task.
When I look at the run log(worker_20170410-234426-utc_864.log) I see:
06:42:47.659516 BaseLogger.LogConsoleMessage(scope.JobId =
7ced7f31-e360-47f3-b334-ef20faeaf000, message = ##[error]The test run
was aborted, failing the task.) 06:42:47.659516
Microsoft.TeamFoundation.DistributedTask.Agent.Common.AgentExecutionTerminationException:
PowerShell script completed with errors. at
Microsoft.TeamFoundation.DistributedTask.Handlers.PowerShellHandler.Execute(ITaskContext
context, CancellationToken cancellationToken) at
Microsoft.TeamFoundation.DistributedTask.Worker.JobRunner.RunTask(ITaskContext
context, TaskWrapper task, CancellationTokenSource tokenSource)
In the test log, I don't see any errors in the VS, just a warning about not able to connect(I see these often):
W, 2060, 5, 2017/04/10, 16:26:03.595, XXXTESTING\QTController.exe,
Test of LoadTestResultConnectString failed: A network-related or
instance-specific error occurred while establishing a connection to
SQL Server. The server was not found or was not accessible. Verify
that the instance name is correct and that SQL Server is configured to
allow remote connections. (provider: SQL Network Interfaces, error: 26
- Error Locating Server/Instance Specified)
I also see an error thrown in the Application Event log at the same time:
The description for Event ID 0 from source Application cannot be
found. Either the component that raises this event is not installed on
your local computer or the installation is corrupted. You can install
or repair the component on the local computer.
If the event originated on another computer, the display information
had to be saved with the event.
The following information was included with the event:
Error Handler Exception: System.ServiceModel.CommunicationException:
There was an error reading from the pipe: The pipe has been ended.
(109, 0x6d). ---> System.IO.IOException: The read operation failed,
see inner exception. ---> System.ServiceModel.CommunicationException:
There was an error reading from the pipe: The pipe has been ended.
(109, 0x6d). ---> System.IO.PipeException: There was an error reading
from the pipe: The pipe has been ended. (109, 0x6d).....
the message resource is present but the message is not found in the
string/message table
The issue is that I really don't know how to interpret these messages, each log just says "test run was aborted, failing the task", I'm not even certain the powershell issue is what caused it. I'm also not sure that the error thrown in the application log is related, though it was thrown at exactly the same time that the run failed.
It's also difficult to research this issue, when you really don't know what's causing the test agent to fail. There are posts related to VS, and to the TFS Test Agent, but these don't strike me as related issues, and of course there is this somewhat unhelpful post about the Powershell message.
Has anyone seen this sort of issue before? I don't think anything on my build server has changed over the last few days(maybe updates...), what do you think would cause an issue like this to occur?
If you look at the failed build(containing tests) after it is aborted in the "Build" section of TFS, its says it was "Aborted", that's it... If you look at results of the build(containing tests) in the "Test" section of TFS it specified that the test run "Exceeded Timeout".
Apparently MSTest was running up against the default value of this little gem. I think it defaults to 8 hours when not specified, but I'm not too sure about this. Anyways I set the following setting in my "Default.testsettings" file:
<?xml version="1.0" encoding="utf-8"?>
<TestSettings name="TestSettings1">
<Execution>
<Timeouts runTimeout="200000000" />
</Execution>
</TestSettings>
Seems to resolve the issue. Tests runs successfully and no longer time out.

System.Net.Http.HttpRequestException exception will running th xamarin UI Test on Physical Device

I have created a simple Xamarin.Forms(Portable) project and included UI Test project in it. But when i am trying to run the test in physical device it giving me below mentioned exception.
Test Name: AppLaunches
Test Outcome: Failed
Result Message:
SetUp : System.Net.Http.HttpRequestException : An error occurred while sending the request.
----> System.Net.WebException : The underlying connection was closed: The connection was closed unexpectedly.
Result StandardOutput: Full log file: C:\Users\Admin\AppData\Local\Temp\uitest\log-2016-10-22_11-04-53-698.txt
Skipping IDE integration as important properties are configured. To force IDE integration, add .PreferIdeSettings() to ConfigureApp.
Android test running Xamarin.UITest version: 2.0.0.1534
Initializing Android app on device ZX1D63GCCL with installed app: co.veloxcore.UITestSample2
Signing apk with Xamarin keystore.
Skipping installation: Already installed.
Here is the link to my project: XamarinUITest
Log File : Error Log
Are you using using ModernHttpClient?
Also you can use Polly if you want to handle network exceptions.
For example:
conferences = await Policy
.Handle<WebException>()
.WaitAndRetry
(
retryCount:5,
sleepDurationProvider: retryAttempt => TimeSpan.FromSeconds(Math.Pow(2, retryAttempt))
)
.ExecuteAsync(async () => await getConferencesTask);
Also AsyncErrorHandler is great tool to handle async exceptions

Resources