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

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

Open
tnrich opened this issue Nov 30, 2018 · 4 comments
Open

Comments

@tnrich
Copy link

tnrich commented Nov 30, 2018

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!

@tnrich
Copy link
Author

tnrich commented Nov 30, 2018

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.

@brycekahle
Copy link
Contributor

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.

@tnrich
Copy link
Author

tnrich commented Dec 11, 2018

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 "[email protected]"
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 "[email protected]"
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.

@brycekahle
Copy link
Contributor

@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.

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

No branches or pull requests

2 participants