ContributionsMost RecentMost LikesSolutionsRe: System.InvalidCastException starting client side appium C# test Yes, whatever the issue was did get fixed. System.InvalidCastException starting client side appium C# test Seeing the following when attempting to start BitBar sessions with `new AndroidDriver<AndroidElement>(url, options, TimeSpan.FromMinutes(3)`: System.InvalidCastException : Unable to cast object of type 'System.String' to type 'System.Collections.Generic.Dictionary`2[System.String,System.Object]' at OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapabilities desiredCapabilities) at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities) at OpenQA.Selenium.Appium.AppiumDriver`1..ctor(ICommandExecutor commandExecutor, ICapabilities appiumOptions) at OpenQA.Selenium.Appium.AppiumDriver`1..ctor(Uri remoteAddress, ICapabilities appiumOptions, TimeSpan commandTimeout) at OpenQA.Selenium.Appium.Android.AndroidDriver`1..ctor(Uri remoteAddress, DriverOptions driverOptions, TimeSpan commandTimeout) at... Works fine with my local Appium instance. Found an old bug that seems similar but is closed: 356 Re: Uploading app package using Invoke-RestMethod or Invoke-WebRequest Still exists. Re: 404 when attemting to upload or update a file using curl.exe on windows Support caught the issue with the syntax generated by the cURL Uploader in Azure. It tries to use -T "my.ip", but need to do a POSt with -F "file=my.ipa". Corrected syntax: c:\Windows\System32\curl.exe -F "file=@C:\my.ipa" https://cloud.bitbar.com/api/me/files --stderr - -u "<key>:" Uploading app package using Invoke-RestMethod or Invoke-WebRequest Attempting to upload my app to BitBar using Invoke-RestMethod or Invoke-WebRequest. Getting " : The remote server returned an error: (500) Internal Server Error." ``` $package = 'c:\my.apk' $bitbar = 'https://cloud.bitbar.com/api/me/files/' $user = '<key>' $pair = "$($user):" $encodedCreds = [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes($pair)) $basicAuthValue = "Basic $encodedCreds" $Headers = @{Authorization = $basicAuthValue} Invoke-RestMethod -Method Post -Uri $bitbar -Headers $Headers -InFile $package -ContentType 'application/octet-stream' ``` I can successfully query using `Invoke-RestMethod -Method Get -Uri $bitbar -Headers $Headers`, so I know that authentication is working with $Headers and that the URL in $bitbar is valid. 404 when attemting to upload or update a file using curl.exe on windows When using c:\windows\system32\curl.exe, attempts to upload or update a file result in curl.exe -T C:\my.apk HTTPS://cloud.bitbar.com/api/me/files/ --stderr - -u <access_key>: {"message":"Resource '/api/v2/users/74701599/files/com.phonegap.clockshark.apk' does not exist","statusCode":404} curl.exe -T C:\my.apk https://cloud.bitbar.com/api/me/files/<id>/file --stderr - -u <access_key>: {"message":"Resource '/api/v2/users/74701599/files/148705724/file' does not exist","statusCode":404} Both work fine when I try with cygwin curl. Solved