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

SIGNREQUEST output in Jest #178

Open
lvl99 opened this issue Sep 27, 2021 · 5 comments
Open

SIGNREQUEST output in Jest #178

lvl99 opened this issue Sep 27, 2021 · 5 comments

Comments

@lvl99
Copy link

lvl99 commented Sep 27, 2021

I'm using sftp-promises which uses this library as a dependency, and I'm finding that Google Cloud Build (GCB) is breaking when it is trying to run tests via Jest:

Step #2: Jest has detected the following 2 open handles potentially keeping Jest from exiting:
Step #2: 
Step #2:   ●  SIGNREQUEST
Step #2: 
Step #2:     > 1 | const SFTPClient = require("sftp-promises");
Step #2:         | ^
Step #2: 
Step #2:       at node_modules/ssh2-streams/lib/constants.js:15:20
Step #2:       at Object.<anonymous> (node_modules/ssh2-streams/lib/constants.js:22:3)
Step #2:       at Object.<anonymous> (node_modules/ssh2-streams/lib/keyParser.js:23:17)
Step #2:       at Object.<anonymous> (node_modules/ssh2-streams/lib/utils.js:14:13)
Step #2:       at Object.<anonymous> (node_modules/ssh2-streams/lib/sftp.js:13:18)
Step #2:       at Object.<anonymous> (node_modules/ssh2-streams/index.js:2:15)
Step #2:       at Object.<anonymous> (node_modules/ssh2/lib/client.js:8:20)
Step #2:       at Object.<anonymous> (node_modules/sftp-promises/index.js:1:96)
Step #2:       at Object.<anonymous> (src/utils/sftp.js:1:1)

When I look at line 15, I can see that there's some attempt to validate a crypto algo, potentially to test to see if the local environment supports it. I'm unsure why it breaks on GCB (using node:latest), but it's been a hair-pulling experience trying to debug.

Has anyone else come across this issue?

@mscdex
Copy link
Owner

mscdex commented Sep 27, 2021

Since that library is not using ssh2-streams directly, I would suggest having the sftp-promises maintainer upgrade their dependency on ssh2 first and if the issue persists, lodge an issue on the ssh2 repo instead.

@lvl99
Copy link
Author

lvl99 commented Sep 28, 2021

I just refactored to use ssh2-sftp-client and I'm getting the same issue due another issue with ssh2. Thanks for pointing that out.

@ArnoSoontjens
Copy link

@lvl99 Running into the same issue here. Did you figure it out?

@lvl99
Copy link
Author

lvl99 commented Jan 26, 2022

@ArnoSoontjens can't remember how I solved this, sorry -- my GCB project is still broken, but for another reason!

I may have tried to refactor so that I didn't import any internal module that uses the SFTP dependency in my tests. Otherwise, the last thing I remember updating was changing internal SFTP module to use bottleneck to prevent too many concurrent sessions being open.

I also have a vague feeling SIGNREQUEST might be a package or something that needs explicit consent to do something? Wish I could remember!

@cristianrgreco
Copy link

Also seeing the same issue, Jest failing to exit due to open handle at ssh2 constants: testcontainers/testcontainers-node#346

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

4 participants