question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cypress.io 3.1.3 breaks by legacy jQuery library

See original GitHub issue

When testing a web page with old version jQuery, Cypress.io 3.1.3 breaks, and complain a TypeError as below.

cypress-error

The trackingstack is here.

cypress_runner.js:160760 TypeError: item.first is not a function
    at Object.unwrapFirst (http://localhost:9090/__cypress/runner/cypress_runner.js:62996:19)
    at http://localhost:9090/__cypress/runner/cypress_runner.js:58725:29
From previous event:
    at runCommand (http://localhost:9090/__cypress/runner/cypress_runner.js:58722:8)
    at next (http://localhost:9090/__cypress/runner/cypress_runner.js:58767:14)
From previous event:
    at http://localhost:9090/__cypress/runner/cypress_runner.js:58786:37
From previous event:
    at run (http://localhost:9090/__cypress/runner/cypress_runner.js:58784:15)
    at Object.cy.(anonymous function) [as visit] (http://localhost:9090/__cypress/runner/cypress_runner.js:59012:11)
    at Context.runnable.fn (http://localhost:9090/__cypress/runner/cypress_runner.js:59142:20)
    at callFn (http://localhost:9090/__cypress/runner/cypress_runner.js:27558:21)
    at Test.Runnable.run (http://localhost:9090/__cypress/runner/cypress_runner.js:27551:7)
    at http://localhost:9090/__cypress/runner/cypress_runner.js:62062:28
From previous event:
    at Object.onRunnableRun (http://localhost:9090/__cypress/runner/cypress_runner.js:62057:20)
    at $Cypress.action (http://localhost:9090/__cypress/runner/cypress_runner.js:57439:51)
    at Test.Runnable.run (http://localhost:9090/__cypress/runner/cypress_runner.js:61123:20)
    at Runner.runTest (http://localhost:9090/__cypress/runner/cypress_runner.js:28021:10)
    at http://localhost:9090/__cypress/runner/cypress_runner.js:28127:12
    at next (http://localhost:9090/__cypress/runner/cypress_runner.js:27941:14)
    at http://localhost:9090/__cypress/runner/cypress_runner.js:27951:7
    at next (http://localhost:9090/__cypress/runner/cypress_runner.js:27883:14)
    at http://localhost:9090/__cypress/runner/cypress_runner.js:27914:7
    at next (http://localhost:9090/__cypress/runner/cypress_runner.js:62027:16)
    at http://localhost:9090/__cypress/runner/cypress_runner.js:62039:11
From previous event:
    at onNext (http://localhost:9090/__cypress/runner/cypress_runner.js:62038:57)
    at done (http://localhost:9090/__cypress/runner/cypress_runner.js:27519:5)
    at http://localhost:9090/__cypress/runner/cypress_runner.js:27563:11
From previous event:
    at callFn (http://localhost:9090/__cypress/runner/cypress_runner.js:27562:10)
    at Hook.Runnable.run (http://localhost:9090/__cypress/runner/cypress_runner.js:27551:7)
    at http://localhost:9090/__cypress/runner/cypress_runner.js:62062:28
From previous event:
    at Object.onRunnableRun (http://localhost:9090/__cypress/runner/cypress_runner.js:62057:20)
    at $Cypress.action (http://localhost:9090/__cypress/runner/cypress_runner.js:57439:51)
    at Hook.Runnable.run (http://localhost:9090/__cypress/runner/cypress_runner.js:61123:20)
    at next (http://localhost:9090/__cypress/runner/cypress_runner.js:27897:10)
    at http://localhost:9090/__cypress/runner/cypress_runner.js:27919:5
    at timeslice (http://localhost:9090/__cypress/runner/cypress_runner.js:23160:27)
logError @ cypress_runner.js:160760
(anonymous) @ cypress_runner.js:160430
emitOne @ cypress_runner.js:126682
emit @ cypress_runner.js:126760
(anonymous) @ cypress_runner.js:116982
emitOne @ cypress_runner.js:126682
emit @ cypress_runner.js:126760
emit @ cypress_runner.js:117011
Test._this._onErrorClick @ cypress_runner.js:118787
(anonymous) @ cypress_runner.js:117133
executeAction @ cypress_runner.js:128987
res @ cypress_runner.js:128978
callCallback @ cypress_runner.js:133056
invokeGuardedCallbackDev @ cypress_runner.js:133106
invokeGuardedCallback @ cypress_runner.js:133159
invokeGuardedCallbackAndCatchFirstError @ cypress_runner.js:133173
executeDispatch @ cypress_runner.js:133504
executeDispatchesInOrder @ cypress_runner.js:133523
executeDispatchesAndRelease @ cypress_runner.js:133624
executeDispatchesAndReleaseTopLevel @ cypress_runner.js:133635
forEachAccumulated @ cypress_runner.js:133605
runEventsInBatch @ cypress_runner.js:133766
runExtractedEventsInBatch @ cypress_runner.js:133775
handleTopLevel @ cypress_runner.js:137768
batchedUpdates$1 @ cypress_runner.js:150409
batchedUpdates @ cypress_runner.js:135100
dispatchEvent @ cypress_runner.js:137847
interactiveUpdates$1 @ cypress_runner.js:150464
interactiveUpdates @ cypress_runner.js:135119
dispatchInteractiveEvent @ cypress_runner.js:137824

But, when I downgrade to version 3.1.2, and all tests work properly with no issues at all.

Could someone please help to have a look at this issue? Thanks

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:21 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
farzadsocommented, Feb 14, 2019

Thanks @jennifer-shehane When will it be released?

0reactions
cypress-bot[bot]commented, Mar 15, 2019

Released in 3.2.0.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Changelog - Cypress Documentation
Breaking Changes: Cypress dropped support for Node.js 12, 15 and 17. Those versions have reached end-of-life. Installing Cypress on your system now requires ......
Read more >
What's New with Cypress Web Testing?
Fast, easy and reliable testing for anything that runs in a browser. Install Cypress in seconds and take the pain out of front-end...
Read more >
other proxied jQuery methods - Cypress Documentation
Cypress automatically includes jQuery and exposes it as Cypress.$. This is a great way to synchronously query for elements when debugging from Developer....
Read more >
Migration Guide | Cypress Documentation
There are some minor breaking changes. Most projects should be able to migrate without any code modifications. Changes to Mounting Options. Each ...
Read more >
Best Practices - Cypress Documentation
Your application may use dynamic classes or ID's that change; Your selectors break from development changes to CSS styles or JS behavior.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found