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

error with shinytest2::AppDriver$new #352

Open
NikolozAz opened this issue Aug 18, 2023 · 8 comments
Open

error with shinytest2::AppDriver$new #352

NikolozAz opened this issue Aug 18, 2023 · 8 comments

Comments

@NikolozAz
Copy link

Hello shiny devs,

i am trying to get started with the shinytest2 package and encounter an errror already when running shinytest2::record_test or shinytest2::AppDriver$new(getwd()). I tried to run those codes also with the simple shiny app from your getting started with shinytest2 webpage (https://rstudio.github.io/shinytest2/articles/shinytest2.html). This error looks as follows.
shinytest2_error
As a remark i wanted to add, that when i run for example shinytest2::record_test all my opened chrome pages are reloaded.
Has anyone the same issue? Thank you in advance!

@schloerke
Copy link
Collaborator

There is error output in your screenshot:

Cannot find an available port. Please try again.

Are you able to view the R home page with a chromote session?

library(chromote)

b <- ChromoteSession$new()
b$Page$navigate("https://www.r-project.org/")
b$view()

@NikolozAz
Copy link
Author

Hi, thank you for your response. No i am not able to do it either. Then it's a chromote problem right?

@NikolozAz
Copy link
Author

It reloads all the pages as beforehand...

@schloerke
Copy link
Collaborator

Yes, the failure is not related to shinytest2. (But, we can finish our conversation here.)

I don't understand why your machine can not open a port. Are you able to successfully run this code?

 httpuv::randomPort()

@NikolozAz
Copy link
Author

Okay, thanks. I was able to run that code successfully. It returns 9899 as a value.

@schloerke
Copy link
Collaborator

schloerke commented Aug 18, 2023

Hmmmmm. I don't know then. Maybe updating your Google Chrome installation will fix it?

Once you're able to successfully run chromote:::launch_chrome(), then then the original {shinytest2} problem should be fixed.

@NikolozAz
Copy link
Author

Okay, thank you. I will try it.

@NikolozAz
Copy link
Author

It turns out that as that function of chromote package (chromote:::launch_chrome()) is internal function, the security system of a company doesn't allow it to run. So for now, i won't be able to use it. But nice to know it and thank you for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants