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

Yahoo Finance stops working #136

Open
seg-on opened this issue Oct 28, 2024 · 31 comments
Open

Yahoo Finance stops working #136

seg-on opened this issue Oct 28, 2024 · 31 comments

Comments

@seg-on
Copy link

seg-on commented Oct 28, 2024

Hi,
It seems that after updating HA to 2024.10.4, Yahoo Finance stops working.
I've tried rebooting HA, rebooting PC but it doesn't help.

@iprak
Copy link
Owner

iprak commented Oct 29, 2024

I need more info.

You can also enable debug level logging to capture more data

  logs:
    custom_components.yahoofinance: debug

@seg-on
Copy link
Author

seg-on commented Oct 29, 2024

Hi,
you mean this?

2024-10-29 10:20:23.636 ERROR (MainThread) [custom_components.yahoofinance.coordinator] Timed out getting crumb. 
2024-10-29 10:20:23.637 WARNING (MainThread) [custom_components.yahoofinance] Unable to get crumb, re-trying in 15 seconds
2024-10-29 10:20:53.640 ERROR (MainThread) [custom_components.yahoofinance.coordinator] Timed out getting crumb. 
2024-10-29 10:20:53.641 WARNING (MainThread) [custom_components.yahoofinance] Unable to get crumb, re-trying in 15 seconds
2024-10-29 10:21:23.645 ERROR (MainThread) [custom_components.yahoofinance.coordinator] Timed out getting crumb. 
2024-10-29 10:21:23.645 WARNING (MainThread) [custom_components.yahoofinance] Unable to get crumb, re-trying in 15 seconds
2024-10-29 10:21:53.649 ERROR (MainThread) [custom_components.yahoofinance.coordinator] Timed out getting crumb. 
2024-10-29 10:21:53.649 WARNING (MainThread) [custom_components.yahoofinance] Unable to get crumb, re-trying in 15 seconds
2024-10-29 10:22:23.654 ERROR (MainThread) [custom_components.yahoofinance.coordinator] Timed out getting crumb. 
2024-10-29 10:22:23.654 WARNING (MainThread) [custom_components.yahoofinance] Unable to get crumb, re-trying in 15 seconds
2024-10-29 10:22:53.659 ERROR (MainThread) [custom_components.yahoofinance.coordinator] Timed out getting crumb. 
2024-10-29 10:22:53.660 WARNING (MainThread) [custom_components.yahoofinance] Unable to get crumb, re-trying in 15 seconds
2024-10-29 10:23:23.662 ERROR (MainThread) [custom_components.yahoofinance.coordinator] Timed out getting crumb. 
2024-10-29 10:23:23.663 WARNING (MainThread) [custom_components.yahoofinance] Unable to get crumb, re-trying in 15 seconds
2024-10-29 10:23:53.665 ERROR (MainThread) [custom_components.yahoofinance.coordinator] Timed out getting crumb. 
2024-10-29 10:23:53.665 WARNING (MainThread) [custom_components.yahoofinance] Unable to get crumb, re-trying in 15 seconds
2024-10-29 10:24:23.669 ERROR (MainThread) [custom_components.yahoofinance.coordinator] Timed out getting crumb. 
2024-10-29 10:24:23.669 WARNING (MainThread) [custom_components.yahoofinance] Unable to get crumb, re-trying in 15 seconds
2024-10-29 10:24:38.671 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Navigating to base Yahoo page

@iprak
Copy link
Owner

iprak commented Oct 29, 2024

Yes, this has happened when the Yahoo website returns different data. Usually due to GDPR consent. What is your location and the url of the Yahoo website (if opened in a browser) ?

@seg-on
Copy link
Author

seg-on commented Oct 29, 2024

Yes, I'm from Slovakia (part of EU). I don't understand what you mean by Yahoo website URL? When I type finance.yahoo.com I get https://finance.yahoo.com/.

@iprak
Copy link
Owner

iprak commented Oct 29, 2024

