https://cypress.io logo
Join Discord
Powered by
# i-need-help
  • ERROR:crashpad_client_win.cc(844)] not connected
    w

    witty-leather-63295

    04/24/2023, 12:54 PM
    I'm having trouble on run cypress on windows, node version is latest 18.16.0 After I press to open e2e tests, cypress crashes and the only message is this:
    Copy code
    yarn run cypress open
    yarn run v1.22.19
    warning ..\..\..\package.json: No license field
    $ C:\project\node_modules\.bin\cypress open
    
    Couldn't find tsconfig.json. tsconfig-paths will be skipped
    [14720:0424/134349.314:ERROR:crashpad_client_win.cc(844)] not connected
    error Command failed with exit code 4294930435.
    info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
    How can I access more information about the error?
  • Web Page Loader/Spinner Problem
    l

    little-honey-86788

    04/24/2023, 1:19 PM
    Hi all, I have an issue with my web page. Basically It has a loader "spinner" which usually shows up after some user-action. Let's say I confirm selection on a specific page via some Button. Next, the loader appears. After it is no longer visible, the data is updated on a page and we are ready to go. Initially I wanted to create a custom command like this: Cypress.Commands.add('waitForLoaderToFinish', () => { cy.get('body').then(($body) => { if ($body.find('.table-loading-spinner').length > 0) { cy.get('.table-loading-spinner', { timeout: 3000 }).should('be.visible'); cy.get('.table-loading-spinner', { timeout: 3000 }).should('not.exist'); } else { cy.log('Spinner not present, continuing test execution'); } }); }); I wanted this command to Check if the .table-loading-spinner is present in the DOM, if so It should wait for this to not exist (disappear). The issue I'm having is the fact, that the loader "takes some time" to actually appear and Cypress seems to be "too fast". So as a result, cypress already continues tests assuming that the spinner is not present, but in fact the spinner did not yet appear. Any ideas how to solve this issue?
    e
    g
    • 3
    • 4
  • Cypress run test randomly failing because of 100% CPU and high memory usage
    b

    billions-appointment-73985

    04/24/2023, 1:56 PM
    Hello, I have a react project where I have 38 e2e cypress test files. I run these test cases on Circle CI in headless mode (cypress run) It's been a long time any random test file is started failing with element not found or API intercept didn't worked. By when I run the same failed test in cypress open mode it works fine. This has become a blocker for me to promote new changes to production because cypress does not get pass. I am using cypress 9 I run my cypress in Large Docker container (i.e 4 CPU, 8 GB RAM) on Circle CI. Please help to resolve this issue. Thanks
    a
    e
    +3
    • 6
    • 12
  • testing if nginx caching is enabled
    a

    ambitious-monkey-72386

    04/24/2023, 6:16 PM
    Can someone help me in writing tests that helps me identify if nginx caching is happening for a request . I guess we can verify the request headers . Any inputs ?
  • Cypress window blank
    h

    handsome-processor-4914

    04/24/2023, 9:36 PM
    Hello there, anyone who has some input I'd be super grateful for! I don't know why I get a blank screen like this, I debuged for hours and still don't have a clue why. Dose anyone has some inputs?

    https://cdn.discordapp.com/attachments/1100173549773279252/1100173847015202816/Screen_Recording_2023-04-24_at_23.33.45.mov▾

  • Dependencies for component testing are not found?
    h

    handsome-wolf-98416

    04/25/2023, 5:27 AM
    Hi. I'm trying to set up component testing. Since for some strange reason this is not possible without selecting a framework (which we don't use), I decided to just select a framework, install the dependencies, and then completely ignore this framework during testing. However, even though I have executed the command line given by the Cypress app to install the dependencies, it does not seem to find them. It keeps waiting for them, and skipping to the next step with the dependencies installed, I get errors saying that the dependencies are not there. I'm not a Node expert, so probably I'm just missing something here?
    m
    • 2
    • 2
  • Assets not found in Angular component test
    n

    nice-hamburger-65093

    04/25/2023, 9:09 AM
    Cannot load assets in Angular component test. All requests to
    /assets/
    throw
    404 Not found
    , but in e2e and in app works normally.
  • Cypress dashboard test run not ending
    i

    important-diamond-61614

    04/25/2023, 12:41 PM
    I am experiencing some issues with test runs that are being recorded by the dashboard. Sometimes, the test run just runs forever, or until I cancel it. I can see from the logs in Jenkins that the test run did actually finish, including some other logs stating that the run was recorded by the cypress cloud. See below. 09:58:18 [2023-04-25T07:58:18.261Z] Recorded Run: https://cloud.cypress.io/projects/6uj5mh/runs/731%1B[39m 09:58:18 [2023-04-25T07:58:18.261Z] 09:58:18 [2023-04-25T07:58:18.261Z] cypress:server:cypress about to exit with code 0 +3m 09:58:18 [2023-04-25T07:58:18.261Z] cypress:server:browsers killing browser process +1m 09:58:18 [2023-04-25T07:58:18.261Z] cypress:server:browsers:chrome closing remote interface client +12s 09:58:18 [2023-04-25T07:58:18.261Z] cypress:server:browsers:chrome closing chrome +0ms 09:58:18 [2023-04-25T07:58:18.261Z] cypress:proxy:http:util:prerequests metrics: { browserPreRequestsReceived: 3444, proxyRequestsReceived: 2329, immediatelyMatchedRequests: 1308, unmatchedRequests: 45, unmatchedPreRequests: 1160 } +0ms 09:58:18 [2023-04-25T07:58:18.262Z] 2023-04-25T07:53:02.597Z cypress:cli child event fired { event: 'exit', code: 0, signal: null } 09:58:18 [2023-04-25T07:58:18.262Z] 2023-04-25T07:53:02.600Z cypress:cli child event fired { event: 'close', code: 0, signal: null } 09:58:18 [2023-04-25T07:58:18.262Z] Done in 181.97s. Any advice?
    m
    • 2
    • 3
  • Monorepo Sharing Cypress Commands Github Actions
    e

    echoing-tent-95037

    04/25/2023, 3:06 PM
    I was working on some changes and was reusing commands across my mono repos. It worked fine locally and then when trying to run in GHA it says the commands don't exist. Does anyone have an example of how monorepo can share cypress commands across the packages within GHA?
    • 1
    • 1
  • Mocking injected items in Angular component test.
    f

    fancy-mechanic-10638

    04/25/2023, 4:19 PM
    I'm sure this is an FAQ, but I just can't find it. When I'm doing a component test, and my component does something like
    readonly #service = inject(MyService)
    , how do I mock the service? I'm specifically not talking about mocking an HTTP call.
  • Verify a special character string
    q

    quaint-airplane-96634

    04/26/2023, 9:22 AM
    I have to verify a special character string on a webpage on different elements using Cypress. Special character string is :
    T!@$^()-_+, &_-=tt.Ø {y}[a] £ fi
    Please find attached sample HTML page Whenever I try to verify the string I get below assertion error in Cypress:
    AssertionError:Timed out retrying after 4000ms: Expected to find content: 'T!@$^()-+, &-=tt.Ø {y}[a] £ fi' within the element: <label> but never did.
    Below is the code block:
    Copy code
    it('Verify Special characters', () => {
        cy.visit('public/special-character.html')
        
        cy.get('label').contains('T!@$^()-_+, &_-=tt.Ø {y}[a] £ fi');
        cy.get('p').contains('T!@$^()-_+, &_-=tt.Ø {y}[a] £ fi');
       
      })
    https://cdn.discordapp.com/attachments/1100713482917265428/1100713483206668348/special-character.html
  • Rename downloaded file
    w

    worried-hairdresser-56712

    04/26/2023, 9:48 AM
    Hi, I want to ask, can we rename the file that we just downloaded? Thank you.
  • How can i create a new selectable setting for e2e UI, which tells on which site to run tests
    b

    busy-football-20916

    04/26/2023, 10:35 AM
    I need to create some sort of solution where I can select on which url to run tests outside of changing it in the code or cmd. Is it possible to create a selection under project Settings in the UI to select which url to run tests on?
  • Cypress and SSR (Server Side Rendering)
    s

    stale-bear-96866

    04/26/2023, 12:48 PM
    I'm developing tests with Cypress to validate an SSR (Server Side Rendering) application I have some problems running the tests, some elements are available on the page. But they are being rendered on the server. This way Cypress interacts with the element, but the application does not respond. Example: clicks but does not take to another page. I looked everywhere, I even found this example from Bahmutov. But I haven't found a way for Cypress to be able to 'wait' for the components to render. The following article: https://glebbahmutov.com/blog/ssr-e2e/ Kindly, has anyone worked with Cypress in SSR applications? Could you give me a tip, or where can I get more information?
  • I am unable to create a test that unzips a password protected zip file. help
    l

    limited-ghost-73949

    04/26/2023, 2:16 PM
    Hello. teach me please. Is it possible to create a test that unzips a zip file with a password and validates the unzipped file? Please tell me how to solve it.
    e
    • 2
    • 4
  • How to keep a session logged.
    p

    powerful-toothbrush-36495

    04/26/2023, 2:47 PM
    So basically have been trying to search for and basically fail (note: I am a beginner), to run tests where they would run in a series, at the moment after every test I am getting logged out.
    e
    e
    g
    • 4
    • 16
  • Need help on the GitHub issue https://github.com/cypress-io/cypress/issues/26586
    p

    plain-potato-68806

    04/26/2023, 3:03 PM
    Need help on the GitHub issue https://github.com/cypress-io/cypress/issues/26586
  • How to get UUID from parameters?
    f

    few-musician-79351

    04/27/2023, 1:33 AM
    Hey 👋, I have a button that when you click it(let's suppose that you're on
    /order
    ), it redirects you to a new page with a generated UUID passed through URL parameters (
    /order/sl435jhsdfhkj
    ). Is it possible? Thank you.

    https://cdn.discordapp.com/attachments/1100957975373422672/1100957975545384970/image.png▾

    g
    • 2
    • 1
  • Cypress Cloud Dashboard API
    f

    faint-kangaroo-77725

    04/27/2023, 7:04 AM
    How to access cypress cloud dashboard api
  • I am getting props is undefined while using the cy.screenshot() command right after the cy.origin()
    p

    plain-potato-68806

    04/27/2023, 8:57 AM
    I am getting props is undefined while using the cy.screenshot() command right after the cy.origin() Any guess?

    https://cdn.discordapp.com/attachments/1101069677318381669/1101069677490356295/Screenshot_2023-04-27_at_09.10.59.png▾

    s
    m
    • 3
    • 17
  • Test card payment with different origin without use chromeWebSecurity setting
    w

    wooden-flower-6562

    04/27/2023, 9:20 AM
    Hello everyone, I started working on cypress few weeks ago. Consider me like a newbie to automation testing. There are different subject in this post because I tried to bypass the first problem of cross origin with common settings. The website I'm testing is made with PrestaShop v1.6.1.24 and I'm using Cypress v11.2 in a pre-prod environment. The test workflow: I fill my cart with product, validate it, choose the address to send it, have to accept TOS and then I go on page where I choose the payment option. My test payment requires to go on a different origin than my website, the app redirects URL to go to credit card form (it uses verifone), then after validation payment it redirects on my website. (I'm using false card number allowed by verifone) The bypass I can't use: I would like to know if there is a solution or best practice to make this payment without using the
    chromeWebSecurity: false
    and
    experimentalSessionAndOrigin: true
    settings. The problem using those settings in my case: If I use
    chromeWebSecurity
    and
    experimentalSessionAndOrigin
    , I have problem with the cart that doesn't keep products in between pages (problem that I have too with Cypress v12.0 because it sets
    experimentalSessionAndOrigin
    by default). The cart is filled with a PHP request, I have to put a missing cookie each time and use
    cy.visit()
    the current URL to get back the cart. But it doesn't work at the end of my workflow where I have to submit form (TOS step) to access page where I can choose the payment option. That's why I don't know if I should use a different way to make payment without those settings, or if I should try to correct the problem with the cart using settings. Thanks for your help. I hope I gave you enough information to understand my problem. Best regards. Mikaël
  • I am getting an error on loading Outlook Online
    b

    billions-stone-48809

    04/27/2023, 9:46 AM
    Hi everyone 🙂 I am trying to test an add-in for Outlook Online. Therefore I visit outlook.office.com and go through the authentication. After directing back to Outlook Online I get an error message from Outlook looking like this: BootResult: cdnError Failed resource: https://res.cdn.office.net/owamail/20230414002.09/scripts/owa.ven.graphql.m.js Back Filled Errors: Unhandled Rejection: ChunkLoadError: Loading chunk 203918 failed. (error: https://res-h3.public.cdn.office.net/owamail/20230414002.09/scripts/owa.ven.graphql.m.js):undefined|Unhandled Rejection: ChunkLoadError: Loading chunk 203918 failed. ... (error: https://res.cdn.office.net/owamail/20230414002.09/scripts/owa.MailBoot.m.js):undefined|Unhandled Rejection: ChunkLoadError: Loading chunk 203918 failed. (error: https://res.cdn.office.net/owamail/20230414002.09/scripts/owa.ven.graphql.m.js):undefined|undefined:undefined|undefined:undefined|undefined:undefined|undefined:undefined|undefined:undefined|undefined:undefined|undefined:undefined|undefined:undefined|undefined:undefined|undefined:undefined|undefined:undefined|undefined:undefined|undefined:undefined|undefined:undefined|undefined:undefined err: Error: Failed to load javascript. esrc: Runtime et: ClientError estack: Error: Failed to load javascript. at P.onLoadFailed (https://outlook.office.com/mail/?bO=1&sessionId=07287aaf-f390-4e0b-8eb3-0783c4a9eedd:2:21272) at https://outlook.office.com/mail/?bO=1&sessionId=07287aaf-f390-4e0b-8eb3-0783c4a9eedd:2:20037 I use experimentalModifyObstructiveThirdPartyCode, experimentalSessionAndOrigin and chromeWebSecurity: false Did anyone happen to run into this issue and could be of any help here? Thanks a lot and if there are further questions please ask and i will try to answer them 🙂 Best regards. Vanessa
    • 1
    • 1
  • How to get the URL without actually hitting the button?
    s

    silly-river-29906

    04/27/2023, 11:17 AM
    actually i have one doubt I have one button, on clicking on this button it opens a URL into new tab. As cypress doesn't support multi tab functionality. And i want to get the URL, on what URL this button is redirecting, without actually hitting that button? how can i get the URL? URL is not set in the HTML itself, URL set using JS, so directly i can't use src attribute
    g
    • 2
    • 1
  • Hi everyone, I'm trying to use my angular programatically in my test. I'm using firestore.
    b

    bumpy-lion-62664

    04/27/2023, 2:56 PM
    Hi, I'm using firestore as a database for my app, I have it in a service and I want to manipulate it in my tests. I expose it via the window object, basically in my app, if it's built as e2e, it will do window.e2eFirestore = this This works fine, but my problem is how to await for async functions to complete. So I'm currently doing something like this:
    Copy code
    const setup = () => {
        cy.window()
          .its('e2eFirestore')
          .then(
            (firestore: FirestoreService) =>
              new Cypress.Promise(async (resolve) => {
                await firestore.update(id, {
                  test: 'test'
                });
                resolve();
              })
          );
    }
    
    it('test', () => {
      setup(); // doesn't wait for test data to be written in the db
      cy.visit('/');
      // it should display test data, but it doesn't, that gets loaded after
    })
    It seems cypress is not waiting for the Cypress Promise to complete. What is the recommended approach for handling async api functionality? I don't want to visit the route until the data has been stored in the db. Thank you in advance!
  • Trying to install Cypress from a downloaded Zip
    k

    kind-quill-98303

    04/27/2023, 6:16 PM
    I'm working in a secure environment, meaning there is no access to internet. I'm using a windows 10 machine and I have followed the install guide located here: https://docs.cypress.io/guides/references/advanced-installation. Which refers to setting up a CYPRESS_INSTALL_BINARY variable which points to the location of the cypress zip file. However, after setting this variable and executing the npm install command, it still invokes the online registry fetch, which eventually fails. I then tried the direct command that simply points to the zip i.e. CYPRESS_INSTALL_BINARY=/mypath/cypress.zip npm install cypress and I get an error as it is not a recognized command. I guess I'm doing something wrong but I cant work it out. It doesn't seem to be a complicated task when looking at the instructions. Does anyone have any step by step instructions that work for them? There is a direct install option but I would prefer to install via npm, if possible. Also for reference I'm trying to install cypress 9.6.0 so its not the latest version of Cypress.
    b
    • 2
    • 2
  • Run specs in a specific order
    e

    eager-arm-41438

    04/27/2023, 7:51 PM
    Hello there! Is there any way to run specs in a specific order? I've actually tried with importing them in a spec file and then running it and worked, but in that way I cannot do any spec re run inside it.
    • 1
    • 1
  • How can I persuade team to trust Cypress Cloud won't steal our code?
    i

    important-noon-13871

    04/28/2023, 1:46 AM
    Maybe it's stupid question, please give me some terminology.
    m
    • 2
    • 4
  • Cannot connect to local host on browser instance running cypress
    a

    agreeable-lunch-15323

    04/28/2023, 9:07 AM
    Hi, newbie here. So I cannot connect to my local host, using
    Copy code
    ts
    cy.vist('http://localhost:4200')
    and the worst part: I cannot connect to http://localhost:4200 on a seperate tab in the browser instance that is running cypress. for an example. if I choose chrome as the browser, the test will not run, I will get the error
    Copy code
    ts
    CypressError
    cy.visit() failed trying to load:
    
    http://localhost:4200/login
    
    We attempted to make an http request to this URL but the request failed without a response.
    
    We received this error at the network level:
    
      > Error: connect ECONNREFUSED 127.0.0.1:4200
    and if on the same browser instance I create a new tab and go to http://localhost:4200, I do not get a response. same thing when I create a new window from that instance. But if I just open another browser instance that is not created by or from the instance running cypress, I can connect to local host and get the appropriate responses. Here is a link[https://drive.google.com/file/d/1exDHylkA8283rw2EUmHKEsczLsENzEm4/view?usp=sharing] of a video showing the issue. I used different browsers to test and same result.
    m
    • 2
    • 16
  • Test run continues after all tests pass
    b

    best-agent-47831

    04/28/2023, 11:15 AM
    Hi, We ran into the following issue in our Azure pipeline. We have windows machines on our servers and after about 57 minutes the error
    ##[error]The operation was canceled.
    . The error in the pipeline step tells me the timeout of 60 minutes has passed, therefore it is canceling the job. This is the total timeout for the job. The spec file had run 5 of 7 tests and then was stuck for some reason. No error message available. After running this same spec file with Cypress open it seems that the duration counter continues counting even after all tests have passed. However, this doesn't happen all the time, so it is very confusing. Does anyone recognize this issue? Might be two different issues though...
  • I am not able to click on a link in table
    w

    wide-eye-45012

    04/28/2023, 2:48 PM
    Below is the code snippet I am using. Please help pendingAuditsTable().within(() => { cy.get('tbody > tr > td:nth-child(1)').each(($elm, index, $list) => { const col = $elm.text(); cy.log(col); if (col.includes(facility)) { cy.log(facility); cy.get('tbody > tr > td:nth-child(1)').next().next().each(($el, index, $list) => { const col1 = $el.text(); if (col1.includes(audit_type)) { cy.log(col1) cy.get('tbody > tr > td:nth-child(1)').next() .next().next().next().next().next().invoke('text').then(text => { expect(text).to.include("Submitted"); if(text.includes("Submitted")){ cy.get('tbody > tr > td:nth-child(1)').next() .next().next().next().next().next().next().find('a') .eq(index).click(-25, 5, {force: true}); } }) return false; } }) return false; } })
    e
    • 2
    • 3
1...192021...26Latest