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

Issue with "Timed out waiting for the browser" #25771

Closed
edikdeisling opened this issue Feb 10, 2023 · 4 comments
Closed

Issue with "Timed out waiting for the browser" #25771

edikdeisling opened this issue Feb 10, 2023 · 4 comments
Assignees
Labels
CI General issues involving running in a CI provider

Comments

@edikdeisling
Copy link
Contributor

Current behavior

This bug happens only with Timed out waiting for the browser to connect. Retrying.... Here is the part of the log

====================================================================================================
  (Run Starting)
  ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
  │ Cypress:        12.4.1                                                                         │
  │ Browser:        Chrome [105](https://gitlab.solora.dev/solora/solora/-/jobs/181053#L105) (headless)                                                          │
  │ Node Version:   v16.16.0 (/usr/local/bin/node)                                                 │
  │ Specs:          64 found (components/_tests_/baseLoad.spec.ts, services/_tests_/filter.spec.ts │
  │                 , services/_tests_/formatNumber.spec.ts, services/_tests_/order.spec.ts, servi │
  │                 ces/_tests_/path.spec.ts, components/BaseEnvironmentForm/_tests_/baseEnvironme │
  │                 ntTemplatesTable.spec.t...)                                                    │
  │ Searched:       src/**/*.spec.ts                                                               │
  │ Experiments:    experimentalSingleTabRunMode=true                                              │
  └────────────────────────────────────────────────────────────────────────────────────────────────┘
────────────────────────────────────────────────────────────────────────────────────────────────────
                                                                                                    
  Running:  components/_tests_/baseLoad.spec.ts                                            (1 of 64)
Timed out waiting for the browser to connect. Retrying...
Still waiting to connect to Chrome, retrying in 1 second (attempt 18/62)
Still waiting to connect to Chrome, retrying in 1 second (attempt 19/62)
  BaseLoad
    ✓ Can see load states (479ms)
    ✓ Can call wrap load multiple times (145ms)
  2 passing (2s)
  (Results)
  ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
  │ Tests:        2                                                                                │
  │ Passing:      2                                                                                │
  │ Failing:      0                                                                                │
  │ Pending:      0                                                                                │
  │ Skipped:      0                                                                                │
  │ Screenshots:  0                                                                                │
  │ Video:        false                                                                            │
  │ Duration:     1 second                                                                         │
  │ Spec Ran:     components/_tests_/baseLoad.spec.ts                                              │
  └────────────────────────────────────────────────────────────────────────────────────────────────┘
────────────────────────────────────────────────────────────────────────────────────────────────────
                                                                                                    
  Running:  services/_tests_/filter.spec.ts                                                (2 of 64)
  Filter
    
      Filter
        ✓ Should set filter data from url (133ms)
        ✓ Should set filter data from url (215ms)
        ✓ Should update filter (157ms)
        ✓ Should clear filters (121ms)
        ✓ Should update filter (282ms)
        ✓ Should remove filter (144ms)
        ✓ Should clear filters (228ms)
        ✓ Should remove filter (128ms)
        ✓ Should set filter (177ms)
  9 passing (1s)
  (Results)
  ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
  │ Tests:        5                                                                                │
  │ Passing:      5                                                                                │
  │ Failing:      0                                                                                │
  │ Pending:      0                                                                                │
  │ Skipped:      0                                                                                │
  │ Screenshots:  0                                                                                │
  │ Video:        false                                                                            │
  │ Duration:     1 second                                                                         │
  │ Spec Ran:     services/_tests_/filter.spec.ts                                                  │
  └────────────────────────────────────────────────────────────────────────────────────────────────┘
────────────────────────────────────────────────────────────────────────────────────────────────────
                                                                                                    
  Running:  services/_tests_/formatNumber.spec.ts                                          (3 of 64)
  (Results)
  ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
  │ Tests:        5                                                                                │
  │ Passing:      5                                                                                │
  │ Failing:      0                                                                                │
  │ Pending:      0                                                                                │
  │ Skipped:      0                                                                                │
  │ Screenshots:  0                                                                                │
  │ Video:        false                                                                            │
  │ Duration:     1 second                                                                         │
  │ Spec Ran:     services/_tests_/formatNumber.spec.ts                                            │
  └────────────────────────────────────────────────────────────────────────────────────────────────┘
────────────────────────────────────────────────────────────────────────────────────────────────────
                                                                                                    
  Running:  services/_tests_/order.spec.ts                                                 (4 of 64)
  Order
    Order
      ✓ Should set order data from url (144ms)
      ✓ Should set order data from url (165ms)
      ✓ Should set order (81ms)
      ✓ Should set order (113ms)
      ✓ Should update order ([111](https://gitlab.solora.dev/solora/solora/-/jobs/181053#L111)ms)
  5 passing (707ms)
  (Results)
  ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
  │ Tests:        3                                                                                │
  │ Passing:      3                                                                                │
  │ Failing:      0                                                                                │
  │ Pending:      0                                                                                │
  │ Skipped:      0                                                                                │
  │ Screenshots:  0                                                                                │
  │ Video:        false                                                                            │
  │ Duration:     0 seconds                                                                        │
  │ Spec Ran:     services/_tests_/order.spec.ts                                                   │
  └────────────────────────────────────────────────────────────────────────────────────────────────┘
────────────────────────────────────────────────────────────────────────────────────────────────────
                                                                                                    
  Running:  services/_tests_/path.spec.ts                                                  (5 of 64)
  (Results)
  ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
  │ Tests:        3                                                                                │
  │ Passing:      3                                                                                │
  │ Failing:      0                                                                                │
  │ Pending:      0                                                                                │
  │ Skipped:      0                                                                                │
  │ Screenshots:  0                                                                                │
  │ Video:        false                                                                            │
  │ Duration:     0 seconds                                                                        │
  │ Spec Ran:     services/_tests_/path.spec.ts                                                    │
  └────────────────────────────────────────────────────────────────────────────────────────────────┘
────────────────────────────────────────────────────────────────────────────────────────────────────

Notice Filter and Order groups above. I don't have any contexts inside describe. Also some it test run twice.
Here is the structure of the spec file

describe('Order', () => {
  it('Should set order data from url', () => {
    ...
  });

  it('Should set order', () => {
    ...
  });

  it('Should update order', () => {
    ....
  });
});

It seems that Cypress literally run the spec file twice.
At some moment something blows. Here is the most frequent error

  Running:  modules/workflow/components/WorkflowNodeFormEnvironment/_tests_/work          (63 of 64)
            flowNodeFormEnvironmentUpdate.spec.ts                                                   
  WorkflowNodeFormEnvironmentUpdate
11:30:53 AM [vite] Internal server error: Cannot read properties of null (reading 'split')
      at required (file:///builds/solora/solora/frontend/node_modules/.pnpm/vite@3.1.8/node_modules/vite/dist/node/chunks/dep-4da11a5e.js:58421:23)
      at Object.common.setupOutgoing (file:///builds/solora/solora/frontend/node_modules/.pnpm/vite@3.1.8/node_modules/vite/dist/node/chunks/dep-4da11a5e.js:58549:8)
      at Array.stream (file:///builds/solora/solora/frontend/node_modules/.pnpm/vite@3.1.8/node_modules/vite/dist/node/chunks/dep-4da11a5e.js:59584:16)
      at ProxyServer.<anonymous> (file:///builds/solora/solora/frontend/node_modules/.pnpm/vite@3.1.8/node_modules/vite/dist/node/chunks/dep-4da11a5e.js:59897:22)
      at viteProxyMiddleware (file:///builds/solora/solora/frontend/node_modules/.pnpm/vite@3.1.8/node_modules/vite/dist/node/chunks/dep-4da11a5e.js:60179:23)
      at call (file:///builds/solora/solora/frontend/node_modules/.pnpm/vite@3.1.8/node_modules/vite/dist/node/chunks/dep-4da11a5e.js:48422:7)
      at next (file:///builds/solora/solora/frontend/node_modules/.pnpm/vite@3.1.8/node_modules/vite/dist/node/chunks/dep-4da11a5e.js:48366:5)
      at cors (file:///builds/solora/solora/frontend/node_modules/.pnpm/vite@3.1.8/node_modules/vite/dist/node/chunks/dep-4da11a5e.js:48890:7)
      at file:///builds/solora/solora/frontend/node_modules/.pnpm/vite@3.1.8/node_modules/vite/dist/node/chunks/dep-4da11a5e.js:48926:17
      at originCallback (file:///builds/solora/solora/frontend/node_modules/.pnpm/vite@3.1.8/node_modules/vite/dist/node/chunks/dep-4da11a5e.js:48916:15)
      at file:///builds/solora/solora/frontend/node_modules/.pnpm/vite@3.1.8/node_modules/vite/dist/node/chunks/dep-4da11a5e.js:48921:13
      at optionsCallback (file:///builds/solora/solora/frontend/node_modules/.pnpm/vite@3.1.8/node_modules/vite/dist/node/chunks/dep-4da11a5e.js:48901:9)
      at corsMiddleware (file:///builds/solora/solora/frontend/node_modules/.pnpm/vite@3.1.8/node_modules/vite/dist/node/chunks/dep-4da11a5e.js:48906:7)
      at call (file:///builds/solora/solora/frontend/node_modules/.pnpm/vite@3.1.8/node_modules/vite/dist/node/chunks/dep-4da11a5e.js:48422:7)
      at next (file:///builds/solora/solora/frontend/node_modules/.pnpm/vite@3.1.8/node_modules/vite/dist/node/chunks/dep-4da11a5e.js:48366:5)
      at /builds/solora/solora/frontend/node_modules/.pnpm/vite-plugin-istanbul@3.0.4/node_modules/vite-plugin-istanbul/dist/index.cjs:93:18
      at call (file:///builds/solora/solora/frontend/node_modules/.pnpm/vite@3.1.8/node_modules/vite/dist/node/chunks/dep-4da11a5e.js:48422:7)
      at next (file:///builds/solora/solora/frontend/node_modules/.pnpm/vite@3.1.8/node_modules/vite/dist/node/chunks/dep-4da11a5e.js:48366:5)
      at next (file:///builds/solora/solora/frontend/node_modules/.pnpm/vite@3.1.8/node_modules/vite/dist/node/chunks/dep-4da11a5e.js:48344:14)
      at Function.handle (file:///builds/solora/solora/frontend/node_modules/.pnpm/vite@3.1.8/node_modules/vite/dist/node/chunks/dep-4da11a5e.js:48369:3)
      at Server.app (file:///builds/solora/solora/frontend/node_modules/.pnpm/vite@3.1.8/node_modules/vite/dist/node/chunks/dep-4da11a5e.js:48234:37)
      at Server.emit (node:events:527:28)
      at Server.emit (node:domain:475:12)
      at parserOnIncoming (node:_http_server:956:12)
      at HTTPParser.parserOnHeadersComplete (node:_http_common:128:17)
  WorkflowNodeFormEnvironmentUpdate
    1) Can see error parts
    2) "before each" hook for "Can see error parts"

Also, there was an issue with exactly the same behavior #24659.
But seems that it was closed for the wrong resolve. In my case, I use Chrome and not Electron.

Desired behavior

Even if there was a timeout with connecting to the browser cypress should work correctly when the connection to the browser is restored.

Test code to reproduce

I'm so sorry for this issue without reproducing. This bug isn't reproduced on my local machine. Seems that there should be some issues with the connection to the browser of similar. I have an issue only with my GitLab CI.

Cypress Version

12.5.1

Node version

16.16.0

Operating System

Inside docker cypress/browsers:node16.16.0-chrome105-ff99-edge

Debug Logs

No response

Other

No response

@nagash77 nagash77 added CI: gitlab CI General issues involving running in a CI provider labels Feb 10, 2023
@mschile
Copy link
Contributor

mschile commented Feb 12, 2023

Hi @edikdeisling 👋, thanks for logging this issue. I believe it's related to #24377 which is also caused by two browsers erroneously starting. We plan on working on this very soon but in the meantime you can try increasing the value of CYPRESS_INTERNAL_BROWSER_CONNECT_TIMEOUT to see if that helps.

@edikdeisling
Copy link
Contributor Author

@mschile thank you so much for the workaround! I'll try

@mschile mschile removed their assignment Feb 13, 2023
@chrisbreiding chrisbreiding self-assigned this Feb 17, 2023
@chrisbreiding
Copy link
Contributor

It's hard to say without a reliable way to reproduce this, but there's a chance this is fixed by #25898. It will be out with the next release, but if you'd like to check it out ahead of time, I'd recommend installing the prerelease build for the latest commit on the develop branch.

@mschile
Copy link
Contributor

mschile commented Feb 28, 2023

@edikdeisling, I'm going to close this as resolved with #25898 which was released with Cypress 12.7.0. If you still have this issue after upgrading, please comment back and we can reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI General issues involving running in a CI provider
Projects
None yet
Development

No branches or pull requests

5 participants