-
Notifications
You must be signed in to change notification settings - Fork 297
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
Behavior inconsistency with request
re: tough-cookie
integration
#183
Comments
Thanks for making it easy for me to reproduce the issue @ScottyMJacobson ! This one haunted me a while back already. When you use |
I just published |
Now I am trying to use [email protected] to generate cookiejar thanks a lot |
@frejus123 Could you post your code snippet to help me understand your situation? |
@frejus123 If you use the same code as shown in the README then most likely you have |
@analog-nico ├─┬ [email protected] I found I really have installed tough-cooke twice,then I delete one tough-cookie marked as (B).
` var cookie = new tough.Cookie({ resolveWithFullResponse: true, |
@frejus123 If you delete A instead of B then it should work. This then also resembles the packages hierarchy when you do a clean |
@analog-nico |
@frejus123 Excellent. I'll add a note to the README for people who experience the same issue as you just did. Happy coding! |
I am having the same problem as @ScottyMJacobson I am using exactly same code.
Any clue, I am using My code looks like this:
|
Like @kapilchokhawala, I started getting this error again (I'm not sure whether it was triggered by a new version of one of the relevant packages). This time, the error happened even when I used The solution over in this
|
I bumped into this problem, solved by downgrading packages for now:
(this was the wrong config, happened to work due to other unrelated things) |
@mfonsen after some poking around with versions, it looks like for me as well tough-cookie 2.3.4 (and the others) are the last version that I can get to work @analog-nico this appears to have broken the unit tests for this lib and |
I'm also getting the same error msg after upgrading from 2.3.4 to 2.4.2:
Actually, the problem seems to be in the
|
Same here with this
Yet, replacing the last 2 lines with: seems to solve this. 🤨 |
The problem is not solved yet. +-- [email protected] The Version Work for me. |
Instead of using tough-cookie, I am directly setting cookie in the options/header for the request-promise. It works for me. |
toString(). It's work for me |
Clean install, using the exact code from the example, and this still occurs for me |
i just fixed like this:
it worked. ^V^ |
Normally I'd try to dig more for an explanation, but I'm a bit confounded here. I'm doing some cookie construction / management by hand via
tough-cookie
to maintain sessions for my API calls, and it looks likerequest
andrequest-promise
are giving me two different behaviors, whererequest
works butrequest-promise
does not.The problematic code is as follows
Is it just a version/dependency thing? Am I just abusing the concept of cookie jars beyond repair?
From my package.json:
I'm leaving the
request.jar()
patch in for now, but I'd love to know what's going wrong exactlyThanks in advance,
Scotty
The text was updated successfully, but these errors were encountered: