Forum Xamarin Xamarin Test Cloud (Read Only)

500 Internal Server Error

ChaseFlorellChaseFlorell CAInsider, University mod

I'm getting a 500 error when I push iOS to TestCloud, but I can't figure out the issue.

Negotiating file upload to Xamarin Test Cloud.
17:45:09Info
Posting to https://testcloud.xamarin.com/ci/upload2
17:45:09Info
Uploading Autofac.dll ... Already uploaded.
Uploading MyCompMyAppMobileiOS-2.1.0.1811.ipa... 10%
17:45:09Info
Uploading MyCompMyAppMobileiOS-2.1.0.1811.ipa... 20%
17:45:09Info
Uploading MyCompMyAppMobileiOS-2.1.0.1811.ipa... 30%
17:45:09Info
Uploading MyCompMyAppMobileiOS-2.1.0.1811.ipa... 40%
17:45:09Info
Uploading MyCompMyAppMobileiOS-2.1.0.1811.ipa... 50%
17:45:09Info
Uploading MyCompMyAppMobileiOS-2.1.0.1811.ipa... 60%
17:45:09Info
Uploading MyCompMyAppMobileiOS-2.1.0.1811.ipa... 70%
17:45:09Info
Uploading MyCompMyAppMobileiOS-2.1.0.1811.ipa... 80%
17:45:09Info
Uploading MyCompMyAppMobileiOS-2.1.0.1811.ipa... 90%
17:45:09Info
Uploading MyCompMyAppMobileiOS-2.1.0.1811.ipa... 100%
17:45:09Info
Uploading MyCompMyAppMobileiOS-2.1.0.1811.ipa... 100%
17:45:09Info
Uploading MyComp.MyApp.Core.dll... 11%
17:45:09Info
Uploading MyComp.MyApp.Core.dll... 22%
17:45:09Info
Uploading MyComp.MyApp.Core.dll... 34%
17:45:09Info
Uploading MyComp.MyApp.Core.dll... 45%
17:45:09Info
Uploading MyComp.MyApp.Core.dll... 57%
17:45:09Info
Uploading MyComp.MyApp.Core.dll... 68%
17:45:09Info
Uploading MyComp.MyApp.Core.dll... 80%
17:45:09Info
Uploading MyComp.MyApp.Core.dll... 91%
17:45:09Info
Uploading MyComp.MyApp.Core.dll... 100%
17:45:09Info
Uploading MyComp.MyApp.Mobile.dll... 14%
17:45:09Info
Uploading MyComp.MyApp.Mobile.dll... 29%
17:45:09Info
Uploading MyComp.MyApp.Mobile.dll... 43%
17:45:09Info
Uploading MyComp.MyApp.Mobile.dll... 58%
17:45:09Info
Uploading MyComp.MyApp.Mobile.dll... 73%
17:45:09Info
Uploading MyComp.MyApp.Mobile.dll... 87%
17:45:09Info
Uploading MyComp.MyApp.Mobile.dll... 100%
17:45:09Info
Uploading MyComp.MyApp.Mobile.dll... 100%
17:45:09Info
Uploading MyComp.MyApp.Mobile.Tests.dll... 98%
17:45:09Info
Uploading MyComp.MyApp.Mobile.Tests.dll... 100%
17:45:09Info
Upload failed. Response:
17:45:09Info
Status: 500
17:45:09Info
Contents:
17:45:09Info
500 Internal Server Error
17:45:09Info
If you are the administrator of this website, then please read this web application's log file and/or the web server's log file to find out what went wrong.

Here's how I'm using test-cloud.exe

