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

Problem with Cypress: unable to successfully run rhino::test_e2e() #603

Open
marcusyoung opened this issue Jul 23, 2024 · 4 comments
Open
Labels
status: triage Awaiting review and labeling by a core developer

Comments

@marcusyoung
Copy link

Steps to reproduce

  1. I am working through the Rhino Masterclass from ShinyConf 2024
  2. I have got to task 5
  3. When I run rhino::test_e2e() I get the error message shown below.
  4. 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

@marcusyoung marcusyoung added the status: triage Awaiting review and labeling by a core developer label Jul 23, 2024
@marcusyoung
Copy link
Author

marcusyoung commented Jul 23, 2024

For information, cypress runs correctly, if npm run test-e2e is run from the .rhino directory. As does npm run test-e2e-interactive

@davidrsch
Copy link

davidrsch commented Sep 19, 2024

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.

@marcusyoung
Copy link
Author

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.

@davidrsch
Copy link

davidrsch commented Sep 28, 2024

I asked about this in Positron IDE posit-dev/positron#4822 (comment)

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: triage Awaiting review and labeling by a core developer
Projects
None yet
Development

No branches or pull requests

2 participants