This is most likely due to something specific in Yahoo content for that region. Seem other folks from EU region have encountered this (#125). The extension tries to automatically accept the GDPR consent and maybe that is not working. Not sure at this point. This should not be related to 2024.10.4 release.

@seg-on
Copy link
Author

seg-on commented Oct 29, 2024

It is strange, but now at 18:11 it has started to work.
I'll be watching that.

@vellanix
Copy link

Also here (Italy) doesnt work from yesterday afternoon.

Same error: Unable to get crumb

@rummepa
Copy link

rummepa commented Oct 30, 2024

same thing here in Belgium:

Logger: custom_components.yahoofinance
Source: custom_components/yahoofinance/init.py:241
integration: Yahoo Finance (documentation, issues)
First occurred: October 29, 2024 at 21:03:19 (3155 occurrences)
Last logged: 10:17:09
Unable to get crumb, re-trying in 15 seconds

@jan-jeroen
Copy link

jan-jeroen commented Oct 30, 2024

Same here in the Netherlands since last weekend. Unable to get crumb.

@iprak
Copy link
Owner

iprak commented Oct 31, 2024

The release 1.2.11 should help.

@jan-jeroen
Copy link

The release 1.2.11 should help.

Confirmed! Many thanks

@seg-on
Copy link
Author

seg-on commented Oct 31, 2024

I'm sad. I updated to this version and after that it stopped working :(

@iprak
Copy link
Owner

iprak commented Oct 31, 2024

Can you share debug log?

@seg-on
Copy link
Author

seg-on commented Oct 31, 2024

here you are:

2024-10-31 20:39:45.002 WARNING (MainThread) [custom_components.yahoofinance.coordinator] Error obtaining data, retrying in 20 seconds
2024-10-31 20:40:15.002 ERROR (MainThread) [custom_components.yahoofinance.coordinator] Timed out getting data from https://query1.finance.yahoo.com/v7/finance/quote?symbols=EURUSD=X,GC=F,ES=F,MNQ=F,^VIX,CL=F,TTF=F,^GSPC,^NDX,SXR8.DE,BTC-USD,BTC-EUR,XMR-EUR&crumb=FKbLQWwD20B
2024-10-31 20:40:15.002 WARNING (MainThread) [custom_components.yahoofinance.coordinator] Error obtaining data, retrying in 20 seconds
2024-10-31 20:40:45.002 ERROR (MainThread) [custom_components.yahoofinance.coordinator] Timed out getting data from https://query1.finance.yahoo.com/v7/finance/quote?symbols=EURUSD=X,GC=F,ES=F,MNQ=F,^VIX,CL=F,TTF=F,^GSPC,^NDX,SXR8.DE,BTC-USD,BTC-EUR,XMR-EUR&crumb=FKbLQWwD20B
2024-10-31 20:40:45.003 WARNING (MainThread) [custom_components.yahoofinance.coordinator] Error obtaining data, retrying in 20 seconds
2024-10-31 20:41:15.002 ERROR (MainThread) [custom_components.yahoofinance.coordinator] Timed out getting data from https://query1.finance.yahoo.com/v7/finance/quote?symbols=EURUSD=X,GC=F,ES=F,MNQ=F,^VIX,CL=F,TTF=F,^GSPC,^NDX,SXR8.DE,BTC-USD,BTC-EUR,XMR-EUR&crumb=FKbLQWwD20B
2024-10-31 20:41:15.002 WARNING (MainThread) [custom_components.yahoofinance.coordinator] Error obtaining data, retrying in 20 seconds
2024-10-31 20:41:45.002 ERROR (MainThread) [custom_components.yahoofinance.coordinator] Timed out getting data from https://query1.finance.yahoo.com/v7/finance/quote?symbols=EURUSD=X,GC=F,ES=F,MNQ=F,^VIX,CL=F,TTF=F,^GSPC,^NDX,SXR8.DE,BTC-USD,BTC-EUR,XMR-EUR&crumb=FKbLQWwD20B
2024-10-31 20:41:45.002 WARNING (MainThread) [custom_components.yahoofinance.coordinator] Error obtaining data, retrying in 20 seconds
2024-10-31 20:42:15.002 ERROR (MainThread) [custom_components.yahoofinance.coordinator] Timed out getting data from https://query1.finance.yahoo.com/v7/finance/quote?symbols=EURUSD=X,GC=F,ES=F,MNQ=F,^VIX,CL=F,TTF=F,^GSPC,^NDX,SXR8.DE,BTC-USD,BTC-EUR,XMR-EUR&crumb=FKbLQWwD20B
2024-10-31 20:42:15.003 WARNING (MainThread) [custom_components.yahoofinance.coordinator] Error obtaining data, retrying in 20 seconds
2024-10-31 20:42:45.002 ERROR (MainThread) [custom_components.yahoofinance.coordinator] Timed out getting data from https://query1.finance.yahoo.com/v7/finance/quote?symbols=EURUSD=X,GC=F,ES=F,MNQ=F,^VIX,CL=F,TTF=F,^GSPC,^NDX,SXR8.DE,BTC-USD,BTC-EUR,XMR-EUR&crumb=FKbLQWwD20B
2024-10-31 20:42:45.003 WARNING (MainThread) [custom_components.yahoofinance.coordinator] Error obtaining data, retrying in 20 seconds
2024-10-31 20:42:47.202 ERROR (MainThread) [custom_components.weatherdotcom.coordinator] Error fetching Weather.com data: TimeoutError()
2024-10-31 20:43:05.001 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Requesting data from 'https://query1.finance.yahoo.com/v7/finance/quote?symbols=EURUSD=X,GC=F,ES=F,MNQ=F,^VIX,CL=F,TTF=F,^GSPC,^NDX,SXR8.DE,BTC-USD,BTC-EUR,XMR-EUR&crumb=FKbLQWwD20B'

@iprak
Copy link
Owner

iprak commented Oct 31, 2024

@seg-on I think you have some other problem. The log indicates similar failure for weatherdotcom.coordinator data fetch.

Everything seems to check out from my end when using VPN to fake European source.

@jan-jeroen
Copy link

My problem is back since yesterday, the new version worked for about a day.

2024-11-01 14:04:18.872 WARNING (MainThread) [custom_components.yahoofinance] Unable to get crumb, re-trying in 15 seconds
2024-11-01 14:04:33.966 WARNING (MainThread) [custom_components.yahoofinance] Unable to get crumb, re-trying in 15 seconds
2024-11-01 14:04:49.072 WARNING (MainThread) [custom_components.yahoofinance] Unable to get crumb, re-trying in 15 seconds

@iprak
Copy link
Owner

iprak commented Nov 2, 2024

I am not hopeful of addressing this issue. I am not able to replicate this over VPN. But I have pushed out another release with more logging.

@jan-jeroen
Copy link

Installed your new release. This is what I get:

2024-11-02 10:01:41.962 ERROR (MainThread) [custom_components.yahoofinance.coordinator] Crumb request responded with status=404
2024-11-02 10:01:41.963 WARNING (MainThread) [custom_components.yahoofinance] Unable to get crumb, re-trying in 15 seconds
2024-11-02 10:01:57.137 ERROR (MainThread) [custom_components.yahoofinance.coordinator] Crumb request responded with status=404
2024-11-02 10:01:57.138 WARNING (MainThread) [custom_components.yahoofinance] Unable to get crumb, re-trying in 15 seconds

@seg-on
Copy link
Author

seg-on commented Nov 2, 2024

Yahoo Finance ver: 1.2.12

2024-11-02 13:03:30.003 ERROR (MainThread) [custom_components.yahoofinance.coordinator] Timed out getting data from https://query1.finance.yahoo.com/v7/finance/quote?symbols=EURUSD=X,GC=F,ES=F,MNQ=F,^VIX,CL=F,TTF=F,^GSPC,^NDX,SXR8.DE,BTC-USD,BTC-EUR,XMR-EUR&crumb=N1QwNF/tiD5
2024-11-02 13:03:30.004 WARNING (MainThread) [custom_components.yahoofinance.coordinator] Error obtaining data, retrying in 20 seconds

@iprak
Copy link
Owner

iprak commented Nov 2, 2024

I have attempted one more fix. It has been trouble some to even replicate this issue which could be due to how my VPN connection is directing traffic or perhaps I am getting the same remote address.

Sorry but I won't be able to look into this. One can however fork the project and implement/support this elsewhere.

It was not my intention for the integration to be completely usable outside US. It would be difficult to continuously bypass GDPS restrictions to account for changes. This will also definitely make it not acceptable as a core integration in HomeAssistant which is what I eventually want it to be.

@seg-on
Copy link
Author

seg-on commented Nov 6, 2024

Hi @iprak,
I found out that API v6 is working for me (I am using a AppScript in Google Sheets that use this API to get stock data).
Can you look if there is the big difference between V7 you are using and V6? If it is not possible to port to V6?
https://query2.finance.yahoo.com/v6/finance/options/
https://query2.finance.yahoo.com/v6/finance/options/aapl

@iprak
Copy link
Owner

iprak commented Nov 7, 2024

The Yahoo end points are undocumented, this integration is based on my trial an error. v7 url is what is used when accessing finance.yahoo.com from US location, so I cannot tell how is v6 different. One would think that v7 is newer.

I get 404 when using v6
Received status 404 (Not Found HTTP 404 Not Found) for https://query1.finance.yahoo.com/v6/finance/quote?symbols=ISTNX,GBPUSD=X,IDFCBANK.BO,BABA,^SSMI,EMIM.L,AAPL,USDINR=X,ADYEN.AS&crumb=hLovZgIrG10

Something like this happened in May 2023 (#96) where v6 version was successful temporarily. You can locally change to use v6 but I won't be able to make that part of the integration.

@nexusis7
Copy link

This has stopped working this mornin.

2024-11-19 10:03:30.129 ERROR (MainThread) [custom_components.yahoofinance.coordinator] Received status 401 (Unauthorized User is unable to access this feature - https://bit.ly/yahoo-finance-api-feedback

Says API has been disabled

website gives the following message

{"finance":{"result":null,"error":{"code":"Unauthorized","description":"User is unable to access this feature - https://bit.ly/yahoo-finance-api-feedback"}}}

@applegeeks
Copy link

This has stopped working this mornin.

2024-11-19 10:03:30.129 ERROR (MainThread) [custom_components.yahoofinance.coordinator] Received status 401 (Unauthorized User is unable to access this feature - https://bit.ly/yahoo-finance-api-feedback

Says API has been disabled

website gives the following message

{"finance":{"result":null,"error":{"code":"Unauthorized","description":"User is unable to access this feature - https://bit.ly/yahoo-finance-api-feedback"}}}

seems to be up and running again.

@nexusis7
Copy link

yes can confirm it’s working again

@iprak
Copy link
Owner

iprak commented Nov 20, 2024

This seems to be more of a Yahoo end point issue. What country is this?

@nexusis7
Copy link

I’m in Canada.

@iprak
Copy link
Owner

iprak commented Nov 20, 2024

I will give it a test using VPN.

@applegeeks
Copy link

I’m in Canada.

Australia here.

@vPotusFlotus
Copy link

vPotusFlotus commented Nov 20, 2024

This has stopped working this mornin.

2024-11-19 10:03:30.129 ERROR (MainThread) [custom_components.yahoofinance.coordinator] Received status 401 (Unauthorized User is unable to access this feature - https://bit.ly/yahoo-finance-api-feedback

Says API has been disabled

website gives the following message

{"finance":{"result":null,"error":{"code":"Unauthorized","description":"User is unable to access this feature - https://bit.ly/yahoo-finance-api-feedback"}}}

I receive the same error as stated above (from Belgium). Seems that API Access to Yahoo Finance Quotes might be disabled?
image

Seems they potentially want to make it a paid service:

image

At least that's what the URL states from the Error Message: https://bit.ly/yahoo-finance-api-feedback

@spacelama
Copy link

Might be an idea to change the wording on the readme away from "This integration will most only work in US mainland. GDPR requirements seems to be causing requests to fail". If it is a GDPR problem, it's more likely it'll work everywhere but Europe, as opposed to only working in the US.

It is currently working in Australia. But I briefly rolled back to 1.2.10 when it appeared it wasn't working (actually a config I broke at the same time), then noticed the wording indicating a change and problem in 1.2.12, thus indicating to me that I'd have more luck with the version I had from my backups.

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

9 participants