cypress-io / cypress

Fast, easy and reliable testing for anything that runs in a browser.
https://cypress.io
MIT License
46.87k stars 3.17k forks source link

Screenshot of a failure is not taken in case of Warning: vkCreateInstance: Found no drivers! #29352

Open djc6996 opened 6 months ago

djc6996 commented 6 months ago

Current behavior

We are runnin in our CI (gitlab): osName --> linux osVersion --> Debian - Cypress version --> 13.6.6

I am using the cypress-multi-reporters with mochawesome to generate the report. No othe conifguration or custom screenshot are present in our project.

We are facing on a issue generating the screenshot after a test failure.

It happens that in case the follow warning is spotted menwhile a test fail and a screenshot must be taken:

Warning: vkCreateInstance: Found no drivers! Warning: vkCreateInstance failed with VK_ERROR_INCOMPATIBLE_DRIVER at CheckVkSuccessImpl (../../third_party/dawn/src/dawn/native/vulkan/VulkanError.cpp:88) at CreateVkInstance (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:458) at Initialize (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:344) at Create (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:266) at operator() (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:521)

The screenshot is not made due to a timeout..

I know that with the last version 13.7.3 this error it is only suppressed because is a benign warning, please could you take in conisderation that maybe is not only a benign warning and try to explore it.

Because the issue is related on a combination of test failure and warning raised is not so simple duplicate. But i can suggest you to create several test that fails and run them.

Should be the warning correlated to the cy.screenshot() timeout?

Desired behavior

The screenshot after a test failure must be done. Doesn't matter if the warning mentioned is a benign.

Test code to reproduce

I am 100% sure that not depends on our code. the warning message was highlighted in other issue: #29278, #29085. But they was not raised during a test failure.

Cypress Version

13.6.6

Node version

20.12.2

Operating System

linux Debian

Debug Logs

Running:  spec-file.cy.ts                                                              (3 of 4)
  describe-block
=== 2024-04-17T13:49:53.321Z start: it-block-test-fail-1
    1) it-block-test-fail-1
=== 2024-04-17T13:50:24.059Z end: it-block-test-fail-1
=== 2024-04-17T13:50:24.482Z start: it-block-test-pass-1
=== 2024-04-17T13:50:37.490Z end: it-block-test-pass-1
Warning: vkCreateInstance: Found no drivers!
Warning: vkCreateInstance failed with VK_ERROR_INCOMPATIBLE_DRIVER
    at CheckVkSuccessImpl (../../third_party/dawn/src/dawn/native/vulkan/VulkanError.cpp:88)
    at CreateVkInstance (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:458)
    at Initialize (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:344)
    at Create (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:266)
    at operator() (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:521)
    ✓ it-block-test-pass-1 (11395ms)
=== 2024-04-17T13:50:39.139Z start: it-block-test-pass-2
=== 2024-04-17T13:50:52.579Z end: it-block-test-pass-2
    ✓ it-block-test-pass-2 (13061ms)
=== 2024-04-17T13:50:53.138Z start: it-block-test-fail-2
    2) it-block-test-fail-2
=== 2024-04-17T13:51:24.130Z end: it-block-test-fail-2
  2 passing (2m)
  2 failing
  1) describe-block
       it-block-test-fail-1:
     CypressError: `cy.screenshot()` timed out waiting `10000ms` to complete.
      at https://xxxxxxxxxx/__cypress/runner/cypress_runner.js:134335:73
      at tryCatcher (https://xxxxxxxxxx/__cypress/runner/cypress_runner.js:1807:23)
      at https://xxxxxxxxxx/__cypress/runner/cypress_runner.js:4186:41
      at tryCatcher (https://xxxxxxxxxx/__cypress/runner/cypress_runner.js:1807:23)
      at Promise._settlePromiseFromHandler (https://xxxxxxxxxx/__cypress/runner/cypress_runner.js:1519:31)
      at Promise._settlePromise (https://xxxxxxxxxx/__cypress/runner/cypress_runner.js:1576:18)
      at Promise._settlePromise0 (https://xxxxxxxxxx/__cypress/runner/cypress_runner.js:1621:10)
      at Promise._settlePromises (https://xxxxxxxxxx/__cypress/runner/cypress_runner.js:1697:18)
      at _drainQueueStep (https://xxxxxxxxxx/__cypress/runner/cypress_runner.js:2407:12)
      at _drainQueue (https://xxxxxxxxxx/__cypress/runner/cypress_runner.js:2400:9)
      at Async._drainQueues (https://xxxxxxxxxx/__cypress/runner/cypress_runner.js:2416:5)
      at Async.drainQueues (https://xxxxxxxxxx/__cypress/runner/cypress_runner.js:2286:14)
  2) describe-block
       it-block-test-fail-2:
     CypressError: `cy.screenshot()` timed out waiting `10000ms` to complete.
      at https://xxxxxxxxxx/__cypress/runner/cypress_runner.js:134335:73
      at tryCatcher (https://xxxxxxxxxx/__cypress/runner/cypress_runner.js:1807:23)
      at https://xxxxxxxxxx/__cypress/runner/cypress_runner.js:4186:41
      at tryCatcher (https://xxxxxxxxxx/__cypress/runner/cypress_runner.js:1807:23)
      at Promise._settlePromiseFromHandler (https://xxxxxxxxxx/__cypress/runner/cypress_runner.js:1519:31)
      at Promise._settlePromise (https://xxxxxxxxxx/__cypress/runner/cypress_runner.js:1576:18)
      at Promise._settlePromise0 (https://xxxxxxxxxx/__cypress/runner/cypress_runner.js:1621:10)
      at Promise._settlePromises (https://xxxxxxxxxx/__cypress/runner/cypress_runner.js:1697:18)
      at _drainQueueStep (https://xxxxxxxxxx/__cypress/runner/cypress_runner.js:2407:12)
      at _drainQueue (https://xxxxxxxxxx/__cypress/runner/cypress_runner.js:2400:9)
      at Async._drainQueues (https://xxxxxxxxxx/__cypress/runner/cypress_runner.js:2416:5)
      at Async.drainQueues (https://xxxxxxxxxx/__cypress/runner/cypress_runner.js:2286:14)

Other

Chrome 123

Only the screenshot of the first test failed appear in the related directory.

jennifer-shehane commented 6 months ago

@djc6996 Can you try updating to the latest version of Cypress? The screenshot timeout and the Vulkan error should both be fixed in our latest version.

djc6996 commented 6 months ago

@jennifer-shehane we will try to update with the latest version. Someone else will reply on this issue. Thank you

cypress-app-bot commented 4 days ago

This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided.