Comments (5)
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:
- Repo link - https://github.com/mavenik/dusk_timeouts
- Commit ref - mavenik/dusk_timeouts@aac7546
- 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');
});
}
- 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
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/TimeoutTest.php:28
Tests: 1 failed, 1 passed (2 assertions)
Duration: 60.94s
I'm running a sail setup. Here are my setup steps if it helps
- Setup a fresh Laravel Sail application
curl -s https://laravel.build/dusk-timeouts | bash`
cd dusk-timeouts
./vendor/bin/sail up
- Install Dusk
./vendor/bin/sail composer require --dev laravel/dusk
./vendor/bin/sail artisan dusk:install
- Test Dusk scaffolding (was successful)
./vendor/bin/sail dusk
- Create a new browser test
./vendor/bin/sail artisan dusk:make TimeoutTest
- Execute TimeoutTest
./vendor/bin/sail dusk --filter TimeoutTest
from dusk.
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.
Feel free to reopen when you have the repo. Thanks
from dusk.
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.
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)
- A way to have different environment variables HOT 2
- Dusk v7.8.0 breaks Pest support
- Downloading ChromeDriver 115+ fails HOT 7
- Dusk 7.9.0 \ chromedriver.exe path not found HOT 11
- [7.9.1] unknown error: cannot find Chrome binary HOT 5
- `--stop-on-failure` option no longer seems to work HOT 1
- Driver won't download with Telescope enabled HOT 8
- unknown error: cannot find Chrome binary HOT 1
- Error This version of ChromeDriver only supports Chrome version 114 Current browser version is 118.0.5975.0 HOT 1
- Test class with no tests gives non-zero stderr status, but no warning to stdout and shows all tests pass HOT 5
- Unexpected behaviour when working with multiple checkboxes HOT 1
- waitForTextIn() broken in dusk 7.11.2 HOT 2
- Unknown option "--ansi" and "--no-ansi"
- Laravel Dusk doesn't trigger on @input when attached to <select> only on @change when using Vue HOT 2
- When running `php artisan dusk` the tests do not complete. They just hang. - MacOS Sonoma 14.2.1, Chip: M3 Pro HOT 9
- Throwing an exception in a dusk test inside the browser callback results in timeouts HOT 2
- vueAttribute does not work with Vue 3 and vite build. only with vite dev. HOT 6
- Failed to load assets in Sail HOT 4
- Dusk slows down after call to dump() HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dusk.