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

Cypress times out with "Error running plugin" at stacktrace plugins/preprocessor.js:66:18 "Symbol not found" #1968

Closed
reintroducing opened this issue Jun 17, 2018 · 13 comments

Comments

@reintroducing
Copy link

Current behavior:

My tests were working fine two weeks or so ago. I've changed nothing except updated some dependencies in my project unrelated to Cypress to their latest versions. When I try to run my tests now, Canary opens but nothing appears and then eventually it times out and I see this in Cypress:

Error running plugin
The following error was thrown by a plugin. We've stopped running your tests because a plugin crashed.

Error [ERR_IPC_CHANNEL_CLOSED]: channel closed
at ChildProcess.target.send (internal/child_process.js:584:16)
at Object.send (/Users/mprzybylski/Library/Caches/Cypress/3.0.1/Cypress.app/Contents/Resources/app/packages/server/lib/plugins/util.js:34:27)
at EventEmitter. (/Users/mprzybylski/Library/Caches/Cypress/3.0.1/Cypress.app/Contents/Resources/app/packages/server/lib/plugins/preprocessor.js:66:18)
at emitOne (events.js:120:20)
at EventEmitter.emit (events.js:210:7)
at Object.removeFile (/Users/mprzybylski/Library/Caches/Cypress/3.0.1/Cypress.app/Contents/Resources/app/packages/server/lib/plugins/preprocessor.js:115:19)
at Object.options.onBrowserClose (/Users/mprzybylski/Library/Caches/Cypress/3.0.1/Cypress.app/Contents/Resources/app/packages/server/lib/open_project.js:78:30)
at ChildProcess. (/Users/mprzybylski/Library/Caches/Cypress/3.0.1/Cypress.app/Contents/Resources/app/packages/server/lib/browsers/index.js:111:21)
at Object.onceWrapper (events.js:318:30)
at emitTwo (events.js:130:20)
at ChildProcess.emit (events.js:213:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)

Looking at Terminal reveals this:

> CYPRESS_BASE_API_PATH=http://localhost:3333/api/enrollment cypress open


GET /__/ 200 33.882 ms - -
GET /__cypress/runner/cypress_runner.css 200 38.993 ms - -
GET /__cypress/runner/cypress_runner.js 200 261.152 ms - -
GET /__cypress/runner/fonts/fontawesome-webfont.woff2?v=4.7.0 200 1.511 ms - 77160
GET /__cypress/iframes/integration/experience/landing.js 200 7.387 ms - 739
(node:75549) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
GET /__cypress/tests?p=cypress/integration/experience/landing.js-335 - - ms - -
GET /__cypress/tests?p=cypress/support/index.js-533 - - ms - -
GET /__cypress/iframes/integration/experience/landing.js 200 3.586 ms - 739
GET /__cypress/tests?p=cypress/integration/experience/landing.js-426 200 211.937 ms - -
GET /__cypress/tests?p=cypress/support/index.js-424 200 249.888 ms - -
GET /__cypress/iframes/integration/experience/landing.js 200 4.745 ms - 739
dyld: lazy symbol binding failed: Symbol not found: _SSL_library_init
  Referenced from: /Users/mprzybylski/Work/Livongo/front-end/enrollment/node_modules/uws/uws_darwin_57.node
  Expected in: flat namespace

dyld: Symbol not found: _SSL_library_init
  Referenced from: /Users/mprzybylski/Work/Livongo/front-end/enrollment/node_modules/uws/uws_darwin_57.node
  Expected in: flat namespace

HEAD / 301 80.236 ms - 50
HEAD / 301 85.915 ms - 50
HEAD / 301 81.205 ms - 50
HEAD / 500 9.685 ms - -
HEAD / 500 9.425 ms - -
HEAD / 500 9.189 ms - -
GET /__cypress/tests?p=cypress/integration/experience/landing.js-761 - - ms - -
GET /__cypress/tests?p=cypress/support/index.js-640 - - ms - -
The automation client disconnected. Cannot continue running tests.
2018-06-17 08:28:17.407 Cypress Helper[75537:51546284] Couldn't set selectedTextBackgroundColor from default ()

At that point, the only thing I can do is close Cypress to kill the process.

Desired behavior:

Everything works as expected and tests run.

Steps to reproduce:

Just running my tests :\ It happens for every test that I've written no matter whats in it. My assumption is that it has something to do with the environment but I can't seem to pinpoint whats going on.

Versions

Cypress: 3.0.1
node: 10.3.0
npm: 6.1.0
Canary 69
OSX 10.13.3

@reintroducing
Copy link
Author

For what its worth, I ran the tests headlessly and they all passed. Not really sure what could be going on here. I think I'm more so looking for input on what could possibly be wrong rather than a solution as this seems like something system specific which I'm not sure you guys can help me with, unfortunately. Hoping it triggers a thought in someone's head that may have some things for me to try.

@reintroducing
Copy link
Author

Downgrading to node v8.10.0 and rolling back my project dependency updates seems to have fixed this.

I can close the issue, but before I do so, have you guys seen anything like this?

@brian-mann
Copy link
Member

What does your pluginsFile look like?

I believe you are importing something in there which is a native module which is not precompiled correctly for the node version that comes built into Electron. So when it attempts to require this it fails. Downgrading to node 8.x.x makes sense that it would work (in this case) since that is the version of node that ships with Electron, which would mean your node_modules would have precompiled binaries matching what it expects to find.

@reintroducing
Copy link
Author

reintroducing commented Jun 18, 2018

My plugins file:

const webpack = require('@cypress/webpack-preprocessor');
const webpackConfig = require('../../config/webpack/config-common');

module.exports = (on, config) => {
    // `on` is used to hook into various events Cypress emits
    // `config` is the resolved Cypress config
    on('file:preprocessor', webpack({
        webpackOptions: webpackConfig
    }));
};

config-common is my base webpack config that just uses path, webpack, and webpack-merge. The config(s) that get merged in (which is based on the npm event being run) contain nothing more than webpack, browser-sync-webpack-plugin, path, or uglifyjs-webpack-plugin.

Do you think the issue is within the webpack-preprocessor?

@brian-mann
Copy link
Member

@chrisbreiding can you take a look at this?

@brian-mann
Copy link
Member

@reintroducing can you do npm ls uws and see what that is a dependency of?

That will tell us what is requiring it.

@reintroducing
Copy link
Author

@brian-mann result:

npm ls uws
[email protected] /Users/mprzybylski/Work/Livongo/front-end/enrollment
└── (empty)

What is uws?

@jennifer-shehane
Copy link
Member

@reintroducing uws is a node_module where the error you posted is originating from, specifically this portion points out node_modules/uws:

dyld: lazy symbol binding failed: Symbol not found: _SSL_library_init
  Referenced from: /Users/mprzybylski/Work/Livongo/front-end/enrollment/node_modules/uws/uws_darwin_57.node
  Expected in: flat namespace

dyld: Symbol not found: _SSL_library_init
  Referenced from: /Users/mprzybylski/Work/Livongo/front-end/enrollment/node_modules/uws/uws_darwin_57.node
  Expected in: flat namespace

@chrisbreiding chrisbreiding self-assigned this Jun 19, 2018
@chrisbreiding chrisbreiding added the stage: needs investigating Someone from Cypress needs to look at this label Jun 19, 2018
@reintroducing
Copy link
Author

@jennifer-shehane right on, my apologies, googly eyes from looking over logs.

@jakeleboeuf
Copy link

I ran into this issue today- in my case was coming from a console.log(); inside /cypress/support/commands.js.

If you've found yourself reading this issue, I'd suggest a quick check for console.log's your cypress commands/plugins!

🎉 Thanks to the same error/resolution at gatsbyjs/gatsby#9027 (comment)

@jennifer-shehane jennifer-shehane changed the title Cypress times out and "Error running plugin" Cypress times out with "Error running plugin" at stacktrace plugins/preprocessor.js:66:18 Jul 12, 2019
@jennifer-shehane jennifer-shehane changed the title Cypress times out with "Error running plugin" at stacktrace plugins/preprocessor.js:66:18 Cypress times out with "Error running plugin" at stacktrace plugins/preprocessor.js:66:18 "Symbol not found" Jul 12, 2019
@AndreiCatalinN
Copy link

AndreiCatalinN commented Dec 25, 2020

Is there any obvious fix for this issue? I have the same problem on Cypress 6 on a fresh install.
This is my package.json:

