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

Process hangs when using async_UNSTABLE with an async cookie store #831

Closed
kwerdna19 opened this issue Mar 28, 2024 · 2 comments · Fixed by #874
Closed

Process hangs when using async_UNSTABLE with an async cookie store #831

kwerdna19 opened this issue Mar 28, 2024 · 2 comments · Fixed by #874
Assignees
Labels
bug Something isn't working stale

Comments

@kwerdna19
Copy link

Describe the bug

Hello, I know it is called async_UNSTABLE but it seems no matter what I try, I am unable to get an async cookie store to work properly. The process hangs indefinitely at the first promise encountered.

I think it is an issue withdeasync - which from my testing seems to be pretty broken when combined with async/await/promises in general.

Feel free to close the issue if you think it is more of a Node issue, but any help / ideas / working examples I can look at are appreciated.

To Reproduce

reproduction repo: https://github.com/kwerdna19/http-cookie-repro

Steps to reproduce the behavior:

git clone https://github.com/kwerdna19/http-cookie-repro
cd http-cookie-repro
npm install
npm run start

Expected behavior

Process should terminate and print number of cookies.

Code that reproduces the bug

It seems to be a problem with deasync internally :(

Environments

  • OS: macOS m1
  • Node.js version: I've tried 16, 18, and 20
		"deasync": "^0.1.29",
		"http-cookie-agent": "^6.0.1",
		"tough-cookie": "^4.1.3",
		"undici": "^6.10.2"
@kwerdna19 kwerdna19 added the bug Something isn't working label Mar 28, 2024
Copy link

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Apr 28, 2024
@3846masa
Copy link
Owner

3846masa commented May 2, 2024

Sorry for the late communication.

From my research, I found that deasync often hangups when used with Promise.

Therefore, it is very difficult to handle the async cookie store using the current implementation of http-cookie-agent.

In the next version, async_UNSTABLE will be removed and support for the async cookie store will be completely removed.

Thanks for your understanding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants