Testfairy integration not working

Hi guys,

Testfairy integration is not working and it always exits with code 2. It doesn’t find any apk files inside /bitrise/deploy directory. I am certain, that the path I’ providing is correct because other steps are using it without an issue. Can you please take a look?

Thanks,
Milosz

Hi @milosz,

Thanks for reporting the issue here!

Can you please copy paste the related build’s bitrise.io URL? We’ll look into it ASAP!

Hi Victor!

The build url is: https://www.bitrise.io/build/cc0f4e53c1b26d45

Funny thing, I found a workaround that is even better then the official step, because it can upload multiple apks at once. It’s using TestFairy REST API. Check this out, maybe it will be usefull for you:

upload_to_testfairy() {
    curl https://upload.testfairy.com/api/upload -F api_key=$TEST_FAIRY_API_KEY -F file=@$1
}

(IFS='|'; for word in $BITRISE_APK_PATH_LIST; do upload_to_testfairy $word; done)
1 Like

Glad to hear you found a solution @milosz!

Checked the build log & config and I see what the issue was. It’s not a bug in the TestFairy step directly, but the step certainly could be updated - I scheduled an update for it :wink:

So the issue is that most of our steps which expect an APK path as its input can work both with a single APK path as well as with a list of APKs (pipe - | character separated APK list, e.g. first.apk | second.apk).

In your workflow you use the Sign APK step, which does accept the “APK list” format, to re-sign the APK files. This step then exports the re-signed APK path in its APK_PATH output for easier step chaining.

Now this means that the TestFairy step will get a list of APKs in your case (~ app1.apk|app2.apk) but the TestFairy step was not updated, multi APK handling is not implemented in it.

We’ll try to update the TestFairy step ASAP, in the meantime you can:

  1. Either use a step like the one you shared (which indeed goes through these APKs one by one, and uploads them separately)
  2. Or have a sequence of steps:
    1. Re-sign APK (a single one!!)
    2. TestFairy (deploy that single APK)
    3. Second Sign APK step for the second APK
    4. TestFairy step - to deploy the second APK

In short (for #2) the step works if you only specify one APK for it at a time, and instead use multiple TestFairy steps to upload the APKs, one by one.

Thanks again for reporting, we’ll try to share the update ASAP! :slight_smile:

1 Like