"dependencies": {
    "@angular/animations": "^9.1.13",
    "@angular/cdk": "^9.2.4",
    "@angular/common": "^9.1.13",
    "@angular/compiler": "^9.1.13",
    "@angular/core": "^9.1.13",
    "@angular/forms": "^9.1.13",
    "@angular/platform-browser": "^9.1.13",
    "@angular/platform-browser-dynamic": "^9.1.13",
    "@angular/router": "^9.1.13",
    "bootstrap": "^4.5.3",
    "ngx-bootstrap": "^6.2.0",
    "rxjs": "~6.5.4",
    "tslib": "^1.10.0",
    "zone.js": "~0.10.2"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^0.901.13",
    "@angular/cli": "^9.1.13",
    "@angular/compiler-cli": "^9.1.13",
    "@angular/language-service": "^9.1.13",
    "@types/node": "^12.19.11",
    "codelyzer": "^5.1.2",
    "concurrently": "^5.3.0",
    "cypress": "^6.2.0",
    "start-server-and-test": "^1.11.6",
    "ts-node": "~8.3.0",
    "tslint": "~6.1.0",
    "typescript": "~3.8.3"
  }

This is my cypress index.js

/**
 * @type {Cypress.PluginConfig}
 */
module.exports = (on, config) => {
  // `on` is used to hook into various events Cypress emits
  // `config` is the resolved Cypress config
} 

and cypress.json

{
  "baseUrl": "http://localhost:4201"
}

This is the error message:

Title: Error running plugin

Message: The following error was thrown by a plugin. We stopped running your tests because a plugin crashed. Please check your plugins file (S:\Proffesional\Project\Tales-Of-Societies\front-end\cypress\plugins\index.js)

Details:

TypeError: aSourceMapConsumer.eachMapping is not a function
    at Function.fromStringWithSourceMap (S:\Proffesional\Project\Tales-Of-Societies\front-end\node_modules\source-map\lib\source-node.js:87:24)
    at SourceMapSource.node (S:\Proffesional\Project\Tales-Of-Societies\front-end\node_modules\webpack-sources\lib\SourceMapSource.js:32:25)
    at ReplaceSource.node (S:\Proffesional\Project\Tales-Of-Societies\front-end\node_modules\webpack-sources\lib\ReplaceSource.js:82:27)
    at CachedSource.node (S:\Proffesional\Project\Tales-Of-Societies\front-end\node_modules\webpack-sources\lib\CachedSource.js:18:24)
    at S:\Proffesional\Project\Tales-Of-Societies\front-end\node_modules\webpack-sources\lib\ConcatSource.js:59:50
    at Array.map (<anonymous>)
    at ConcatSource.node (S:\Proffesional\Project\Tales-Of-Societies\front-end\node_modules\webpack-sources\lib\ConcatSource.js:58:63)
    at ConcatSource.proto.sourceAndMap (S:\Proffesional\Project\Tales-Of-Societies\front-end\node_modules\webpack-sources\lib\SourceAndMapMixin.js:29:18)
    at CachedSource.sourceAndMap (S:\Proffesional\Project\Tales-Of-Societies\front-end\node_modules\webpack-sources\lib\CachedSource.js:58:31)
    at getTaskForFile (S:\Proffesional\Project\Tales-Of-Societies\front-end\node_modules\webpack\lib\SourceMapDevToolPlugin.js:65:30)
    at S:\Proffesional\Project\Tales-Of-Societies\front-end\node_modules\webpack\lib\SourceMapDevToolPlugin.js:215:20
    at Array.forEach (<anonymous>)
    at S:\Proffesional\Project\Tales-Of-Societies\front-end\node_modules\webpack\lib\SourceMapDevToolPlugin.js:186:12
    at SyncHook.eval (eval at create (S:\Proffesional\Project\Tales-Of-Societies\front-end\node_modules\tapable\lib\HookCodeFactory.js:19:10), <anonymous>:7:1)
    at SyncHook.lazyCompileHook (S:\Proffesional\Project\Tales-Of-Societies\front-end\node_modules\tapable\lib\Hook.js:154:20)
    at S:\Proffesional\Project\Tales-Of-Societies\front-end\node_modules\webpack\lib\Compilation.js:1413:42
    at AsyncSeriesHook.eval [as callAsync] (eval at create (S:\Proffesional\Project\Tales-Of-Societies\front-end\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook (S:\Proffesional\Project\Tales-Of-Societies\front-end\node_modules\tapable\lib\Hook.js:154:20)
    at S:\Proffesional\Project\Tales-Of-Societies\front-end\node_modules\webpack\lib\Compilation.js:1409:36
    at AsyncSeriesHook.eval [as callAsync] (eval at create (S:\Proffesional\Project\Tales-Of-Societies\front-end\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook (S:\Proffesional\Project\Tales-Of-Societies\front-end\node_modules\tapable\lib\Hook.js:154:20)
    at S:\Proffesional\Project\Tales-Of-Societies\front-end\node_modules\webpack\lib\Compilation.js:1405:32

Stack trace:

Error: The following error was thrown by a plugin. We stopped running your tests because a plugin crashed. Please check your plugins file (`S:\Proffesional\Project\Tales-Of-Societies\front-end\cypress\plugins\index.js`)
    at Object.get (C:\Users\Catalin\AppData\Local\Cypress\Cache\6.2.0\Cypress\resources\app\packages\server\lib\errors.js:961:15)
    at EventEmitter.handleError (C:\Users\Catalin\AppData\Local\Cypress\Cache\6.2.0\Cypress\resources\app\packages\server\lib\plugins\index.js:159:20)
    at EventEmitter.emit (events.js:315:20)
    at ChildProcess.<anonymous> (C:\Users\Catalin\AppData\Local\Cypress\Cache\6.2.0\Cypress\resources\app\packages\server\lib\plugins\util.js:19:22)
    at ChildProcess.emit (events.js:315:20)
    at emit (internal/child_process.js:876:12)
    at processTicksAndRejections (internal/process/task_queues.js:85:21)

@jennifer-shehane
Copy link
Member

@AndreiCatalinN Your issue does not look related to the original issue. The original issue was about a Symbol not found error being thrown.

You are seeing an error being thrown from you plugins file however. I'm not able to reproduce it from the information provided alone. Perhaps it has something to do with your tsconfig file also? Could you open a new issue with your reproducible example?

Since this issue with the 'Symbol not found' error hasn't had activity in a while, we'll close the issue until we can confirm this is still happening. Please comment if there is new information to provide concerning the original issue and we'd be happy to reopen.

@thomascsamuel
Copy link

thomascsamuel commented May 26, 2022

Is there any obvious fix for this issue? I have the same problem on Cypress 6 on a fresh install. This is my package.json:

"dependencies": {
    "@angular/animations": "^9.1.13",
    "@angular/cdk": "^9.2.4",
    "@angular/common": "^9.1.13",
    "@angular/compiler": "^9.1.13",
    "@angular/core": "^9.1.13",
    "@angular/forms": "^9.1.13",
    "@angular/platform-browser": "^9.1.13",
    "@angular/platform-browser-dynamic": "^9.1.13",
    "@angular/router": "^9.1.13",
    "bootstrap": "^4.5.3",
    "ngx-bootstrap": "^6.2.0",
    "rxjs": "~6.5.4",
    "tslib": "^1.10.0",
    "zone.js": "~0.10.2"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^0.901.13",
    "@angular/cli": "^9.1.13",
    "@angular/compiler-cli": "^9.1.13",
    "@angular/language-service": "^9.1.13",
    "@types/node": "^12.19.11",
    "codelyzer": "^5.1.2",
    "concurrently": "^5.3.0",
    "cypress": "^6.2.0",
    "start-server-and-test": "^1.11.6",
    "ts-node": "~8.3.0",
    "tslint": "~6.1.0",
    "typescript": "~3.8.3"
  }

This is my cypress index.js

/**
 * @type {Cypress.PluginConfig}
 */
module.exports = (on, config) => {
  // `on` is used to hook into various events Cypress emits
  // `config` is the resolved Cypress config
} 

and cypress.json

{
  "baseUrl": "http://localhost:4201"
}

This is the error message:

Title: Error running plugin

Message: The following error was thrown by a plugin. We stopped running your tests because a plugin crashed. Please check your plugins file (S:\Proffesional\Project\Tales-Of-Societies\front-end\cypress\plugins\index.js)

Details:

TypeError: aSourceMapConsumer.eachMapping is not a function
    at Function.fromStringWithSourceMap (S:\Proffesional\Project\Tales-Of-Societies\front-end\node_modules\source-map\lib\source-node.js:87:24)
    at SourceMapSource.node (S:\Proffesional\Project\Tales-Of-Societies\front-end\node_modules\webpack-sources\lib\SourceMapSource.js:32:25)
    at ReplaceSource.node (S:\Proffesional\Project\Tales-Of-Societies\front-end\node_modules\webpack-sources\lib\ReplaceSource.js:82:27)
    at CachedSource.node (S:\Proffesional\Project\Tales-Of-Societies\front-end\node_modules\webpack-sources\lib\CachedSource.js:18:24)
    at S:\Proffesional\Project\Tales-Of-Societies\front-end\node_modules\webpack-sources\lib\ConcatSource.js:59:50
    at Array.map (<anonymous>)
    at ConcatSource.node (S:\Proffesional\Project\Tales-Of-Societies\front-end\node_modules\webpack-sources\lib\ConcatSource.js:58:63)
    at ConcatSource.proto.sourceAndMap (S:\Proffesional\Project\Tales-Of-Societies\front-end\node_modules\webpack-sources\lib\SourceAndMapMixin.js:29:18)
    at CachedSource.sourceAndMap (S:\Proffesional\Project\Tales-Of-Societies\front-end\node_modules\webpack-sources\lib\CachedSource.js:58:31)
    at getTaskForFile (S:\Proffesional\Project\Tales-Of-Societies\front-end\node_modules\webpack\lib\SourceMapDevToolPlugin.js:65:30)
    at S:\Proffesional\Project\Tales-Of-Societies\front-end\node_modules\webpack\lib\SourceMapDevToolPlugin.js:215:20
    at Array.forEach (<anonymous>)
    at S:\Proffesional\Project\Tales-Of-Societies\front-end\node_modules\webpack\lib\SourceMapDevToolPlugin.js:186:12
    at SyncHook.eval (eval at create (S:\Proffesional\Project\Tales-Of-Societies\front-end\node_modules\tapable\lib\HookCodeFactory.js:19:10), <anonymous>:7:1)
    at SyncHook.lazyCompileHook (S:\Proffesional\Project\Tales-Of-Societies\front-end\node_modules\tapable\lib\Hook.js:154:20)
    at S:\Proffesional\Project\Tales-Of-Societies\front-end\node_modules\webpack\lib\Compilation.js:1413:42
    at AsyncSeriesHook.eval [as callAsync] (eval at create (S:\Proffesional\Project\Tales-Of-Societies\front-end\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook (S:\Proffesional\Project\Tales-Of-Societies\front-end\node_modules\tapable\lib\Hook.js:154:20)
    at S:\Proffesional\Project\Tales-Of-Societies\front-end\node_modules\webpack\lib\Compilation.js:1409:36
    at AsyncSeriesHook.eval [as callAsync] (eval at create (S:\Proffesional\Project\Tales-Of-Societies\front-end\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook (S:\Proffesional\Project\Tales-Of-Societies\front-end\node_modules\tapable\lib\Hook.js:154:20)
    at S:\Proffesional\Project\Tales-Of-Societies\front-end\node_modules\webpack\lib\Compilation.js:1405:32

Stack trace:

Error: The following error was thrown by a plugin. We stopped running your tests because a plugin crashed. Please check your plugins file (`S:\Proffesional\Project\Tales-Of-Societies\front-end\cypress\plugins\index.js`)
    at Object.get (C:\Users\Catalin\AppData\Local\Cypress\Cache\6.2.0\Cypress\resources\app\packages\server\lib\errors.js:961:15)
    at EventEmitter.handleError (C:\Users\Catalin\AppData\Local\Cypress\Cache\6.2.0\Cypress\resources\app\packages\server\lib\plugins\index.js:159:20)
    at EventEmitter.emit (events.js:315:20)
    at ChildProcess.<anonymous> (C:\Users\Catalin\AppData\Local\Cypress\Cache\6.2.0\Cypress\resources\app\packages\server\lib\plugins\util.js:19:22)
    at ChildProcess.emit (events.js:315:20)
    at emit (internal/child_process.js:876:12)
    at processTicksAndRejections (internal/process/task_queues.js:85:21)

i am facing the same issue, any solution found? @AndreiCatalinN

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

7 participants