Giter Site home page Giter Site logo

Comments (5)

mavenik avatar mavenik commented on May 23, 2024 1

Hi @crynobone @driesvints

I have been experiencing this issue today. I have created a fresh repository and been able to reproduce the problem consistently. However, I do not use any native installs of PHP, Composer, or Laravel.

Could you help me with relevant instructions to issue a bug report using a docker image or any alternative method please?

Here's the repository for your reference:

  1. Repo link - https://github.com/mavenik/dusk_timeouts
  2. Commit ref - mavenik/dusk_timeouts@aac7546
  3. Note that I am able to reproduce this issue with one browser itself
  /**
   * Test if the page has a header
   */
  public function testDuskTimeoutPageHasHeader(): void
  {
    $this->browse(function (Browser $browser) {
      $browser->visit('/dusk_timeout_test')
              ->assertPresent('header');
    });
  }
  1. Terminal output
$ sail dusk --filter TimeoutTest

   FAIL  Tests\Browser\TimeoutTest
  ✓ dusk timeout page has accurate title                                                                                                                                                                    0.60s  
  ⨯ dusk timeout page has header                                                                                                                                                                           60.22s  
  ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────  
   FAILED  Tests\Browser\TimeoutTest > dusk timeout page has header                                                                                                                             TimeoutException   
  timeout: Timed out receiving message from renderer: 10.000
  (Session info: chrome=119.0.6045.123)

  at vendor/php-webdriver/webdriver/lib/Exception/WebDriverException.php:136
    132throw new StaleElementReferenceException($message, $results);
    133case 'detached shadow root':
    134throw new DetachedShadowRootException($message, $results);
    135case 'timeout':
  ➜ 136throw new TimeoutException($message, $results);
    137case 'unable to set cookie':
    138throw new UnableToSetCookieException($message, $results);
    139case 'unable to capture screen':
    140throw new UnableToCaptureScreenException($message, $results);

      +8 vendor frames 
  9   tests/Browser/TimeoutTest.php:28


  Tests:    1 failed, 1 passed (2 assertions)
  Duration: 60.94s
  1. Screenshot of failure
    Screenshot from 2023-11-22 17-18-33

I'm running a sail setup. Here are my setup steps if it helps

  1. Setup a fresh Laravel Sail application
curl -s https://laravel.build/dusk-timeouts | bash`
cd dusk-timeouts
./vendor/bin/sail up
  1. Install Dusk
./vendor/bin/sail composer require --dev laravel/dusk
./vendor/bin/sail artisan dusk:install
  1. Test Dusk scaffolding (was successful)
./vendor/bin/sail dusk
  1. Create a new browser test
./vendor/bin/sail artisan dusk:make TimeoutTest
  1. Execute TimeoutTest
./vendor/bin/sail dusk --filter TimeoutTest

from dusk.

crynobone avatar crynobone commented on May 23, 2024

Hey there, thanks for reporting this issue.

We'll need more info and/or code to debug this further. Can you please create a repository with the command below, commit the code that reproduces the issue as one separate commit on the main/master branch and share the repository here?

Please make sure that you have the latest version of the Laravel installer in order to run this command. Please also make sure you have both Git & the GitHub CLI tool properly set up.

laravel new bug-report --github="--public"

Do not amend and create a separate commit with your custom changes. After you've posted the repository, we'll try to reproduce the issue.

Thanks!

from dusk.

driesvints avatar driesvints commented on May 23, 2024

Feel free to reopen when you have the repo. Thanks

from dusk.

Rubrasum avatar Rubrasum commented on May 23, 2024

My issue seemed to be the method I was using with this retry(). I was successful with other tests not using visit like this.

from dusk.

TonisfelTr avatar TonisfelTr commented on May 23, 2024

Are there persons who get this error for now?

PHP: v8.3.6
Laravel: v10.48.8
Laravel Sail: v1.29.1
Laravel Dusk: v8.2.0

My code of DuskTestCase implemented class

    public function test_icd_page_read_correctly() {
        $this->browse(function (Browser $browser){
            $mainPage = $browser->visit(self::mainLink)->setChromeOptions("--headless");
            // Tests if page has been got correctly.
            $mainPage->assertSeeLink('https://mkb-10.com/index.php?pid=4002');
        });
    }

Error:

FAIL  Tests\Browser\ExampleTest
  ⨯ basic example                                                                                                                                                                                                                                                        60.68s  
  ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────  
   FAILED  Tests\Browser\ExampleTest > basic example                                                                                                                                                                                                          TimeoutException   
  timeout: Timed out receiving message from renderer: 10.000
  (Session info: chrome=123.0.6312.86)

  at vendor/php-webdriver/webdriver/lib/Exception/WebDriverException.php:136
    132▕                     throw new StaleElementReferenceException($message, $results);
    133▕                 case 'detached shadow root':
    134▕                     throw new DetachedShadowRootException($message, $results);
    135▕                 case 'timeout':
  ➜ 136▕                     throw new TimeoutException($message, $results);
    137▕                 case 'unable to set cookie':
    138▕                     throw new UnableToSetCookieException($message, $results);
    139▕                 case 'unable to capture screen':
    140▕                     throw new UnableToCaptureScreenException($message, $results);

      +8 vendor frames
  9   tests/Browser/ExampleTest.php:16


  Tests:    1 failed (1 assertions)
  Duration: 60.80s

from dusk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.