Step TestCloudTests {
    [boolean] $runTests = [System.Convert]::ToBoolean($es.mobile.testCloud.run)

    if($runTests){
        $app = ls "$here\TestApp\*" -include *.ipa | select -First 1
        if(!$app){
            throw 'Could not find an app to test.'
        }

        Write-Host "Testing '$app'"
        $params = @(
            'submit',
            "$app",
            "$($es.mobile.testCloud.apiKey)"
            "--assembly-dir",
            "$($this.testAssemblyDir)",
            '--devices',
            "$($es.mobile.testCloud.deviceId.touch)",
            '--user',
            '[email protected]'
            '--fixture',
            'MyComp.MyApp.Mobile.Tests.TestCloud',
            '--test-chunk', #parallel by method
            '--nunit-xml',
            "$here\test-results.xml",
            '--async-json'
        )

        $dsym = ls "$here\TestApp\*" -include *.dsym | select -First 1
        if($dsym) {$params += @('--dsym', "$dsym")}

        Find-ToolPath "test-cloud.exe"
        Write-Host "test-cloud.exe $params"
        $output = Exec {test-cloud.exe $params} | ConvertFrom-Json
        $output.Log | Format-List

        if($output.ErrorMessages){
            $output.ErrorMessages | Format-List
            throw $output.ErrorMessages[0]
        }
        $this.releaseNotes += "`r`n`r`n*note: TestCloud tests have been run against this version [$version] of the iOS app."
        $this.releaseNotes += "Test Results are be available at [$($this.testUrl)$($output.TestRunId)/]($($this.testUrl)$($output.TestRunId)/)*"
    } else {
        Write-Host "The 'mobile.testCloud.run' variable was set to '$($es.mobile.testCloud.run)'."
        Write-Host 'Skipping TestCloud tests.'
    }
}

And this is how the command comes together

test-cloud.exe submit C:\xxx\MyComp.MyApp.Mobile.Touch\2.1.0.1811\TestApp\MyCompMyAppMobileiOS-2.1.0.1811.ipa cxxxxxxxxxxxxxxx769b33a8b2926 --assembly-dir C:\xxx\MyComp.MyApp.Mobile.Touch\2.1.0.1811\testAssemblies --devices 2xxxxxx3f --user [email protected] --fixture MyComp.MyApp.Mobile.Tests.TestCloud --test-chunk --nunit-xml C:\xxx\MyComp.MyApp.Mobile.Touch\2.1.0.1811\test-results.xml --async-json

Best Answer

Answers

  • AnthonyMehallelAnthonyMehallel USMember ✭✭✭

    Hi @ChaseFlorell ,

    have you to add the library Clabash in your iOS project ?

    Anthony M.

  • ChaseFlorellChaseFlorell CAInsider, University mod

    Yes, it's added in there.

    Here's my build task

    task CompileTouchForTestCloud -depends InitIos, UpdateTouchAssemblies -description 'This version simply includes a call to Calabash that isnt allowed in the iTunes store.' {
         # build TEST
         Invoke-MSBuild $this.Mobile.Touch.compileDir `
                   $this.Mobile.Touch.projectFile `
                   -logPath $this.artifactsDir.logsDir `
                   -namespace $this.touch.namespace `
                   -visualStudioVersion $this.visualStudioVersion `
                   -target 'clean;build' `
                   -customParameters @(
                       "/p:Configuration=Ad-Hoc",
                       "/p:Platform=iPhone",
                       "/p:BuildIpa=true",
                       "/p:ServerAddress=$($environmentSettings.mobile.touch.buildHostIp)",
                       "/p:ServerUser=$($environmentSettings.mobile.touch.buildServerUser)",
                       "/p:ServerPassword=$($environmentSettings.mobile.touch.buildServerPassword)") 
         Copy-Item $this.Mobile.Touch.testIpaPath "$($this.Mobile.Touch.compileDir)\TestApp\$($this.Mobile.Touch.finalIpaName)" -force
    }
    

    image

  • ChaseFlorellChaseFlorell CAInsider, University mod

    image

  • bdlbdl DKMember ✭✭

    @ChaseFlorell said:
    PEBKAC

    When I re-signed my app and then re-zipped it, I zipped the fully qualified path instead of just the Payload directory. Dang it.

    Hey Chase, I am having same issue when uploading my ipa to the testcloud. I get a 500 error.

    I am glad you found a workaround, but I am not able to understand the solution you are suggesting.

    I have an .ipa file which I have built using Debug->iPhone and I am uploading via terminal like this:

    /Library/Frameworks/Mono.framework/Versions/4.6.2/bin/mono /Users/xxxx/Desktop/Xamarin/packages/Xamarin.UITest.2.0.2/tools/test-cloud.exe submit /Users/xxxx/Desktop/Xamarin/Field/Field.iOS/bin/iPhone/Debug/FieldiOS 2017-01-01 19-18-14/FieldiOS.ipa fa2f0743dcf65ad6814f3f39173bad38 ....... assembly-dir /Users/xxxx/Desktop/Xamarin/Field/Field.UITest/bin/Debug

Sign In or Register to comment.