I'm trying to upload a ipa file to saucelabs storage but getting the error as mentioned above.

The command that I'm using -

$ curl -F 'payload=@/Users/<user-name>/Downloads/<file_name>.ipa' -F name=<file_name>.apk -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" ' 

I'm on mac. I've seen the questions on stackoverflow but none of them answers.

6 Answers

I was able to resolve this by not using single or double quotes around the file name.

curl -u "<userName>:<accessKey>" \ -X POST "" \ -F file=@/path/to/app/file/Application-debug-test.zip 
1

There might be a problem escaping your path. For me your command works, if the file is correct (I get an unauthorized of course). (curl 7.64.1)

Try your command from the Downloads folder:

cd /Users/<user-name>/Downloads curl -F @<file_name>.ipa -F name=<file_name>.apk -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" ' 

You may have to escape characters in your filename. Tip: You can also try drag and drop the file form finder to Terminal while the cursor is at the point where the filename is. Terminal will escape those automatically.

In addition to making sure the quotes were in the correct place, I had to remove the tilde that I first included in my file path.

Bad:

curl -F dsym=@"~/Users/<user-name>/Downloads/<file_name>.dSYM.zip" -H "X-APP-LICENSE-KEY: theKey" 

Good:

curl -F dsym=@"/Users/<user-name>/Downloads/<file_name>.dSYM.zip" -H "X-APP-LICENSE-KEY: theKey" 

I resolved this problem by replacing single quotes with double quotes instead.

I changed this:

curl -F '[email protected]' 

curl: (26) Failed to open/read local data from file/application

To this:

curl -F "[email protected]" 

You also don't need to place your endpoint in quotes.

Use below command for me it resolved

curl -F "file=@C:/Users/LENOVO/Desktop/git/ppt/8.apk" -H "Authorization:f06ecb3505899296f03b0c21d7dc5baf83fb999e3d0b4c1243874c82c0184874" 

For me I was using iTerm on MacOS and noticed this issue. I found out it was because iTerm did not have access to my Downloads folder and even though I was trying to access that folder there was no prompt. After I went into settings and enabled access to the Downloads folder this issue was fixed for me.

Mac settings windows showing file options

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.