rhino
rhino copied to clipboard
Problem with Cypress: unable to successfully run rhino::test_e2e()
Steps to reproduce
- I am working through the Rhino Masterclass from ShinyConf 2024
- I have got to task 5
- When I run
rhino::test_e2e()I get the error message shown below. - I get the same error also with a new Rhino project.
Bug description
> rhino::test_e2e()
> test-e2e
> start-server-and-test run-app [http://localhost:3333](vscode-file://vscode-app/c:/Program%20Files/Positron/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html#) run-cypress
1: starting server using command "npm run run-app"
and when url "[ '[http://localhost:3333](vscode-file://vscode-app/c:/Program%20Files/Positron/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html#)' ]" is responding with HTTP status code 200
running tests using command "npm run run-cypress"
> run-app
> cd .. && Rscript -e "shiny::runApp(port = 3333)"
- The project is out-of-sync -- use `renv::status()` for details.
Loading required package: shiny
Listening on [http://127.0.0.1:3333](vscode-file://vscode-app/c:/Program%20Files/Positron/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html#)
> run-cypress
> cypress run --project ../tests
It looks like this is your first time using Cypress: 13.6.2
[STARTED] Task without title.
[FAILED] Cypress failed to start.
[FAILED]
[FAILED] This may be due to a missing library or dependency. [https://on.cypress.io/required-dependencies](vscode-file://vscode-app/c:/Program%20Files/Positron/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html#)
[FAILED]
[FAILED] Please refer to the error below for more details.
[FAILED]
[FAILED] ----------
[FAILED]
[FAILED] C:\Users\myoun\AppData\Local\Cypress\Cache\13.6.2\Cypress\Cypress.exe: bad option: --smoke-test
[FAILED] C:\Users\myoun\AppData\Local\Cypress\Cache\13.6.2\Cypress\Cypress.exe: bad option: --ping=795
[FAILED]
[FAILED] ----------
[FAILED]
[FAILED] Platform: win32-x64 (10.0.22631)
[FAILED] Cypress Version: 13.6.2
Cypress failed to start.
This may be due to a missing library or dependency. [https://on.cypress.io/required-dependencies](vscode-file://vscode-app/c:/Program%20Files/Positron/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html#)
Please refer to the error below for more details.
----------
C:\Users\myoun\AppData\Local\Cypress\Cache\13.6.2\Cypress\Cypress.exe: bad option: --smoke-test
C:\Users\myoun\AppData\Local\Cypress\Cache\13.6.2\Cypress\Cypress.exe: bad option: --ping=795
----------
Platform: win32-x64 (10.0.22631)
Cypress Version: 13.6.2
Error: Command failed with exit code 1: npm run run-cypress
at makeError (C:\Users\myoun\git-repos\rhino-masterclass\task5\.rhino\node_modules\execa\lib\error.js:60:11)
at handlePromise (C:\Users\myoun\git-repos\rhino-masterclass\task5\.rhino\node_modules\execa\index.js:118:26)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
shortMessage: 'Command failed with exit code 1: npm run run-cypress',
command: 'npm run run-cypress',
escapedCommand: '"npm run run-cypress"',
exitCode: 1,
signal: undefined,
signalDescription: undefined,
stdout: undefined,
stderr: undefined,
failed: true,
timedOut: false,
isCanceled: false,
killed: false
}
Error in `node_run()` at [rhino/R/node.R:15:3](vscode-file://vscode-app/c:/Program%20Files/Positron/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html#):
! System command 'npm' exited with status 1.
Show Traceback
>
Expected behavior
Results of cypress test to be displayed
Rhino diagnostics
Windows 10 x64 build 22631 R version 4.4.1 (2024-06-14 ucrt) rhino: 1.7.0 node: v20.15.1
Comments
No response
For information, cypress runs correctly, if npm run test-e2e is run from the .rhino directory. As does npm run test-e2e-interactive
Hello, I would like to add that this issue only occurs when using Positron IDE as can be seen in:
Listening on [http://127.0.0.1:3333](vscode-file://vscode-app/c:/Program%20Files/Positron/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html#)
I have encountered this issue asswell when using Positron IDE in my machine but not when using RStudio. I would like to know if there are any plans to adapt rhinoverse functionality to work with Positron IDE, (box.lsp also doesn't work in Positron IDE). I imagine this may take some time due to there is not official release yet.
There is nothing in the docs about Rhino being only supported in RStudio, and indeed any talks I've seen from @kamilzyla he has been using VS Code (and Positron is built on that). Hopefully we'll get a response from the development team at some point.
I asked about this in Positron IDE https://github.com/posit-dev/positron/discussions/4822#discussioncomment-10764864
Positron currently does not support Rhino or Cypress out of the box (and it is not likely we'd add native support in the near term).