rstudio / rstudio/shinytest2

load_timeout not working

Open
#375 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
R
Stars
123
Forks
23
PR merge metrics
No merged PRs in 30d

Description

Dear all,

I suppose I am the cause of the issue or I did not understand how to make it work but I have a shiny app that makes use of a lot of libraries taking a lot of time to be loaded and the default chromote timeout of 10 seconds in not enough. I always get the following issue.

ℹ AppDriver logs:
{shinytest2} R info   14:25:15.33 Start AppDriver initialization
{shinytest2} R info   14:25:15.33 Starting Shiny app
{shinytest2} R info   14:25:15.98 Creating new ChromoteSession
{shinytest2} R info   14:25:16.06 Setting window size: 899x1619
{shinytest2} R info   14:25:16.06 Setting window size to `1619`x`899`
{shinytest2} R info   14:25:16.07 Navigating to Shiny app
{shinytest2} R info   14:25:26.07 Error while initializing AppDriver:
                                  Chromote: timed out waiting for response to command Page.navigate

It seems that after 10 seconds, the app is interrupted and I cannot test it.

I tried using a lot of ways (environment variables, parameters in new()) but whathever I try, it does not seem to change anything. Am I the only one experiencing this issue. Do I do something wrong when updating the values of load_timeout and timeout in when initialzing the AppDriver?

Here is how I start the AppDriver. From my understanding, to timeout shoud now be 13, but the options does not change anything.


  app <- AppDriver$new(
    name = "myapp",
    height = 899, width = 1619,
    view = F,
    expect_values_screenshot_args = FALSE,
    load_timeout = 13000,
    timeout = 13000
  )

Many thanks for your insights

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure with the shown AppDriver$new call, using load_timeout and timeout set to 13000, and inspect the AppDriver initialization log around Chromote's Page.navigate command. Compare the configured values with the observed 10-second timeout; done means the app can load beyond the default timeout or the configuration failure is clearly reported.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.