Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"detox recorder" can not be used as script with npm/yarn #16

Open
fabianbru opened this issue Jun 23, 2021 · 5 comments
Open

"detox recorder" can not be used as script with npm/yarn #16

fabianbru opened this issue Jun 23, 2021 · 5 comments
Labels
bug Something isn't working

Comments

@fabianbru
Copy link

Describe the Bug
When using a "detox recorder ..." command through the package.json "scripts" section nothing happens and process exits immediately without error/logs.

To Reproduce
package.json

  "scripts": {
    "detox:ios:recorder": "detox recorder -b \"<APP_ID>\" -s booted -r --outputTestFile \"./test/e2e/NewTest.e2e.js\" --testName \"New Test\""
  },
  • run yarn detox:ios:recorder or npm run detox:ios:recorder
  • process will exit and no output is shown
» yarn detox:ios:recorder
yarn run v1.22.10
$ detox recorder -b "<APP_ID>" -s booted -r --outputTestFile "./test/e2e/NewTest.e2e.js" --testName "New Test"
✨  Done in 0.55s.

On the other hand copying the command above out of the package.json scripts and run it directly in the terminal will start the recording without problems.

Expected Behavior
Running a "detox recorder ..." command as package.json script has the same effect as running it directly in the console.

Actual Behavior
Running a "detox recorder ..." command as package.json script does nothing.

Screenshots
no screens needed

Environment

  • macOS: 11.4
  • Xcode: 12.5
  • iOS Simulator Runtime: 14.5
  • Detox CLI version: 18.18.1
  • Detox Recorder Version: 1.0.151 (via package.json and also in "node_modules/detox-recorder/package.json), but detox recorder -v outputs 1.0.146

Logs
no output is shown in log stream if run as script.

Additional Context

  • nvm installed
  • global yarn through brew
@fabianbru fabianbru added the bug Something isn't working label Jun 23, 2021
@RayKay91
Copy link

Also facing the same issue. Anyone know of a fix?

@MilanMalovic
Copy link

Same here, any fix for this ?

@karimdjemai
Copy link

I am also facing this

@isaac-tribal
Copy link

isaac-tribal commented May 3, 2022

same here

@DenianFossatti
Copy link

Workaround:
"scripts": {
"detox:ios:recorder": "node_modules/detox-recorder/DetoxRecorderCLI --bundleId com.example.app --simulatorId booted --outputTestFile 'temp/testFile.ts' --record"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants