-
-
Notifications
You must be signed in to change notification settings - Fork 191
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
[🐛 Bug]: An error of 'Timeout 30000ms exceeded.' occurred in Docker mode But Correct in non Docker mode #851
Comments
Hey! There are a bunch of different things that might be failing here. I'd recommend using or building on top of the docker image we have provided in the examples repo. However, if you'd still like to try to debug this further, I'd check the screenshots and recordings that are produced after you run the tests. They might contain useful clues as to why the tests are failing 🕵️♂️ |
ubuntu@ip-172-31-32-231:~/code/frontend-cypress$ docker-compose up
Creating network "frontend-cypress_default" with the default driver
Building frontend-cypress
Step 1/6 : FROM cypress/browsers:node-18.16.0-chrome-114.0.5735.133-1-ff-114.0.2-edge-114.0.1823.51-1
---> 7840cba986fe
Step 2/6 : WORKDIR /usr/src/app
---> Using cache
---> 4748e9ebf804
Step 3/6 : COPY package.json ./
---> Using cache
---> 1f146dbe433f
Step 4/6 : RUN npm install
---> Running in 90bd4f174858
npm WARN deprecated querystring@0.2.1: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
added 1156 packages, and audited 1157 packages in 2m
183 packages are looking for funding
run `npm fund` for details
8 vulnerabilities (5 moderate, 3 high)
Some issues need review, and may require choosing
a different dependency.
Run `npm audit` for details.
Removing intermediate container 90bd4f174858
---> bc2a9b735150
Step 5/6 : COPY . ./
---> 3ac8a8e3d36d
Step 6/6 : CMD ["npm", "run","synpress:run"]
---> Running in ec78b9f2f7c7
Removing intermediate container ec78b9f2f7c7
---> 34756e131a94
Successfully built 34756e131a94
Successfully tagged frontend-cypress_frontend-cypress:latest
WARNING: Image for service frontend-cypress was built because it did not already exist. To rebuild this image you must use `docker-compose build` or `docker-compose up --build`.
Creating frontend-cypress_frontend-cypress_1 ... done
Attaching to frontend-cypress_frontend-cypress_1
frontend-cypress_1 |
frontend-cypress_1 | > @synpress-io/synpress-in-docker-example@1.0.0 synpress:run
frontend-cypress_1 | > ./node_modules/.bin/synpress run --config baseUrl=https://98ba-157-245-206-214.ngrok-free.app/ --headless
frontend-cypress_1 |
frontend-cypress_1 | [STARTED] Task without title.
frontend-cypress_1 | [SUCCESS] Task without title.
frontend-cypress_1 | libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
frontend-cypress_1 |
frontend-cypress_1 | DevTools listening on ws://127.0.0.1:33929/devtools/browser/91a7b967-ec86-40b8-801f-3fad688ec0d6
frontend-cypress_1 | [399:0918/053822.973828:ERROR:gpu_memory_buffer_support_x11.cc(44)] dri3 extension not supported.
frontend-cypress_1 |
frontend-cypress_1 | ====================================================================================================
frontend-cypress_1 |
frontend-cypress_1 | (Run Starting)
frontend-cypress_1 |
frontend-cypress_1 | ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
frontend-cypress_1 | │ Cypress: 12.17.3 │
frontend-cypress_1 | │ Browser: Chrome 114 │
frontend-cypress_1 | │ Node Version: v18.16.0 (/usr/local/bin/node) │
frontend-cypress_1 | │ Specs: 1 found (UD-spec.js) │
frontend-cypress_1 | │ Searched: tests/e2e/specs/**/*.{js,jsx,ts,tsx} │
frontend-cypress_1 | └────────────────────────────────────────────────────────────────────────────────────────────────┘
frontend-cypress_1 |
frontend-cypress_1 |
frontend-cypress_1 | ────────────────────────────────────────────────────────────────────────────────────────────────────
frontend-cypress_1 |
frontend-cypress_1 | Running: UD-spec.js (1 of 1)
frontend-cypress_1 |
frontend-cypress_1 |
frontend-cypress_1 | UD spec
frontend-cypress_1 | WARNING: Warning: Middleware for RTK-Query API at reducerPath "api" has not been added to the store.
frontend-cypress_1 | Features like automatic cache collection, automatic refetching etc. will not be available.
frontend-cypress_1 | ERROR: Warning: Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.%s
frontend-cypress_1 | (Attempt 1 of 2) should connect wallet with success
frontend-cypress_1 | 1) should connect wallet with success
frontend-cypress_1 |
frontend-cypress_1 |
frontend-cypress_1 | 0 passing (2m)
frontend-cypress_1 | 1 failing
frontend-cypress_1 |
frontend-cypress_1 | 1) UD spec
frontend-cypress_1 | should connect wallet with success:
frontend-cypress_1 | CypressError: `cy.task('importMetamaskAccount')` failed with the following error:
frontend-cypress_1 |
frontend-cypress_1 | > page.waitForNavigation: Timeout 30000ms exceeded.
frontend-cypress_1 | =========================== logs ===========================
frontend-cypress_1 | waiting for navigation until "load"
frontend-cypress_1 | ============================================================
frontend-cypress_1 |
frontend-cypress_1 | https://on.cypress.io/api/task
frontend-cypress_1 | at <unknown> (https://98ba-157-245-206-214.ngrok-free.app/__cypress/runner/cypress_runner.js:151171:78)
frontend-cypress_1 | at tryCatcher (https://98ba-157-245-206-214.ngrok-free.app/__cypress/runner/cypress_runner.js:18744:23)
frontend-cypress_1 | at Promise._settlePromiseFromHandler (https://98ba-157-245-206-214.ngrok-free.app/__cypress/runner/cypress_runner.js:16679:31)
frontend-cypress_1 | at Promise._settlePromise (https://98ba-157-245-206-214.ngrok-free.app/__cypress/runner/cypress_runner.js:16736:18)
frontend-cypress_1 | at Promise._settlePromise0 (https://98ba-157-245-206-214.ngrok-free.app/__cypress/runner/cypress_runner.js:16781:10)
frontend-cypress_1 | at Promise._settlePromises (https://98ba-157-245-206-214.ngrok-free.app/__cypress/runner/cypress_runner.js:16857:18)
frontend-cypress_1 | at _drainQueueStep (https://98ba-157-245-206-214.ngrok-free.app/__cypress/runner/cypress_runner.js:13451:12)
frontend-cypress_1 | at _drainQueue (https://98ba-157-245-206-214.ngrok-free.app/__cypress/runner/cypress_runner.js:13444:9)
frontend-cypress_1 | at ../../node_modules/bluebird/js/release/async.js.Async._drainQueues (https://98ba-157-245-206-214.ngrok-free.app/__cypress/runner/cypress_runner.js:13460:5)
frontend-cypress_1 | at Async.drainQueues (https://98ba-157-245-206-214.ngrok-free.app/__cypress/runner/cypress_runner.js:13330:14)
frontend-cypress_1 | From Your Spec Code:
frontend-cypress_1 | at Context.eval (webpack:///./support/commands.js:49:0)
frontend-cypress_1 |
frontend-cypress_1 | From Node.js Internals:
frontend-cypress_1 | TimeoutError: page.waitForNavigation: Timeout 30000ms exceeded.
frontend-cypress_1 | =========================== logs ===========================
frontend-cypress_1 | waiting for navigation until "load"
frontend-cypress_1 | ============================================================
frontend-cypress_1 | page.waitForNavigation: Timeout 30000ms exceeded.
frontend-cypress_1 | =========================== logs ===========================
frontend-cypress_1 | waiting for navigation until "load"
frontend-cypress_1 | ============================================================
frontend-cypress_1 | at Object.waitAndClick (/usr/src/app/node_modules/@synthetixio/synpress/commands/playwright.js:228:16)
frontend-cypress_1 | at async importAccount (/usr/src/app/node_modules/@synthetixio/synpress/commands/metamask.js:358:5)
frontend-cypress_1 |
frontend-cypress_1 |
frontend-cypress_1 |
frontend-cypress_1 |
frontend-cypress_1 | (Results)
frontend-cypress_1 |
frontend-cypress_1 | ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
frontend-cypress_1 | │ Tests: 1 │
frontend-cypress_1 | │ Passing: 0 │
frontend-cypress_1 | │ Failing: 1 │
frontend-cypress_1 | │ Pending: 0 │
frontend-cypress_1 | │ Skipped: 0 │
frontend-cypress_1 | │ Screenshots: 2 │
frontend-cypress_1 | │ Video: true │
frontend-cypress_1 | │ Duration: 1 minute, 48 seconds │
frontend-cypress_1 | │ Spec Ran: UD-spec.js │
frontend-cypress_1 | └────────────────────────────────────────────────────────────────────────────────────────────────┘
frontend-cypress_1 |
frontend-cypress_1 |
frontend-cypress_1 | (Screenshots)
frontend-cypress_1 |
frontend-cypress_1 | - /usr/src/app/tests/e2e/screenshots/UD-spec.js/UD spec -- should connect wallet w (780x463)
frontend-cypress_1 | ith success (failed).png
frontend-cypress_1 | - /usr/src/app/tests/e2e/screenshots/UD-spec.js/UD spec -- should connect wallet w (780x463)
frontend-cypress_1 | ith success (failed) (attempt 2).png
frontend-cypress_1 |
frontend-cypress_1 |
frontend-cypress_1 | (Video)
frontend-cypress_1 |
frontend-cypress_1 | - Started compressing: Compressing to 32 CRF
frontend-cypress_1 | - Finished compressing: 10 seconds
frontend-cypress_1 | Compression progress: 100%
frontend-cypress_1 |
frontend-cypress_1 | - Video output: /usr/src/app/tests/e2e/videos/UD-spec.js.mp4
frontend-cypress_1 |
frontend-cypress_1 |
frontend-cypress_1 | ====================================================================================================
frontend-cypress_1 |
frontend-cypress_1 | (Run Finished)
frontend-cypress_1 |
frontend-cypress_1 |
frontend-cypress_1 | Spec Tests Passing Failing Pending Skipped
frontend-cypress_1 | ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
frontend-cypress_1 | │ ✖ UD-spec.js 01:48 1 - 1 - - │
frontend-cypress_1 | └────────────────────────────────────────────────────────────────────────────────────────────────┘
frontend-cypress_1 | ✖ 1 of 1 failed (100%) 01:48 1 - 1 - -
frontend-cypress_1 |
frontend-cypress_1 | Cypress run results: 1 total tests, 0 passed, 1 failed
frontend-cypress_frontend-cypress_1 exited with code 1
ubuntu@ip-172-31-32-231:~/code/frontend-cypress$ |
Can you provide a repository where I can reproduce this? |
https://github.com/jimxyz/synpress-docker-demo
https://github.com/jimxyz/synpress-docker-demo/blob/master/run-in-docker.log
https://github.com/jimxyz/synpress-docker-demo/blob/master/run-in-local-headless.log |
You're trying to run it headlessly in docker which is not supported. You'll have to remove the |
Remove the --headless flag.But the errors still exist. Here are the running logs |
I suspect that |
Hi! I Have the same problem Cypress 12.17.3 + Synpress ("@synthetixio/synpress": "^3.7.1",). When i start locally switchToMetamaskNotification method works, and test passed, but in the gitlub error:
Loccaly i start with:
Using gitlab: ' - docker compose -f docker-compose.dev.yml build synpress # Сборка контейнера synpress Can you help me please? |
@philpetrov How does you docker-compose setup look like? |
@duckception services: nginx: synpress: display: networks: in gitlab docker-compose.dev.yml with error contains: `version: "3.9" services: nginx: synpress: display: networks: |
Hey @philpetrov, You've shared your env var secrets including I have edited your post and removed them. However, please rotate your variables, otherwise someone else could use it maliciously in future. Thanks, |
any solutions - workarounds for this issue? |
🔎 Have you searched existing issues to avoid duplicates?
🧪 Have you tested your code using latest version of Synpress?
💡 Are you able to provide enough information to be able to reproduce your issue locally?
Synpress version
3.7.2-beta.4
Node.js version
v20.0.0
Operating system
Docker base on synthetixio/docker-e2e:20.0-ubuntu
Run mode
Cypress + Synpress (as plugin)
CI platform (if applicable)
No response
Are you running your tests inside docker? (if applicable)
What happened?
An error of 'Timeout 30000ms exceeded.' occurred in Docker mode But Correct in non Docker mode
What is your expected behavior?
No response
How to reproduce the bug.
The original code
https://github.com/synpress-io/synpress-examples/tree/master/synpress/with-docker
Modified code
Dockerfile
package.json
The text was updated successfully, but these errors were encountered: