sockjs/sockjs-node

getting hard to debug error in socksjs code while running cypress test

tnrich opened this issue ยท 4 comments

Hello there,

I'm hitting the following error while trying to run a cypress test.

image

I don't really understand why this error is being hit or why it has no real stack trace. Any insight you might have would be quite helpful. Here's the linked issue in the cypress repo: cypress-io/cypress#2823

Thanks!

And here is a screenshot of it being caught with no real stack trace..
image

It appears a newly named jsonp file gets created and called every time the test is run.

This is the JSONP transport being used. For some reason, the function it is trying to use, does not exist. I would suggest checking your SockJS versions for both client and server.

Here is what I could find about sockjs in my project:

Thomass-MacBook-Pro:openVectorEditorTgen tnrich$ yarn why sockjs
yarn why v1.10.1
[1/4] ๐Ÿค”  Why do we have the module "sockjs"...?
[2/4] ๐Ÿšš  Initialising dependency graph...
[3/4] ๐Ÿ”  Finding dependency...
[4/4] ๐Ÿšก  Calculating file sizes...
=> Found "sockjs@0.3.19"
info Reasons this module exists
   - "nwb#webpack-dev-server" depends on it
   - Hoisted from "nwb#webpack-dev-server#sockjs"
info Disk size without dependencies: "248KB"
info Disk size with unique dependencies: "456KB"
info Disk size with transitive dependencies: "708KB"
info Number of shared dependencies: 3
โœจ  Done in 1.34s.
Thomass-MacBook-Pro:openVectorEditorTgen tnrich$ yarn why sockjs-client
yarn why v1.10.1
[1/4] ๐Ÿค”  Why do we have the module "sockjs-client"...?
[2/4] ๐Ÿšš  Initialising dependency graph...
[3/4] ๐Ÿ”  Finding dependency...
[4/4] ๐Ÿšก  Calculating file sizes...
=> Found "sockjs-client@1.1.5"
info Reasons this module exists
   - "nwb#webpack-dev-server" depends on it
   - Hoisted from "nwb#webpack-dev-server#sockjs-client"
info Disk size without dependencies: "1.11MB"
info Disk size with unique dependencies: "1.56MB"
info Disk size with transitive dependencies: "1.88MB"
info Number of shared dependencies: 9
โœจ  Done in 0.84s.
Thomass-MacBook-Pro:openVectorEditorTgen tnrich$ yarn why sockjs-node
yarn why v1.10.1
[1/4] ๐Ÿค”  Why do we have the module "sockjs-node"...?
[2/4] ๐Ÿšš  Initialising dependency graph...
[3/4] ๐Ÿ”  Finding dependency...
error We couldn't find a match!
โœจ  Done in 1.04s.

@tnrich Is it possible your test runner is isolating sockjs somehow, such that it can't see those functions? I'm not familiar with Cypress.