# Fastlane scan: different output locally and on Bitrise

**URL:** <https://discuss.bitrise.io/t/fastlane-scan-different-output-locally-and-on-bitrise/4599>\
**Category:** Tooling Issues\
**Created:** [March 26, 2018, 10:59am UTC](https://discuss.bitrise.io/t/fastlane-scan-different-output-locally-and-on-bitrise/4599 "2018-03-26T10:59:26Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![pikor](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/pikor/32/1315_2.png) [@pikor](https://discuss.bitrise.io/u/pikor)\
**Post date:** [March 26, 2018, 10:59am UTC](https://discuss.bitrise.io/t/fastlane-scan-different-output-locally-and-on-bitrise/4599/1 "2018-03-26T10:59:27Z")

</div>

Hi!

I use `fastlane scan` to run my tests. I have a test that is randomly failing. Of course when I run it locally it always passes 🙂  
Then thing is that fastlane locally prints this kind of output

```auto
✗ TalkDownloader_will_parse_and_save_talks
expected to be nil, got <object_description>

```

However on Bitrise, fastlane produces different output, without crucial information on why test failed

```auto
Failing tests:
[22:49:24]: ▸ TalkDownloaderSpec.TalkDownloader_will_parse_and_save_talks
[22:49:24]: ▸ **TEST FAILED**

```

Output from latest version of fastlane-step (2.3.12).  
So I am wondering, is it my setup? Or bug in the step? Or maybe it’s problem with my configuration?  
I didn’t spot any specific inputs for [step](https://github.com/bitrise-io/bitrise-steplib/blob/master/steps/fastlane/2.3.12/step.yml).

And this is how fastlane step is configured in my bitrise.yml

```auto
  fastlane-test:
    steps:
    - fastlane:
        inputs:
        - lane: tests

```

EDIT  
After finding this issue: [iOS tests failed randomly/exit status 65](http://discuss.bitrise.io/t/ios-tests-failed-randomly-exit-status-65/3536/4)  
I added `- deploy-tests-log` as a next step after `fastlane-test`, `deploy-tests-log` is configured as follows:

```auto
  deploy-tests-log:
    steps:
      - deploy-to-bitrise-io:
          inputs:
            - deploy_path: ~/Library/Logs/scan/AppName-AppName.log

```

But I get `Issue with input: DeployPath - path not exist at: ~/Library/Logs/scan/AppName-AppName.log`

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [March 26, 2018, 3:47pm UTC](https://discuss.bitrise.io/t/fastlane-scan-different-output-locally-and-on-bitrise/4599/2 "2018-03-26T15:47:51Z")

</div>

Hi @pikor,

The `fastlane` step indeed moves the logs from the default dir, into the `$BITRISE_DEPLOY_DIR` directory.

The **Deploy to [Bitrise.io](http://Bitrise.io)** step is configured to deploy all files from the `$BITRISE_DEPLOY_DIR` directory.

So, ideally / by default, those log files should be attached to the build, unless you change the config/path to deploy of the Deploy to [Bitrise.io](http://Bitrise.io) step.

Can you please try to remove the `deploy_path` config of the `deploy-to-bitrise-io` step, to reset it back to its default value (`$BITRISE_DEPLOY_DIR`)?

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [March 26, 2018, 3:48pm UTC](https://discuss.bitrise.io/t/fastlane-scan-different-output-locally-and-on-bitrise/4599/3 "2018-03-26T15:48:48Z")

</div>

If that wouldn’t help, please also copy paste the new build’s [bitrise.io](http://bitrise.io) URL so that we can check the full logs! 🙂

---

<div class="post-metadata">

**Author:** ![pikor](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/pikor/32/1315_2.png) [@pikor](https://discuss.bitrise.io/u/pikor)\
**Post date:** [March 27, 2018, 8:06am UTC](https://discuss.bitrise.io/t/fastlane-scan-different-output-locally-and-on-bitrise/4599/4 "2018-03-27T08:06:00Z")

</div>

> The fastlane step indeed moves the logs from the default dir, into the $BITRISE\_DEPLOY\_DIR directory.

Ahh! Okay, so now my bitrise.yml looks as follows:

```auto
   feature:
     before_run:
        - cache-pull
        - bootstrap
        - fastlane-test
        - deploy-tests-log

  deploy-tests-log:
    steps:
      - deploy-to-bitrise-io:

```

but after successful build, this is what I see

```auto
Deploying the content of the Deploy directory separately
List of files to deploy
Deploying files
Success
You can find the Artifact on Bitrise, on the Build's page: https://www.bitrise.io/build/295e07ce22c24c5f

```

But apps & artifacts tab shows `No apps generated...`

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [March 27, 2018, 6:15pm UTC](https://discuss.bitrise.io/t/fastlane-scan-different-output-locally-and-on-bitrise/4599/5 "2018-03-27T18:15:20Z")

</div>

Could you please clarify this a bit? I checked the build’s log, but it seems it’s successful, and no app is deployed because none are generated, you just run tests with `fastlane`… Did I miss something? 🤔

Or do you mean the fastlane logs are not attached to the build? If you mean that, I just checked the step’s code again and it only moves the additional fastlane log files into the deploy dir if fastlane fails: [https://github.com/bitrise-io/steps-fastlane/blob/ae39dbb65a36320446593e1e2f104b93b62bf09c/main.go#L311](https://github.com/bitrise-io/steps-fastlane/blob/ae39dbb65a36320446593e1e2f104b93b62bf09c/main.go#L311) - but it does not if fastlane is successful, which it was in the build you linked here ([Fastlane scan: different output locally and on Bitrise](http://discuss.bitrise.io/t/fastlane-scan-different-output-locally-and-on-bitrise/4599/4?u=viktorbenei)).

---

<div class="post-metadata">

**Author:** ![pikor](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/pikor/32/1315_2.png) [@pikor](https://discuss.bitrise.io/u/pikor)\
**Post date:** [March 28, 2018, 9:38am UTC](https://discuss.bitrise.io/t/fastlane-scan-different-output-locally-and-on-bitrise/4599/6 "2018-03-28T09:38:30Z")

</div>

> I checked the build’s log, but it seems it’s successful, and no app is deployed because none are generated, you just run tests with fastlane… Did I miss something?

No, for builds on `task/*` branches, apps are not generated.

> and it only moves the additional fastlane log files into the deploy dir if fastlane fails:(…) - but it does not if fastlane is successful

Ahh. That makes sense! Although if you take a look at this build [https://www.bitrise.io/build/f6560b4e430e5e49](https://www.bitrise.io/build/f6560b4e430e5e49), test failed but also Apps & Artifacts doesn’t contain any logs.

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [March 29, 2018, 2:42pm UTC](https://discuss.bitrise.io/t/fastlane-scan-different-output-locally-and-on-bitrise/4599/7 "2018-03-29T14:42:01Z")

</div>

Checked the log and it seems you changed the **Deploy to [Bitrise.io](http://Bitrise.io)** step’s deploy path input. Instead of the default `$BITRISE_DEPLOY_DIR` it’s set to a specific path, from the log:

```auto
+------------------------------------------------------------------------------+
| (0) deploy-to-bitrise-io |
+------------------------------------------------------------------------------+
| id: deploy-to-bitrise-io |
| version: 1.3.10 |
| collection: https://github.com/bitrise-io/bitrise-steplib.git |
| toolkit: go |
| time: 2018-03-27T14:48:09-07:00 |
+------------------------------------------------------------------------------+
| |
...
- DeployPath: REDACTED.app.dSYM.zip
...

```

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [March 29, 2018, 2:43pm UTC](https://discuss.bitrise.io/t/fastlane-scan-different-output-locally-and-on-bitrise/4599/8 "2018-03-29T14:43:29Z")

</div>

Depending on what you want to do, it might be a good idea to add a second Deploy to [Bitrise.io](http://Bitrise.io) step (you can add as many as you like 😉 ) and just keep that on its default, so that it attaches the files from the `$BITRISE_DEPLOY_DIR` while you use the other Deploy to [Bitrise.io](http://Bitrise.io) step to attach the dSYM or any other artifact which is not in the `$BITRISE_DEPLOY_DIR`.

---

<div class="post-metadata">

**Author:** ![pikor](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/pikor/32/1315_2.png) [@pikor](https://discuss.bitrise.io/u/pikor)\
**Post date:** [March 30, 2018, 9:55am UTC](https://discuss.bitrise.io/t/fastlane-scan-different-output-locally-and-on-bitrise/4599/9 "2018-03-30T09:55:45Z")

</div>

Ahh, now it works great! Thanks for helping me!

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [April 3, 2018, 2:43pm UTC](https://discuss.bitrise.io/t/fastlane-scan-different-output-locally-and-on-bitrise/4599/10 "2018-04-03T14:43:28Z")

</div>

Any time! 😉

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [April 17, 2018, 4:00pm UTC](https://discuss.bitrise.io/t/fastlane-scan-different-output-locally-and-on-bitrise/4599/11 "2018-04-17T16:00:42Z")

</div>

This topic was automatically closed after 14 days. New replies are no longer allowed.
