Skip to content

Test artifacts on android sometimes fail to save with adb: error: cannot create file/directory #4726

Open
@possible-evan

Description

@possible-evan

What happened?

With test artifacts enabled we often see errors when it tries to write the video artifact. The result is an empty directory for the test case without any video included. This is intermittent and only some tests fail to save artifacts.

Example output

21:21:33.317 detox[17864] i adb: error: cannot create file/directory 'e2e_artifacts/✗ Test Name/test.mp4': No such file or directory

What was the expected behaviour?

Test artifacts are saved to disk/storage after tests.

Was it tested on latest Detox?

  • I have tested this issue on the latest Detox release and it still reproduces.

Did your test throw out a timeout?

Help us reproduce this issue!

This is our detox artifacts config

artifacts: {
    rootDir: 'e2e_artifacts/',
    plugins: {
      log: {
        enabled: true,
      },
      video: {
        enabled: true,
        keepOnlyFailedTestsArtifacts: true,
      },
      screenshot: {
        enabled: true,
        keepOnlyFailedTestsArtifacts: true,
      },
    },
  },

In what environment did this happen?

Detox version: 20.34.4
React Native version: 0.75.4
Has Fabric (React Native's new rendering system) enabled: no
Node version: 18.19.1
Device model: android pixel 5 simulator
Android version: 12
Test-runner (select one): cucumber

Detox logs

Detox logs
paste logs here!

Device logs

Device logs
paste your device.log here!

More data, please!

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions