cypress-io / cypress

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

ERROR:object_proxy.cc(590) Failed to call method: org.freedesktop.portal.Settings.Read #28061

Closed MikeMcC399 closed 8 months ago

MikeMcC399 commented 1 year ago

Current behavior

When Cypress is run in a CI environment where there is no physical GPU available, an error message similar to the following is output:

[266:1014/183729.600834:ERROR:object_proxy.cc(590)] Failed to call method: org.freedesktop.portal.Settings.Read: object_path= /org/freedesktop/portal/desktop: unknown error type:

This is new in Cypress 13.3.1 and is a regression from Cypress 13.3.0.

It affects for instance:

The error message occurs in CI where it uses Xvfb (X virtual framebuffer) when there is no other X11 server available due to missing hardware graphic.

Desired behavior

The only message output when starting Cypress in CI should be similar to the following:

DevTools listening on ws://127.0.0.1:35223/devtools/browser/18023e84-028d-4b1e-a9d3-afb174f8232f

There should be no message with the following text output:

ERROR:object_proxy.cc

Test code to reproduce

Workflows from Cypress repos show the issue since the update to Cypress 13.3.1:

  1. https://github.com/cypress-io/github-action/actions/workflows/example-cron.yml
  2. https://github.com/cypress-io/cypress-example-kitchensink/blob/master/.github/workflows/single.yml
  3. https://github.com/cypress-io/cypress-docker-images/blob/master/circle.yml for example "test-image-medium-factory-test-factory-cypress-included-electron" on https://app.circleci.com/pipelines/github/cypress-io/cypress-docker-images

Cypress Version

First reported on version: 13.3.1 Reproducible also on version: 13.6.4

Node version

20.8.0 / 20.6.1

Operating System

Ubuntu 22.04

Debug Logs

Workflow Cypress 13.3.0 Cypress 13.3.1
GitHub Actions Job 17616845243 Job 17685117337
CircleCI Job 48307 Job 48982

Other

Error history

csvan commented 1 year ago

Confirming this on Cypress 13.4.0 running in CI mode on an Amazon Linux 2023 Docker image (Nodejs 18). Same code works fine on OSX (M1 Pro).

DmytroKhomychPrintify commented 1 year ago

Having same for Cypress 13.3.1 in CI, but no errors on OSX

MikeMcC399 commented 1 year ago

@csvan / @DmytroKhomychPrintify

I only see this error message in CI and this is where Cypress uses Xvfb (X virtual framebuffer) in place of a physical graphic hardware adapter.

MikeMcC399 commented 1 year ago

If it can be determined that the error message in this issue is harmless:

[266:1014/183729.600834:ERROR:object_proxy.cc(590)] Failed to call method: org.freedesktop.portal.Settings.Read: object_path= /org/freedesktop/portal/desktop: unknown error type:

perhaps it could be added to the list of "garbage warnings" in

https://github.com/cypress-io/cypress/blob/develop/cli/lib/exec/spawn.js

and which are filtered out by that module?

pythonquick commented 1 year ago

Seeing the same error when running Cypress 13.4.0 in CI

jerrychong25 commented 1 year ago

Having same error when running Cypress 12.17.4 in Jenkins:

Opening Cypress... [493:1115/040124.736155:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 646: Permission denied (13) [493:1115/040124.746972:ERROR:object_proxy.cc(590)] Failed to call method: org.freedesktop.portal.Settings.Read: object_path= /org/freedesktop/portal/desktop: unknown error type:

AlexanderTunick commented 12 months ago

Confirming the same error after upgrading to Cypress v13.5.1. Docker in Jenkins CI on Ubuntu 16.04

ci
NODE_PATH=./cypress cypress run --env cfg=dev --record --group Adm --browser chrome --spec cypress/e2e/adm/**

[1356:1120/040141.013878:ERROR:object_proxy.cc(590)] Failed to call method: org.freedesktop.portal.Settings.Read: object_path= /org/freedesktop/portal/desktop: unknown error type: 

DevTools listening on ws://127.0.0.1:43273/devtools/browser/5d984b5a-2049-4d52-93b4-95d4dc152e26
jerrychong25 commented 12 months ago

Anyone found the solution?

Priyanka21manohar commented 12 months ago

Anyone found the solution?

Try running the build with ubuntu-latest name: Cypress Regression runs-on: ubuntu-latest

GarethCake commented 12 months ago

Anyone found the solution?

Try running the build with ubuntu-latest name: Cypress Regression runs-on: ubuntu-latest

Am currently running on ubuntu-latest and still having this problem :(

akshaygupta5233 commented 12 months ago

Kindly get this issue fixed. I am so badly stuck

csvan commented 12 months ago

Can people with this issue confirm it actually BREAKS something? I am getting it but the tests are still passing as usual.

Priyanka21manohar commented 12 months ago

Anyone found the solution?

Try running the build with ubuntu-latest name: Cypress Regression runs-on: ubuntu-latest

Am currently running on ubuntu-latest and still having this problem :(

Are you stuck with that error or it proceed with the Cypress test along with this error? I didn't face the issue after updating all the runs-on: ubuntu-latest in the YAML file.

GarethCake commented 12 months ago

Anyone found the solution?

Try running the build with ubuntu-latest name: Cypress Regression runs-on: ubuntu-latest

Am currently running on ubuntu-latest and still having this problem :(

Are you stuck with that error or it proceed with the Cypress test along with this error? I didn't face the issue after updating all the runs-on: ubuntu-latest in the YAML file.

I think you're onto something as I reverted to 13.0 and still got the hanging issues. My problem is at least 1 test will hang on a white screen or a page that says "default blank page" in the test replay (seems to always be a failing test). I've read elsewhere it's a problem with retries so will maybe try turning retries off for now.

MikeMcC399 commented 12 months ago

Going by previous similar messages, the message

ERROR:object_proxy.cc(590) Failed to call method: org.freedesktop.portal.Settings.Read

is probably not causing test failures, HOWEVER if your test is failing, then this may be the last message you see, so it looks as though it IS the cause.

If you are seeing issues, then you should be following the Troubleshooting steps in the documentation.

cimak commented 11 months ago

I was getting this exact error when running cypress under WSL2/win11. Installing XServer on windows worked for me, I'm not sure if it is a final solution but I'm leaving this here, maybe someone will find it helpful.

MikeMcC399 commented 11 months ago

@cimak

I was getting this exact error when running cypress under WSL2/win11. Installing XServer on windows worked for me, I'm not sure if it is a final solution but I'm leaving this here, maybe someone will find it helpful.

You didn't say which of the Stack Overflow solutions you used. WSLg would be the preferred one.

  1. Windows Subsystem for Linux GUI (WSLg) provides a GUI environment for WSL2 out-of-the-box.

    Installation information for WSLg is available on

    Existing WSL installations can be updated to use WSLg. New WSL installations automatically use WSLg. See https://github.com/cypress-io/cypress-documentation/issues/5353).

  2. Note that according to https://github.com/cypress-io/cypress/issues/27858#issuecomment-1729598898 Cypress does not currently support WSL2. See also https://github.com/cypress-io/cypress-documentation/issues/5489.

ivy-tian commented 11 months ago

Is there a solution to this issue? I'm currently stuck here. The Cypress task runs fine locally, but it encounters this error and fails on the CI.

We are running e2e tests on a self-hosted VM. Is there a way to avoid the issue "when it uses Xvfb (X virtual framebuffer) because there is no other X11 server available due to missing hardware graphics"

RamyTalal commented 11 months ago

I'm also having this issue on Bitbucket.

[1541:1127/150440.272221:ERROR:zygote_host_impl_linux.cc(273)] Failed to adjust OOM score of renderer with pid 1695: Permission denied (13)

[1541:1127/150440.286074:ERROR:object_proxy.cc(590)] Failed to call method: org.freedesktop.portal.Settings.Read: object_path= /org/freedesktop/portal/desktop: unknown error type: 
danielkoch commented 11 months ago

Same issue on GitLab pipeline.

jennifer-shehane commented 11 months ago

I would agree with @MikeMcC399 that this is likely not the cause of anyones hanging/failures, but the last message you see in the terminal before it fails in some people's cases.

We'd need to do a git bisect to narrow down when this was introduced in 13.3.1. That would help since nothing obvious comes out as the problem looking at the changes.

(This is happening in Firefox and Chrome, so not related to our Chrome manifest v3 upgrade)

MikeMcC399 commented 11 months ago

(This is happening in Firefox and Chrome, so not related to our Chrome manifest v3 upgrade)

It is also reproducible testing against Electron, see

https://github.com/cypress-io/github-action/actions/runs/7000454887/job/19041127272

DevTools listening on ws://127.0.0.1:44767/devtools/browser/65199945-2077-4288-8d52-191948370bd7
[1934:1127/040432.303024:ERROR:object_proxy.cc(590)] Failed to call method: org.freedesktop.portal.Settings.Read: object_path= /org/freedesktop/portal/desktop: unknown error type: 

====================================================================================================

  (Run Starting)

  ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
  │ Cypress:        13.6.0                                                                         │
  │ Browser:        Electron 114 (headless)                                                        │
  │ Node Version:   v20.8.1 (/home/runner/runners/2.311.0/externals/node20/bin/node)               │
  │ Specs:          1 found (spec.cy.js)                                                           │
  │ Searched:       cypress/e2e/**/*.cy.{js,jsx,ts,tsx}                                            │
  └────────────────────────────────────────────────────────────────────────────────────────────────┘
sbednarzlf commented 11 months ago

Hi, I have the same problem with Cypress 13.6 on Node v21.2.0. Tests run in the Azure DevOps pipeline.

npx cypress run --browser chrome
DevTools listening on ws://127.0.0.1:33525/devtools/browser/b25c722e-2087-4f49-b712-48cfb3fcdd2f
[1850380:1129/142614.557483:ERROR:object_proxy.cc(590)] Failed to call method: org.freedesktop.portal.Settings.Read: object_path= /org/freedesktop/portal/desktop: unknown error type: 
gunslingor commented 11 months ago

Same Problem... latest version

gunslingor commented 11 months ago

I can confirm, this error breaks google cloudbuild when it is initiated via a google cloud bitbucket trigger, however it does not seem to break it when I initiate the build locally.

Here is the difference:

LOCAL CMD: gcloud builds submit --region=us-west2 --config cloudbuild.yaml image

REMOTE TRIGGERED: image

konrad-szczepaniak-esky commented 11 months ago

It also occurs on Github Actions with node 18 and Cypress 13.5.1, 13.6.0

4nderss commented 11 months ago

Breaks our azure pipelines builds which run tests inside Docker.

[233:1201/144811.571742:ERROR:object_proxy.cc(590)] Failed to call method: org.freedesktop.portal.Settings.Read: object_path= /org/freedesktop/portal/desktop: unknown error type: 

DevTools listening on ws://127.0.0.1:35031/devtools/browser/9c4a8df9-1afc-4bc7-89b0-acb838db4e32

    at ChildProcess.exithandler (node:child_process:419:12)
    at ChildProcess.emit (node:events:513:28)
    at ChildProcess.emit (node:domain:489:12)
    at maybeClose (node:internal/child_process:1091:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5) {
  code: 1,
  killed: false,
  signal: null,
  cmd: 'docker run -e CYPRESS_SPEC="xx.cy.ts" -v /home/vsts/work/1/s/cypress:/e2e/cypress cypress-base:1.0.0 cypress:run:spec'
}

Can't upgrade past 13.2 or this blocks our build.

MikeMcC399 commented 11 months ago

@4nderss

You may be experiencing a different issue, since this one has been observed to start with Cypress 13.3.1, whereas 13.3.0 did not show the issue.

4nderss commented 11 months ago

@4nderss

You may be experiencing a different issue, since this one has been observed to start with Cypress 13.3.1, whereas 13.3.0 did not show the issue.

My mistake here. Actually 13.3 works aswell just rolled back to 13.2 since that version was working bofore we updated.

andressakatia commented 11 months ago

Same Problem - 13.6.1

Downgraded to 13.5.1 resolved for now

lhridley commented 11 months ago

Same problem with:

DDEV docker stack Cypress version 13.5.0 Bundled Node version 18.15..0

Verified that issue is not present on Cypress version 13.3.0

ojemuyiwa commented 11 months ago

Can people with this issue confirm it actually BREAKS something? I am getting it but the tests are still passing as usual.

It definitely breaks everything.

ojemuyiwa commented 11 months ago

Maybe a fix in cypress/browsers:node-18.16.0-chrome-114.0.5735.133-1-ff-114.0.2-edge-114.0.1823.51-1 cypress recommended CI/CD images? cypress 13.6.1 works locally on mac book pro but almost every image I've tried has this error and fails everything thereafter i.e. coverage tasks, runners, tests etc.

jerrychong25 commented 11 months ago

Maybe a fix in cypress/browsers:node-18.16.0-chrome-114.0.5735.133-1-ff-114.0.2-edge-114.0.1823.51-1 cypress recommended CI/CD images? cypress 13.6.1 works locally on mac book pro but almost every image I've tried has this error and fails everything thereafter i.e. coverage tasks, runners, tests etc.

Yes, same here.

Working locally, but not working in CI/CD too.

MikeMcC399 commented 11 months ago

@ojemuyiwa / @jerrychong25

Have you run Cypress with debug enabled in CI/CD? For instance in GitHub Actions you would set the environment variable DEBUG with:

  env:
    DEBUG: 'cypress:*'
ojemuyiwa commented 11 months ago

@ojemuyiwa / @jerrychong25

Have you run Cypress with debug enabled in CI/CD? For instance in GitHub Actions you would set the environment variable DEBUG with:

  env:
    DEBUG: 'cypress:*'

Did that last night and you were absolutely right the first time the error is in "@cypress/code-coverage": "^3.12.14" I downgraded to "@cypress/code-coverage": "3.12.5" and errors all gone. I believe ther error is internal maybe in istanbul-lib-coverage

rajishanmugi commented 10 months ago

I am trying to run cypress tests. It is all running fine in my local. But in github actions execution, the web page is not loading. I tried adding below.

  1. chromewebsecurity as false
  2. testIsolation false
  3. retries with 2
  4. changed my cypress version to be 13.3.0
  5. My node version is v20.10.0
  6. System Platform: linux (Debian - 11.5)

[Am getting a blank page on cy.visit(baseUrl) ]

MikeMcC399 commented 10 months ago

@rajishanmugi

The problem you are describing is not the one in this issue.

jennifer-shehane commented 10 months ago

Looking at the examples provided and the error messages provided - this message is not causing runs to fail. There is some other cause that the run is failing, where this happens to be the error message before it. Even some of the stack traces provided here prove that the error is coming from another source. Please read your terminal errors carefully and run the run in debug mode mode to print the set of logs to see where the failure is.

What we will likely end up doing is parsing out this message and suppressing it from the Terminal output (as we have done before) in order to correctly direct users to the true reason their builds are failing/hanging. The long term fix will take time to update Electron.

We're open to PRs to suppress the message.

ojemuyiwa commented 10 months ago

"@cypress/code-coverage" is the underlying issue

MikeMcC399 commented 10 months ago

@ojemuyiwa

"@cypress/code-coverage" is the underlying issue

That may be true for you, however it is not necessarily the case for other users, including myself. I am not using @cypress/code-coverage.

noshiro-pf commented 10 months ago

Seeing the same error when running Cypress 13.6.2 on Github Actions and on WSL (cypress open, cypress run).

DevTools listening on ws://127.0.0.1:36551/devtools/browser/db3972a0-fbb9-4e6a-9fe0-4692cf1abf05
[8956:0115/181526.210849:ERROR:object_proxy.cc(590)] Failed to call method: org.freedesktop.portal.Settings.Read: object_path= /org/freedesktop/portal/desktop: unknown error type:

node:internal/process/esm_loader:34
      internalBinding('errors').triggerUncaughtException(
                                ^
TypeError [Error]: value.replace is not a function
    at normalizeSlashes (/home/xxx/.cache/Cypress/13.6.2/Cypress/resources/app/node_modules/ts-node/dist/util.js:62:18)
    at Object.getExtendsConfigPath (/home/xxx/.cache/Cypress/13.6.2/Cypress/resources/app/node_modules/ts-node/dist/ts-internals.js:24:54)
    at readConfig (/home/xxx/.cache/Cypress/13.6.2/Cypress/resources/app/node_modules/ts-node/dist/configuration.js:127:64)
    at findAndReadConfig (/home/xxx/.cache/Cypress/13.6.2/Cypress/resources/app/node_modules/ts-node/dist/configuration.js:50:84)
    at create (/home/xxx/.cache/Cypress/13.6.2/Cypress/resources/app/node_modules/ts-node/dist/index.js:146:69)
    at register (/home/xxx/.cache/Cypress/13.6.2/Cypress/resources/app/node_modules/ts-node/dist/index.js:127:19)
    at Object.registerAndCreateEsmHooks (/home/xxx/.cache/Cypress/13.6.2/Cypress/resources/app/node_modules/ts-node/dist/esm.js:25:49)
    at file:///home/xxx/.cache/Cypress/13.6.2/Cypress/resources/app/node_modules/ts-node/esm/transpile-only.mjs:8:7
    at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)

Node.js v20.11.0
MikeMcC399 commented 10 months ago

@noshiro-pf

It's very likely that the message

[8956:0115/181526.210849:ERROR:object_proxy.cc(590)] Failed to call method: org.freedesktop.portal.Settings.Read: object_path= /org/freedesktop/portal/desktop: unknown error type:

is not related to the following error:

node:internal/process/esm_loader:34
      internalBinding('errors').triggerUncaughtException(
                                ^
TypeError [Error]: value.replace is not a function
    at normalizeSlashes (/home/xxx/.cache/Cypress/13.6.2/Cypress/resources/app/node_modules/ts-node/dist/util.js:62:18)
    at Object.getExtendsConfigPath (/home/xxx/.cache/Cypress/13.6.2/Cypress/resources/app/node_modules/ts-node/dist/ts-internals.js:24:54)
    at readConfig (/home/xxx/.cache/Cypress/13.6.2/Cypress/resources/app/node_modules/ts-node/dist/configuration.js:127:64)
    at findAndReadConfig (/home/xxx/.cache/Cypress/13.6.2/Cypress/resources/app/node_modules/ts-node/dist/configuration.js:50:84)
    at create (/home/xxx/.cache/Cypress/13.6.2/Cypress/resources/app/node_modules/ts-node/dist/index.js:146:69)
    at register (/home/xxx/.cache/Cypress/13.6.2/Cypress/resources/app/node_modules/ts-node/dist/index.js:127:19)
    at Object.registerAndCreateEsmHooks (/home/xxx/.cache/Cypress/13.6.2/Cypress/resources/app/node_modules/ts-node/dist/esm.js:25:49)
    at file:///home/xxx/.cache/Cypress/13.6.2/Cypress/resources/app/node_modules/ts-node/esm/transpile-only.mjs:8:7
    at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
ojemuyiwa commented 10 months ago

@noshiro-pf

It's very likely that the message

[8956:0115/181526.210849:ERROR:object_proxy.cc(590)] Failed to call method: org.freedesktop.portal.Settings.Read: object_path= /org/freedesktop/portal/desktop: unknown error type:

is not related to the following error:

node:internal/process/esm_loader:34
      internalBinding('errors').triggerUncaughtException(
                                ^
TypeError [Error]: value.replace is not a function
    at normalizeSlashes (/home/xxx/.cache/Cypress/13.6.2/Cypress/resources/app/node_modules/ts-node/dist/util.js:62:18)
    at Object.getExtendsConfigPath (/home/xxx/.cache/Cypress/13.6.2/Cypress/resources/app/node_modules/ts-node/dist/ts-internals.js:24:54)
    at readConfig (/home/xxx/.cache/Cypress/13.6.2/Cypress/resources/app/node_modules/ts-node/dist/configuration.js:127:64)
    at findAndReadConfig (/home/xxx/.cache/Cypress/13.6.2/Cypress/resources/app/node_modules/ts-node/dist/configuration.js:50:84)
    at create (/home/xxx/.cache/Cypress/13.6.2/Cypress/resources/app/node_modules/ts-node/dist/index.js:146:69)
    at register (/home/xxx/.cache/Cypress/13.6.2/Cypress/resources/app/node_modules/ts-node/dist/index.js:127:19)
    at Object.registerAndCreateEsmHooks (/home/xxx/.cache/Cypress/13.6.2/Cypress/resources/app/node_modules/ts-node/dist/esm.js:25:49)
    at file:///home/xxx/.cache/Cypress/13.6.2/Cypress/resources/app/node_modules/ts-node/esm/transpile-only.mjs:8:7
    at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)

Yeah seems like esm module loader error. value.replace seems like a string replace is trying to take place internally and failing.

noshiro-pf commented 10 months ago

@MikeMcC399 @ojemuyiwa Thank you for your advice! Sorry, my problem was that I was using an array in the tsconfig.json that cypress reads.

Related issue: https://github.com/cypress-io/cypress/issues/27466

StruckCroissant commented 9 months ago

I'm currently getting this error on Cypress 13.6.3. I also have @Cypress/code-coverage version 3.12.19. Running locally is fine, but when running the CI it throws the error and appears to prevent coverage from being generated.

> vite preview
  ➜  Local:   http://localhost:4173/
  ➜  Network: use --host to expose
DevTools listening on ws://127.0.0.1:46263/devtools/browser/b88c3106-a5c2-4937-b0c4-1a0cf9d52cc6
[2058:0128/024517.177506:ERROR:object_proxy.cc(590)] Failed to call method: org.freedesktop.portal.Settings.Read: object_path= /org/freedesktop/portal/desktop: unknown error type: 
MikeMcC399 commented 9 months ago

@StruckCroissant

I'm currently getting this error on Cypress 13.6.3. I also have @Cypress/code-coverage version 3.12.19. Running locally is fine, but when running the CI it throws the error and appears to prevent coverage from being generated.

DevTools listening on ws://127.0.0.1:46263/devtools/browser/b88c3106-a5c2-4937-b0c4-1a0cf9d52cc6 [2058:0128/024517.177506:ERROR:object_proxy.cc(590)] Failed to call method: org.freedesktop.portal.Settings.Read: object_path= /org/freedesktop/portal/desktop: unknown error type:

It's very unlikely that your problem with @cypress/code-coverage is stopping this from working. All the CircleCI workflows on https://app.circleci.com/pipelines/github/cypress-io/code-coverage?branch=master for @cypress/code-coverage succeed even though they also show the message ERROR:object_proxy.cc.

StruckCroissant commented 9 months ago

@MikeMcC399 It's very unlikely that your problem with @cypress/code-coverage is stopping this from working. All the CircleCI workflows on https://app.circleci.com/pipelines/github/cypress-io/code-coverage?branch=master for @cypress/code-coverage succeed even though they also show the message ERROR:object_proxy.cc.

You are correct. After looking into this further this issue was caused because coverage was attempting to run against a production build, while my NYC config was not set to instrument in a prod environment. Thanks for the response though 👍

CT4nk3r commented 9 months ago

Still seems to be an issue on 13.6.4, azure vm with ubuntu-latest. Still not something that breaks, but looks really out of place when you are just trying to figure out what the issue is with something.

MikeMcC399 commented 9 months ago

@CT4nk3r

Still seems to be an issue on 13.6.4, azure vm with ubuntu-latest. Still not something that breaks, but looks really out of place when you are just trying to figure out what the issue is with something.

Thanks for your cross-check! I had already updated the original post to include Cypress 13.6.4. The number of replies in this thread indicates that it is an on-going annoyance and distraction.

https://github.com/cypress-io/cypress/issues/28061#issuecomment-1889544098 said that they are open to PRs to suppress the message. Nobody has come forward so far and the Cypress.io team hasn't actively pick it up either, so the error message remains.