Phando / Streamdeck-Stonks

Streamdeck plugin stock ticker to watch your assets (market and crypto)
MIT License
25 stars 4 forks source link

Stonks stopped updating values #33

Closed RossComer closed 1 year ago

RossComer commented 1 year ago

The Stonks button stopped updating on my Stream Deck, stuck on old values from several days ago. I tried switching symbols and the new symbol appeared on the button but the values didn't update. I tried clicking Restore settings and also killing and restarting Steam Deck without success. I uninstalled and reinstalled the plugin and now I just get a green bird icon.

Any other things I can do to try to debug?

redler commented 1 year ago

I see that another stocks plugin has also stopped updating. Perhaps an API they both use has changed.

Phando commented 1 year ago

Thanks for looking, I will check things out next week.On May 5, 2023, at 9:20 AM, Ken Redler @.***> wrote: I see that another stocks plugin has also stopped updating. Perhaps an API they both use has changed.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

Knight1981 commented 1 year ago

I've tried this plugin today but it doesn't work. I've entered several symbols but it alsways shows me the green bird.

Phando commented 1 year ago

@Knight1981 Thanks for using the ticker. It seems the API was acting up last week. After a clean install (removing the plugin from the plugins folder on your machine) and reinstalling, does it work?

If not, can you please open the following URL on your machine and click the Stonks plugin? From there you will see the console output and hopefully there will be a bit of information there to help debug the plugin: http://127.0.0.1:23654

Phando commented 1 year ago

@RossComer If things are going sideways, you can always look at the plugin console. You will see a list of all your streamdeck plugins, click on stonks, not stonkspi (the property inspector) http://127.0.0.1:23654

RossComer commented 1 year ago

http://127.0.0.1:23654http://127.0.0.1:23654/ gives me error "127.0.0.1 refused to connect"

From: Joe @.> Sent: Monday, May 8, 2023 8:44 AM To: Phando/Streamdeck-Stonks @.> Cc: RossComer @.>; Mention @.> Subject: Re: [Phando/Streamdeck-Stonks] Stonks stopped updating values (Issue #33)

@RossComerhttps://github.com/RossComer If things are going sideways, you can always look at the plugin console. You will see a list of all your streamdeck plugins, click on stonks, not stonkspi (the property inspector) http://127.0.0.1:23654http://127.0.0.1:23654/

- Reply to this email directly, view it on GitHubhttps://github.com/Phando/Streamdeck-Stonks/issues/33#issuecomment-1538611103, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGAE4XL6RJFTBW2QC2G2UZ3XFEICVANCNFSM6AAAAAAXXICU7I. You are receiving this because you were mentioned.Message ID: @.**@.>>

redler commented 1 year ago

It looks like another stock ticker plugin author just commited a change that fixes the API issue. Might be helpful. https://github.com/shayne/stock-ticker-stream-deck-plugin/commit/292a967a7d13b15347f4273c5f96a4abc9e81a86

EDIT: Confirmed, he's fixed the issue in this commit for the @shayne plugin. I have it running on my device.

ctash-artera commented 1 year ago

http://127.0.0.1:23654http://127.0.0.1:23654/ gives me error "127.0.0.1 refused to connect"

Same for me

alexandrerocco commented 1 year ago

It looks like another stock ticker plugin author just commited a change that fixes the API issue. Might be helpful. shayne/stock-ticker-stream-deck-plugin@292a967

EDIT: Confirmed, he's fixed the issue in this commit for the @shayne plugin. I have it running on my device.

So this is fixed on the other plugin, right? Still needs to be fixed here?

Phando commented 1 year ago

Dang, let's try again. Make sure the streamdeck app is running. You can try http://localhost:23654.

My machine is working, but I am running from the development branch. Could one of you give it a try ( https://github.com/Phando/Streamdeck-Stonks/tree/development)? There is a bash build script that makes the plugin and moves it to the right folder. The paths and commands are for mac. If you are on windows you will need to make a few changes.

On Mon, May 8, 2023 at 9:12 AM RossComer @.***> wrote:

http://127.0.0.1:23654http://127.0.0.1:23654/ gives me error "127.0.0.1 refused to connect"

From: Joe @.> Sent: Monday, May 8, 2023 8:44 AM To: Phando/Streamdeck-Stonks @.> Cc: RossComer @.>; Mention @.> Subject: Re: [Phando/Streamdeck-Stonks] Stonks stopped updating values (Issue #33)

@RossComerhttps://github.com/RossComer If things are going sideways, you can always look at the plugin console. You will see a list of all your streamdeck plugins, click on stonks, not stonkspi (the property inspector) http://127.0.0.1:23654< http://127.0.0.1:23654/>

- Reply to this email directly, view it on GitHub< https://github.com/Phando/Streamdeck-Stonks/issues/33#issuecomment-1538611103>, or unsubscribe< https://github.com/notifications/unsubscribe-auth/AGAE4XL6RJFTBW2QC2G2UZ3XFEICVANCNFSM6AAAAAAXXICU7I

. You are receiving this because you were mentioned.Message ID: @.**@.>>

— Reply to this email directly, view it on GitHub https://github.com/Phando/Streamdeck-Stonks/issues/33#issuecomment-1538666724, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABUXMGE4A6REKO4XXTSUZ3XFELORANCNFSM6AAAAAAXXICU7I . You are receiving this because you commented.Message ID: @.***>

Phando commented 1 year ago

Try http://127.0.0.1:23654

On Mon, May 8, 2023 at 7:45 PM ctash-artera @.***> wrote:

http://127.0.0.1:23654http://127.0.0.1:23654/ gives me error "127.0.0.1 refused to connect"

Same for me

— Reply to this email directly, view it on GitHub https://github.com/Phando/Streamdeck-Stonks/issues/33#issuecomment-1539079736, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABUXME63QOMO276LXIU4MDXFGVVZANCNFSM6AAAAAAXXICU7I . You are receiving this because you commented.Message ID: @.***>

Knight1981 commented 1 year ago

Sorry, I'm not sure what I've to do know to get it work. This URL http://127.0.0.1:23654/ doesn't work for me (Error: Connection failed).

joaovgsantos commented 1 year ago

hello

You need to activate Debug on streamdeck (https://developer.elgato.com/documentation/stream-deck/sdk/create-your-own-plugin/#debugging-your-javascript-plugin)

the issue is that it seems that now yahoo API needs a cookie beyond the crum

image
Phando commented 1 year ago

Thank you for the additional information on debugging!I just added the crumb, and now a cookie. I feel our days with free Yahoo might be numbered.On May 9, 2023, at 7:37 AM, João Santos @.***> wrote: hello You need to activate Debug on streamdeck (https://developer.elgato.com/documentation/stream-deck/sdk/create-your-own-plugin/#debugging-your-javascript-plugin) the issue is that it seems that now yahoo API needs a cookie beyond the crum

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

alexandrerocco commented 1 year ago

I got some pink rectangles. Probably I am missing something on the testing setup.

Can one of you please give this a try: https://github.com/Phando/Streamdeck-Stonks/releases/tag/v1.1.11

RossComer commented 1 year ago

With that build I got: Error ReceiveSymbolError

Note: I'm not using a special (debug) version / setting.

From: Alexandre Rocco @.> Sent: Tuesday, May 9, 2023 11:04 AM To: Phando/Streamdeck-Stonks @.> Cc: RossComer @.>; Mention @.> Subject: Re: [Phando/Streamdeck-Stonks] Stonks stopped updating values (Issue #33)

I got some pink rectangles. Probably I am missing something on the testing setup.

Can one of you please give this a try: https://github.com/Phando/Streamdeck-Stonks/releases/tag/v1.1.11

- Reply to this email directly, view it on GitHubhttps://github.com/Phando/Streamdeck-Stonks/issues/33#issuecomment-1540629264, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGAE4XONXUTE3SLC2KXBTCTXFKBI7ANCNFSM6AAAAAAXXICU7I. You are receiving this because you were mentioned.Message ID: @.***>

ctash-artera commented 1 year ago

Was able to hit the localhost URL once I enabled debug mode

common.js:357 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'hasOwnProperty')
    at StonksAction.renderError (common.js:357:22)
    at StonksAction.onDidReceiveChartError (stonksAction.js:344:14)
    at stonksAction.js:180:71
    at common.js:545:55
    at Set.forEach (<anonymous>)
    at Object.pub (common.js:545:41)
    at Object.emit (common.js:530:81)
    at dataManager.js:188:11
    at Array.forEach (<anonymous>)
    at DataManager.handleError (dataManager.js:186:32)

GET request:

Request URL: https://query1.finance.yahoo.com/v7/finance/quote?lang=en-US&region=EU&corsDomain=finance.yahoo.com&fields=symbol,currency,marketState,preMarketPrice,preMarketVolume,preMarketChange,preMarketChangePercent,regularMarketDayHigh,regularMarketDayLow,regularMarketPrice,regularMarketVolume,regularMarketChange,regularMarketChangePercent,regularMarketOpen,regularMarketPreviousClose,regularMarketOpen,postMarketPrice,postMarketVolume,postMarketChange,postMarketChangePercent&symbols=TSLA,NVDA&crumb=
Request Method: GET
Status Code: 401 
Remote Address: xxx REDACTED xxx
Referrer Policy: strict-origin-when-cross-origin

Request Headers:

:authority: query1.finance.yahoo.com
:method: GET
:path: /v7/finance/quote?lang=en-US&region=EU&corsDomain=finance.yahoo.com&fields=symbol,currency,marketState,preMarketPrice,preMarketVolume,preMarketChange,preMarketChangePercent,regularMarketDayHigh,regularMarketDayLow,regularMarketPrice,regularMarketVolume,regularMarketChange,regularMarketChangePercent,regularMarketOpen,regularMarketPreviousClose,regularMarketOpen,postMarketPrice,postMarketVolume,postMarketChange,postMarketChangePercent&symbols=TSLA,NVDA&crumb=
:scheme: https
accept: */*
accept-encoding: gzip, deflate, br
sec-fetch-dest: empty
sec-fetch-mode: cors
sec-fetch-site: cross-site
user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/6.4.2 Chrome/102.0.5005.177 Safari/537.36

Response Headers:

age: 0
cache-control: max-age=0, private
content-length: 90
content-type: application/json;charset=utf-8
date: Tue, 09 May 2023 19:31:25 GMT
expect-ct: max-age=31536000, report-uri="http://csp.yahoo.com/beacon/csp?src=yahoocom-expect-ct-report-only"
expires: -1
referrer-policy: no-referrer-when-downgrade
server: ATS
strict-transport-security: max-age=31536000
vary: Origin
x-content-type-options: nosniff
x-envoy-decorator-operation: finance-quote-api--mtls-production-bf1.finance-k8s.svc.yahoo.local:4080/*
x-envoy-upstream-service-time: 1
x-frame-options: SAMEORIGIN
x-request-id: xxx REDACTED xxx
x-xss-protection: 1; mode=block
x-yahoo-request-id: 25hagvhi5l7sd
y-rid: 25hagvhi5l7
Phando commented 1 year ago

After changing networks, I am able to recreate the error. By changing the way the headers were handled I was able to see values again.

@RossComer @ctash-artera I updated the v1.1.11 release. Can you please give it another go?

baspeters commented 1 year ago

Experienced the same issue.

I've tested v1.1.11 with debugging enabled. Unfortunately, this release doesn't fix the issue for me.

Icon shows "Error: ReceiveSymbolError" upon refresh

GET request:

https://query1.finance.yahoo.com/v7/finance/quote?lang=en-US&region=EU&corsDomain=finance.yahoo.com&fields=symbol,currency,marketState,preMarketPrice,preMarketVolume,preMarketChange,preMarketChangePercent,regularMarketDayHigh,regularMarketDayLow,regularMarketPrice,regularMarketVolume,regularMarketChange,regularMarketChangePercent,regularMarketOpen,regularMarketPreviousClose,regularMarketOpen,postMarketPrice,postMarketVolume,postMarketChange,postMarketChangePercent&symbols=BTC-EUR&crumb=

GET headers:

authority: query1.finance.yahoo.com
accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
accept-language: en-US,en;q=0.5
sec-fetch-dest: empty
sec-fetch-mode: cors
sec-fetch-site: cross-site
upgrade-insecure-requests: 1
user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/6.4.2 Chrome/102.0.5005.177 Safari/537.36

Response (HTTP 401):

{"finance":{"result":null,"error":{"code":"Unauthorized","description":"Invalid Cookie"}}}
v90sta commented 1 year ago

I see that another stocks plugin has also stopped updating. Perhaps an API they both use has changed.

You mean Stocks, yeah mine reverted to a default screen, uninstalled, reinstalled yada yada, nothing working

ctash-artera commented 1 year ago

I deleted my buttons, uninstalled 1.1.10, installed 1.1.11, added a button... still no go.

Phando commented 1 year ago

Still no fix. The crumb mechanism stopped working. I even set up a proxy server and no luck. If anyone can set up a jsfiddle or postman with a working example it would be amazing!

baspeters commented 1 year ago

@Phando can you try modifying the "v7" part to "v6"? I've read that reverting to that version might solve the crumb issues.

Phando commented 1 year ago

@baspeters Thank you for the info! I just did a quick test and changing the version got my values back. The charts are going to need a little more work. Lets hope this is the fix to get back in action.

Phando commented 1 year ago

Sticking with v7 for now because it has a lot more data that the v6 feed. The v10 API looks awesome but you have to look up stocks one at a time. That might run into API limits.

@baspeters @ctash-artera can you please try uninstalling and going with https://github.com/Phando/Streamdeck-Stonks/releases/tag/v1.1.12

Redirts commented 1 year ago

Hi @Phando Just tried v1.1.12 and I still have the same issues (Error -> ReceiveSymbolError) and inside the widget options if I click on the Yahoo Finance link I get ERR_FILE_NOT_FOUND

Phando commented 1 year ago

Can you give v1.1.14 a try, if this doesn't work I will move to the v6 API.

joaovgsantos commented 1 year ago

Can you give v1.1.14 a try, if this doesn't work I will move to the v6 API.

same:

{"finance":{"result":null,"error":{"code":"Unauthorized","description":"Invalid Cookie"}}}

Phando commented 1 year ago

Moved to v6... @joaovgsantos can you try the release again?

valkenrath commented 1 year ago

v1.1.14 works, thanks!

Phando commented 1 year ago

Thanks for testing. I’ll let elgato know to push the latest.

joaovgsantos commented 1 year ago

Moved to v6... @joaovgsantos can you try the release again?

Is there any way to install the same version again without uninstalling the previous one and loosing all the buttons? It says that I can't install it because it's already installed, I've tried to install a previous one and it didn't work either :( would be to hard to create 1.1.15 instead?

thank you for all you work :)

lestmak commented 1 year ago

v1.1.14 works for me too

hippoit commented 1 year ago

All working again here, good work!

baspeters commented 1 year ago

Good job @Phando, v1.1.14 is working nicely! Thanks for all the hard work, much appreciated 👍

RossComer commented 1 year ago

Thanks for getting this working again!

From: Bas Peters @.> Sent: Friday, May 19, 2023 1:18 AM To: Phando/Streamdeck-Stonks @.> Cc: RossComer @.>; Mention @.> Subject: Re: [Phando/Streamdeck-Stonks] Stonks stopped updating values (Issue #33)

Good job @Phandohttps://github.com/Phando, v1.1.14 is working nicely! Thanks for all the hard work, much appreciated 👍

— Reply to this email directly, view it on GitHubhttps://github.com/Phando/Streamdeck-Stonks/issues/33#issuecomment-1554215149, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGAE4XNSENCZ65KWNZ7D3V3XG4UDFANCNFSM6AAAAAAXXICU7I. You are receiving this because you were mentioned.Message ID: @.***>

Phando commented 1 year ago

Fixed in v1.1.14 Thank you for your patience

joaovgsantos commented 1 year ago

Hi

v6 is returning 404 for me 🤔

baspeters commented 1 year ago

Yahoo seems to have disabled the v6 endpoint. Not clear if this is temporary or permanent.

Phando commented 1 year ago

Looking into it…On May 24, 2023, at 2:35 AM, Bas Peters @.***> wrote: Yahoo seems to have disabled the v6 endpoint. Not clear if this is temporary or permanent.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you modified the open/close state.Message ID: @.***>

lestmak commented 1 year ago

Sorry to hear Yahoo have broken it again. Appreciate your efforts.

Difference this time is that it shows "Error ReceiveSymbol@" instead of an eagle.

baspeters commented 1 year ago

Yahoo seems to have disabled the v6 endpoint. Not clear if this is temporary or permanent.

It seems that v1.1.14 is working again, at least for now. For the v7 endpoint, Yahoo has updated its JSON error message to include this link: https://bit.ly/yahoo-finance-api-feedback

This indicates that Yahoo is further restricting and disabling programmatic access to this finance API unfortunately.