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

Upload CI Result Error: "Cannot complete same instance multiple times" #2469

Closed
HeyDaniyar opened this issue Sep 14, 2018 · 16 comments
Closed

Comments

@HeyDaniyar
Copy link

Current behavior:

Our Jenkins CI job's result cannot not be uploaded to Cypress CI Dashboard.

Jenkins CI logs:
  (Uploading Results)

Warning: We encountered an error talking to our servers.

This run will not be recorded.

This error will not alter the exit code.

StatusCodeError: 400 - "Cannot complete same instance multiple times"

================================================================================
  (Run Finished)


      Spec                                    Tests  Pass…  Fail…  Pend…  Skip… 
  ┌────────────────────────────────────────────────────────────────────────────┐
  │ ✖ ads_html5_sdk.js               1:38:…    175    167      8      -      - │
  └────────────────────────────────────────────────────────────────────────────┘
    1 of 1 failed (100%)              1:38…    175    167      8      -      -  


───────────────────────────────────────────────────────────────────────────────────
                                                                                   
  Recorded Run: https://dashboard.cypress.io/#/projects/f92sa3/runs/6             

Cypress Dashboard:
image

Desired behavior:

Normally, the triggered jenkin's job would upload its result to CI dashboard before. But after the CI dashboard uploaded, we cannot make this happened with the Cannot complete same instance multiple times error.

Versions

Cypress 3.1.0

@jennifer-shehane
Copy link
Member

Hi, can you include the arguments you used to run cypress? So, flags after cypress run.

This should not happen though.

@jennifer-shehane jennifer-shehane added type: bug external: api stage: needs investigating Someone from Cypress needs to look at this labels Sep 14, 2018
@HeyDaniyar
Copy link
Author

HeyDaniyar commented Sep 15, 2018

@jennifer-shehane
This is the arguments we uesed to run cypress, besides record key, we passed an environment variable to our case.

> cypress run "--env" "ipList=[\"167.114.174.45\"]" "--record" "--key" "b34e1f4f-b684-4def-92e8-fac7fb98e8c4"

It looks like this is your first time using Cypress: 3.1.0

[02:07:35]  Verifying Cypress can run /root/.cache/Cypress/3.1.0/Cypress [started]
[02:07:37]  Verifying Cypress can run /root/.cache/Cypress/3.1.0/Cypress [completed]

Opening Cypress...

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

  (Run Starting)

@jennifer-shehane
Copy link
Member

@HeyDaniyar Are you still encountering this error?

I ran a run with the same flag arguments and I do not think that is the problem.

Can you share anything more about your Jenkin's setup?

@katsiaryna-yurasova-zefr
Copy link

katsiaryna-yurasova-zefr commented Nov 29, 2018

Hello @jennifer-shehane
I also faced this issue at the Jenkins side.
I use the Jenkins file to run cypress. This is a piece of it:

 stage('Testing Install and Run') {
      when {
        equals expected: "master", actual: env.BRANCH_NAME
      }
      steps{
        script{
          docker.image('cypress/base:8').inside('--ipc=host -u root'){
            sh("npm install")
            sh("npx cypress run --record --key ${usage_key} || true")
          }
        }
      }
      post {
        failure {
          script {
            overview.add "Error: Testing Stage"
          }
        }
      }
    }

@katsiaryna-yurasova-zefr
Copy link

katsiaryna-yurasova-zefr commented Nov 29, 2018

@jennifer-shehane
I would like to pay attention that docker is run with a flag:

docker run --ipc=host

because previously I fixed an issue with docker crashes per instructions from here:
#350 (comment)

It fixed the crash itself but the issue of this kind ("Cannot complete same instance multiple times") started to reproduce. As a result, test execution is completed but takes to long: 5h against 31min.

@jennifer-shehane jennifer-shehane added stage: needs information Not enough info to reproduce the issue and removed stage: needs investigating Someone from Cypress needs to look at this labels Dec 4, 2018
@muslaydin
Copy link

So how to fix this problem?
fail

@jennifer-shehane
Copy link
Member

We've made many improvements to our processes handling recording that should resolve most cases of this error.

Please comment in this issue if you see an occurrence of this error in the future and we will reopen the issue.

@sergeyKhristenko
Copy link

Seems like I'm seeing the same error now

@jennifer-shehane
Copy link
Member

Reopening. We've had a couple of users report this same error again when attempting to record CI results. The API team is investigating.

@andy-lindberg
Copy link

Been seeing a similar issue with our environment as well today 😞

@trydionel
Copy link

We released a fix for one of the edge cases that would trigger this. It went out July 24, so hopefully it addressed your issues @sergeyKhristenko and @andy-lindberg! If you continue seeing this failure, would you mind to share your CI logs?

Closing this issue pending additional reports.

@sorokosergey
Copy link

Hello everyone! test runs are timing out at the 2hr 6min mark consistently. Is there a timeout limit that can be set for this? I launch the test run locally. I have the following logs
image
image

@mhudson
Copy link

mhudson commented Dec 17, 2019

HI @trydionel, this issue persists in Cypress 3.6.1

Cannot find unclaimed instance for spec: tests\\e2e\\specs\\01-customer\\04-life\\NewUser.spec.js

Looks like Windows 10 path issue discussed elsewhere, but the fault appears to lie within Cypress on Windows. Cypress is converting our spec path :tests/e2e/specs/*/04-life/*.spec.js to path (with double-slashes) tests\\e2e\\specs\\01-customer\\04-life\\...

We're running:

yarn run e2e:04-life-all --record --reporter teamcity --group LIFE --ci-build-id 1912.0.0.75

which expands to:

cypress run --browser chrome --spec 'tests/e2e/specs/*/04-life/*.spec.js' --record --reporter teamcity --group LIFE --ci-build-id 1912.0.0.75

@jennifer-shehane
Copy link
Member

@mhudson We are unaware of an issue involving the Windows path causing this error. We have a lot of Windows users, so if it were the path alone, we would likely have seen it by now. Likely there is something else more specific involved causing this error for your project.

Can you email us the projectId this error is occurring within to support@cypress.io. This will help us track down any failed requests. You can find this id in the cypress.json file of the project.

@jennifer-shehane
Copy link
Member

Our team is currently working to deploy a fix that should address both @mhudson and @sorokosergey errors seeing the "Cannot complete same instance multiple times".

I will close this issue as soon as that fix is released.

@jennifer-shehane
Copy link
Member

Closing as resolved.

If you're experiencing a bug similar to this in Cypress, please open a new issue with a fully reproducible example that we can run. There may be a specific edge case with the issue that we need more detail to fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants