kobiton / bitrise-step-kobiton-upload-apps-repo

A Bitrise step to upload mobile application file to Kobiton Apps Repo
https://kobiton.com/integrations
MIT License
1 stars 7 forks source link

Upload step fails when it is used on a linux stack #9

Open mendozamiche opened 2 years ago

mendozamiche commented 2 years ago

Exit code 92 appears when running this step on this stack linux-docker-android-20.04 but it succeeds when using this stack osx-xcode-13.4.x. We require it to work on the linux stack as it saves more credits. What would be the fix here?

image

Stack: Android & Docker, on Ubuntu 20.04 (linux-docker-android-20.04) Elite

Nhattd97 commented 2 years ago

I have tried this step on the stack Android & Docker, on Ubuntu 20.04 and it worked properly.

I have noticed something weird on your screenshot. ... POST https://api.kobiton.com/v1/apps/[REDACTED]Url -H ... why it contains the [REDACTED] in the URL?. it's a hardcode URL in our script and should be ... POST https://api.kobiton.com/v1/apps/uploadUrl -H ...

mendozamiche commented 2 years ago

I think bitrise just replaces upload with [REDACTED] when it's displayed but the path is actually the correct one.

I forked the script and removed the --silent flag and got this:

image
Nhattd97 commented 2 years ago

@mendozamiche, sorry for the late response, I'm just back from vacation.

Can you share your bitrise.yml for further investigation? You can send it to my email nhattran@kobiton.com

Thanks

phoe3nix commented 2 years ago

@Nhattd97 hello! This problem because on Ubuntu system base64 wrap line after 76 symbols on line. You can fix this behavior, if you will this this option for base64 ... | base64 -w 0. But, on OSX system, base64 don't have this option. And you don't need to add anything on OSX system. In my fork I change behavior of base64. For example, you can use this

echo | base64 -w0 > /dev/null 2>&1
if [ $? -eq 0 ]; then
  # GNU coreutils base64, '-w' supported
  BASICAUTH=$(echo -n $KOB_USERNAME_INPUT:$KOB_APIKEY_INPUT | base64 -w 0)
else
  # Openssl base64, no wrapping by default
  BASICAUTH=$(echo -n $KOB_USERNAME_INPUT:$KOB_APIKEY_INPUT | base64)
fi

instead BASICAUTH=$(echo -n $KOB_USERNAME_INPUT:$KOB_APIKEY_INPUT | base64) Can you please fix this behavior for using original step, not fork?