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

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

Related

Missing productTypeIdentifier error using new Apple Build System (xcbuild)

I have an XCode project that builds with the legacy build system, but when using the new build system under xcode11 immediately fails with the err:
.. forcing incremental PIF cache clear after loading error: Required key 'productTypeIdentifier' is missing in StandardTarget dictionary
note: Using new build system
error: Build service could not start build operation: unknown error while handling message: MsgHandlingError(message: "no PIF transfer has been initiated")
I'm looking for any info that might help clarify this.
What is a 'StandardTarget dictionary'? Can I add the missing key directly? Or is this a consequence some other setting?
Are there any 'PIF transfer' experts out there?

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.

Failed to enable Hyperloop

Using a Pro account, I created a new app (using Studio), when tried to enable Hyperloop, the popup of progress just disappear without any message and still hyperloop disabled.
After checking the Studio logs, I found an error and a suggestion of using the CLI for that.
!ENTRY com.aptana.core 1 0 2016-07-18 20:00:53.309
!MESSAGE (Build 4.7.0.201607130543) [INFO] com.aptana.core/debug/shell/output Process Output:
Failed to enable Hyperloop: Error: TypeError: undefined is not a function
Unable to register the new app with Appcelerator Platform either due to limited connectivity or other unexpected problem. Please retry later using the command 'appc new --import --project-dir /path/to/project' { [Error: ArrowDB apps already exist for this app_guid]
success: false,
description: 'ArrowDB apps already exist for this app_guid',
code: 400,
internalCode: undefined }
When I tried the appc new --import --project-dir ., I got the same message, even removing the app from the platform I can't get hyperloop to work, the other ArrowDB don't seem to have an error (I don't use that personally).
Anything missing?
appc -v = 5.4.0-31
appc ti sdk = 5.4.0.v20160712013704

mobilefirst native ios keychain wrapper issue

I am working on a project for a native iOS app using xcode to develop the project, but including both MobileFirst Platform Foundation capabilities and mobile data capabilities from Bluemix. We are using a shared git repository on IBM DevOps services (jazzhub) to share project source code and work collaboratively on it.
Most of the native apps I have built in the past have been on my own, so this is my first attempt to collaborate using git/xcode working together.
All that is just context for the issue, which is a project using the above environment on my collegues mac build/runs fine. Once I git clone the project and try to run it on my mac I am getting the following error:
*** Assertion failure in -[KeychainItemWrapper writeToKeychain], /tmp/builds/bld-00-20141218-1823-2824648/worklight-ios/framework-xcode-project/NativeSDK-Sources/WorkLight/KeychainItemWrapper.m:311
2015-01-31 13:16:27.657 IBMBankNativeApp[88827:11348297] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Couldn't add the Keychain Item.'
Above this message in the xcode log I see a secussful initialization of the Bluemix and the call to initialize the MFP connection:
2015-01-31 13:16:27.439 NativeApp[88827:11348297] INFO: IBMBluemix initialization successful.
IBMBluemix SDK Version: 1.0.1.20141124-1240
BlueMix Target: https://mybank.mybluemix.net
applicationId: ea36d23f-....
2015-01-31 13:16:27.530 NativeApp[88827:11348297] IBMData SDK initialization successful.
2015-01-31 13:16:27.580 NativeApp[88827:11348297] ViewController - connectToServer - Initializing ...
2015-01-31 13:16:27.591 NativeApp[88827:11348297] [DEBUG] [WL_CONFIG] -[WLConfig init] in WLConfig.m:68 :: {
"application id" = NativeiOSApi;
"application version" = "1.0";
environment = iOSnative;
host = "192.168.0.17";
platformVersion = "6.3.0.00.20141218-1823";
port = 10080;
protocol = http;
wlServerContext = "/MFProject/";
wlUid = "wY/mbnwKTDDYQUvuQCdSgg==";
}
Before the MFP callback for initialization of the connection the application terminates with the keychain error.
I did not add the keychain access to the project, I'm using cocoapods to set-up bluemix support and wonder if that somehow is adding the keychain support?
I tried removing and running, removing then re-adding they keychain support in the project capabilities, all with the same error.
Is there something checked in and replicated by git that shouldn't be?
Thanks in advance!
Verify that the following Key exists under the Root key in both entitlements-debug.plist and entitlements-release.plist:
Key: keychain-access-groups
Type: Array
Inside the above Key:
Key: Item 0
Type: String
Value: $(AppIdentifierPrefix)worklight.group

Deployment error: windows.licensing failed to start WSService

I get the following error when I try to deploy a windows store app:
Error : DEP0700 : Registration of the app failed. error 0xC0020017:
windows.licensing failed to start WSService while installing
My developer license is valid. I changed the package name, still the error persists.
This problem occurs with old and completely new projects.
Does anyone have an idea how to solve this?
Registration of app failed error usually occurs when you try to re-deploy an app with the same package ID from visual studio if it is already installed by a different user.
Solution is to change the Package Identity
Open the manifest
Go to the package tab
Modify the identity

Resources