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

Use of WebSocket breaks crawler #118

Open
zwass opened this issue Feb 1, 2019 · 2 comments
Open

Use of WebSocket breaks crawler #118

zwass opened this issue Feb 1, 2019 · 2 comments

Comments

@zwass
Copy link

zwass commented Feb 1, 2019

When working with a component that opens a Websocket:

🕷   Starting crawling http://localhost:61974/
Error: Uncaught [ReferenceError: WebSocket is not defined]
    at reportException (/Users/zwass/dev/try-osquery/node_modules/jsdom/lib/jsdom/living/helpers/runtime-script-errors.js:58:24)
    at processJavaScript (/Users/zwass/dev/try-osquery/node_modules/jsdom/lib/jsdom/living/nodes/HTMLScriptElement-impl.js:130:7)
    at HTMLScriptElementImpl._eval (/Users/zwass/dev/try-osquery/node_modules/jsdom/lib/jsdom/living/nodes/HTMLScriptElement-impl.js:65:7)
    at /Users/zwass/dev/try-osquery/node_modules/jsdom/lib/jsdom/browser/resource-loader.js:31:22
    at Object.check (/Users/zwass/dev/try-osquery/node_modules/jsdom/lib/jsdom/living/nodes/Document-impl.js:89:11)
    at Object.check (/Users/zwass/dev/try-osquery/node_modules/jsdom/lib/jsdom/living/nodes/Document-impl.js:92:23)
    at /Users/zwass/dev/try-osquery/node_modules/jsdom/lib/jsdom/living/nodes/Document-impl.js:108:12
    at wrappedEnqueued (/Users/zwass/dev/try-osquery/node_modules/jsdom/lib/jsdom/browser/resource-loader.js:255:16)
    at Request.request [as _callback] (/Users/zwass/dev/try-osquery/node_modules/jsdom/lib/jsdom/browser/resource-loader.js:203:9)
    at Request.self.callback (/Users/zwass/dev/try-osquery/node_modules/request/request.js:185:22) ReferenceError: WebSocket is not defined
    at new t (http://localhost:61974/static/js/main.c345f012.chunk.js:1:495)
    at s (http://localhost:61974/static/js/1.bc8d6ca8.chunk.js:1:157233)
    at re (http://localhost:61974/static/js/1.bc8d6ca8.chunk.js:1:158420)
    at e.render (http://localhost:61974/static/js/1.bc8d6ca8.chunk.js:1:160797)
    at e.read (http://localhost:61974/static/js/1.bc8d6ca8.chunk.js:1:160411)
    at Object.renderToString (http://localhost:61974/static/js/1.bc8d6ca8.chunk.js:1:165177)
    at t.render (http://localhost:61974/static/js/1.bc8d6ca8.chunk.js:1:35884)
    at Module.76 (http://localhost:61974/static/js/main.c345f012.chunk.js:1:1492)
    at f (http://localhost:61974/:1:518)
    at Object.28 (http://localhost:61974/static/js/main.c345f012.chunk.js:1:87)
🔥 'render' from react-snapshot was never called. Did you replace the call to ReactDOM.render()?
🕸   Finished crawling.
@natansevero
Copy link

I am facing the same issue

@natansevero
Copy link

As I said, I was facing the same issue. The solution was to replace the react-snapshot for react-snap. The react-snap works with applications that use WebSocket implementation.

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