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

Invalid Cookie or Invalid Crumb for options #736

Closed
mhozic opened this issue Feb 2, 2024 · 6 comments
Closed

Invalid Cookie or Invalid Crumb for options #736

mhozic opened this issue Feb 2, 2024 · 6 comments
Labels
bug Something isn't working released

Comments

@mhozic
Copy link

mhozic commented Feb 2, 2024

Bug Report

Describe the bug

When yahooFinance.options is called, "Invalid Cookie" or "Invalid Crumb" error is returned

Minimal Reproduction

const response = yahooFinance.options('AYX')
throws "Invalid Cookie" or "Invalid Crumb" error

Environment

Browser or Node: node
Node version (if applicable): 14.18.2
Npm version: 6.14.15
Library version: 2.9.0

Additional Context

/v6/finance/options/ endpoint doesn't produce this error
/v7/finance/options/ needs a crumb (needsCrumb: true)

@mhozic mhozic added the bug Something isn't working label Feb 2, 2024
@gadicc gadicc closed this as completed in 79e33d9 Feb 5, 2024
@gadicc
Copy link
Owner

gadicc commented Feb 5, 2024

Thanks, @mhozic, for the report and helpful context, which led to an easy quick for for this 🙏

This will be in the next release and there'll be an automated message here when that happens.

gadicc pushed a commit that referenced this issue Feb 5, 2024
## [2.9.1](v2.9.0...v2.9.1) (2024-02-05)

### Bug Fixes

* **options:** add { needsCrumb: true } (fixes [#736](#736)) ([79e33d9](79e33d9))
* **quoteSummary:** allow totalOtherIncomeExpenseNet null (fixes [#734](#734)) ([1d0d48e](1d0d48e))
* **quoteSummary:** moduleName s/search/quoteSummary/ fix ([bf58aa8](bf58aa8))
@gadicc
Copy link
Owner

gadicc commented Feb 5, 2024

🎉 This issue has been resolved in version 2.9.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@gadicc gadicc added the released label Feb 5, 2024
@samducker
Copy link

samducker commented Feb 22, 2024

Hi its working on restart of my server, but then seems to stop working within 10-20mins.

My server is based in US EAST. How can I force the cookie to renew on each request?

Is there a way to force cookie refresh if I get an error like this?

I am running a honojs server on railway with no serverless (its constantly running). Naturally storing the cookie in a volume, doesn't seem to make any sense if I'm needing to refresh the cookie.

@samducker
Copy link

cc: @gadicc

@gadicc
Copy link
Owner

gadicc commented Feb 29, 2024 via email

@samducker
Copy link

No worries thank you for this library and your amazing work @gadicc I felt bad to tag :D, but I have a client on my back.

In the meantime I introduced a caching solution on my end which has limited the impact of my problem. So no worries, enjoy the weekend.

Happy to follow up with my sentry logs if helpful.

p.s.

I am happy to submit a PR, if you can point me in the right direction also <3!

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

No branches or pull requests

3 participants