thess / MMM-MktIndex

MagicMirror module for displaying market indicies using (free) Yahoo Finance API
MIT License
4 stars 2 forks source link

No quotes and errors after reinstallation #1

Closed frankturban closed 3 months ago

frankturban commented 2 years ago

Hello everyone,

my mirror has not shown any rates for two days now. After uninstalling and reinstalling, the following error messages come up (screenshot):

Is there already a solution? Thanks to all...

image

thess commented 2 years ago

I guess since my old installation keeps on running I didn't notice this problem. I'll check it out and post a fix in a bit. (or a day or 2).

thess commented 2 years ago

@frankturban - It looks like these warnings are not the cause of the problem you are having. It is true that request is no longer supported and is being phased out however, it is still working OK. I would check any of the MM logs available (I use pm2) to see if the API queries are failing for you.

I will be updating MMM-MktIndex to use node-fetch instead of request, but that is not the problem at the moment.

frankturban commented 2 years ago

@thess Thank you for caring. I hope it's that, otherwise I'll have to keep looking. One more question: is there a possibility to display currency rates with four decimal places?

frankturban commented 2 years ago

@thess Found out, how to log... /home/pi/.pm2/logs/MagicMirror-error.log last 15 lines: 0|MagicMir | at emitErrorNT (internal/streams/destroy.js:106:8) 0|MagicMir | at emitErrorCloseNT (internal/streams/destroy.js:74:3) 0|MagicMir | at processTicksAndRejections (internal/process/task_queues.js:80:21) { 0|MagicMir | type: 'system', 0|MagicMir | errno: 'ECONNREFUSED', 0|MagicMir | code: 'ECONNREFUSED' 0|MagicMir | } 0|MagicMir | [28.10.2021 08:58.28.037] [ERROR] 2021-10-28T08:58:28 [MKTINDEX] API Error: Error: connect ECONNREFUSED 0.0.0.0:443 0|MagicMir | at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16) { 0|MagicMir | errno: -111, 0|MagicMir | code: 'ECONNREFUSED', 0|MagicMir | syscall: 'connect', 0|MagicMir | address: '0.0.0.0', 0|MagicMir | port: 443 0|MagicMir | } (/home/pi/MagicMirror/modules/MMM-MktIndex/node_helper.js:64 Request._callback)

any ideas?

thess commented 2 years ago

On the surface this looks like a DNS problem resolving the Yahoo site name. I think this because the app is trying to connect to 0.0.0.0 instead of something like: 69.147.65.251

What happens if you drop "https://query1.finance.yahoo.com/v7/finance/quote" into your browser (best if you use the same machine running MM)? The response should be either a 403 error or:

{"finance":{"result":null,"error":{"code":"Bad Request","description":"Missing required query parameter=symbols"}}}

If you set debug: true, in your config.js for the MMM-MktIndex module, you will get some additional output but it will only confirm what I already suspect - a DNS related problem.

thess commented 3 months ago

Old issue - most likely resolved