-
Notifications
You must be signed in to change notification settings - Fork 63
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
Cookie/crumb issues after about 10-20 minutes #741
Comments
Thanks @samducker for your reply. Glad you were able to mitigate the impact somewhat, but yes, let's try solve this properly. Yes, the full logs would be great... maybe it will give me an indication of where things are getting stuck. In the meantime, going to share a bit about the insides in case you want to take a look too. The relevant code is in src/lib/getCrumb.ts, and actually on L36-40 we have: if (crumb && !noCache) {
// If we still have a valid (non-expired) cookie, return the existing crumb.
const existingCookies = await cookieJar.getCookies(url, { expire: true });
if (existingCookies.length) return crumb;
} Unfortunately I guess I really need to set up a long running process to track this properly, and will do that when I get the chance. However, I'd love to give you more options in the meantime. You could also try manually clearing the cookieJar, someting like: const yf2 = require('yahoo-finance2').default;
setInterval(() => {
yf2._opts.cookieJar.removeAllCookiesSync();
}, 60_000 * 10); and see how that goes, too. Let's keep in touch. |
Not sure if below error is related to the above. Requesting summary data on a fresh started server results in an invalid crumb. I did not yet try the suggestion to empty the cookieJar.
Results in below error.
|
Yeah for me too this issue has been live today |
I mitigated the issue by moving to serverless. Meaning essentially a new server / cookie would spawn and also adding a cache infront of my api meaning I made less requests and if a request failed I would still be able to return the previous fetched result. |
Hi, all. Bad news, I'm afraid. Please see #764 for more info and for our official stance. |
@gadicc I believe this issue can be closed now given this fix got released. No? |
Thanks, @watadarkstar! As much as I'd love to close this, there are two different issues here. The original issue is an issue with cookies on long running processes. The OP moved over to serverless so there hasn't been much further movement on this... I'd love to leave the issue open in case anyone notices this and can provide more input (or if I eventually ever have time to do long running debug sessions 😅). Then there was the more recent crumb issue of last week which through the usual magic of open source collaboration, we managed to solve :) But that issue is newer than the original issue here, even though it was related. Nevertheless, thanks for chiming in. I admit the multitude of issues are a bit overwhelming for me so I do appreciate any help in getting some closed! 🙏 😁 |
@gadicc i get this issue after several requests ( sometimes just 1 or 2 ) and with several delay intervals in between if anyone can help ? Error: No set-cookie header on collectConsentSubmitResponse, please report. |
Originally posted by @samducker in #736 (comment)
with followup:
The text was updated successfully, but these errors were encountered: