MagicMirror² v2.12.0 is available! For more information about this release, check out this topic.

MMM-Trello sometimes fails to refresh. Any ideas?



  • I use MMM-Trello to keep my life organized, I work for a theater at a University, so I have many events coming through. And my notes are constantly changing. Sometimes I have noticed that the module will be stuck at the last refresh. Usually I can just refresh the browser with MMM-Remote-Control, but we had a power failure recently and my IP address on the Raspi and my iMac don’t align anymore (there is nothing I can do to work through the subnets, and creating a static address could cause havoc campus wide. I’ve asked our IT about it.) I’m also too lazy to pull out a mouse and keyboard, which is also why there is a MM update waiting to be pulled.

    Anyway, I was wondering if there were some way to see what was happening, or if this just happens sometimes. I have my mirror scheduled to reset every Sunday at 02:00, so it would be fixed then. The module is not frozen, as it still cycles through other cards (I have a couple iterations set up on the mirror), but the data stays stale.

    Here is a photo for reference:
    As you can see, it is still showing stuff under “Event Preparations” (Which I only just now noticed is misspelled). Even though there is nothing on my Trello board.

    Imgur Image

    Imgur Image

    I have had this happen a couple times. There is no rhyme or reason to it either. It’s not too bothersome, but something I am curious about.



  • @pattanner92 if your mirror starts using pm2

     pm2 logs 
    

    might show something



  • @sdetweil Actually I do use PM2.

    I sifted through all the logs (as there was nothing within the first 15 lines as posted when you request pm2 logs. I have a lot of things scheduled, so it took some crosseyed moments and time to find something.

    I cannot tell what day this started, as it doesn’t appear to be logged to my not-so-advanced eyes, but I am for sure getting some “Response Timeout” and “Gateway Timeout” activity from Trello. As well as some “getaddrinfo” and “connect timeout” errors.

    Give me a moment to log into the forum on the Mirror and I will try to post the actual log here.

    EDIT:

    Here are how the logs actually read. To me, not much info here. Maybe I can be pointed in the correct direction?

    [09:51:18.814] [LOG]    { Error: Response Timeout
        at Request._callback (/home/pi/MagicMirror/modules/MMM-Trello/node_modules/node-trello/lib/node-trello.js:88:13)
        at Request.self.callback (/home/pi/MagicMirror/modules/MMM-Trello/node_modules/request/request.js:185:22)
        at Request.emit (events.js:182:13)
        at Request. (/home/pi/MagicMirror/modules/MMM-Trello/node_modules/request/request.js:1161:10)
        at Request.emit (events.js:182:13)
        at IncomingMessage. (/home/pi/MagicMirror/modules/MMM-Trello/node_modules/request/request.js:1083:12)
        at Object.onceWrapper (events.js:273:13)
        at IncomingMessage.emit (events.js:187:15)
        at endReadableNT (_stream_readable.js:1090:12)
        at process._tickCallback (internal/process/next_tick.js:63:19)
      statusCode: 504,
      responseBody: 'Response Timeout',
      statusMessage: 'Gateway Timeout' }
    [10:01:04.765] [LOG]    { Error: Response Timeout
        at Request._callback (/home/pi/MagicMirror/modules/MMM-Trello/node_modules/node-trello/lib/node-trello.js:88:13)
        at Request.self.callback (/home/pi/MagicMirror/modules/MMM-Trello/node_modules/request/request.js:185:22)
        at Request.emit (events.js:182:13)
        at Request. (/home/pi/MagicMirror/modules/MMM-Trello/node_modules/request/request.js:1161:10)
        at Request.emit (events.js:182:13)
        at IncomingMessage. (/home/pi/MagicMirror/modules/MMM-Trello/node_modules/request/request.js:1083:12)
        at Object.onceWrapper (events.js:273:13)
        at IncomingMessage.emit (events.js:187:15)
        at endReadableNT (_stream_readable.js:1090:12)
        at process._tickCallback (internal/process/next_tick.js:63:19)
      statusCode: 504,
      responseBody: 'Response Timeout',
      statusMessage: 'Gateway Timeout' }
    [10:01:05.762] [LOG]    { Error: Response Timeout
        at Request._callback (/home/pi/MagicMirror/modules/MMM-Trello/node_modules/node-trello/lib/node-trello.js:88:13)
        at Request.self.callback (/home/pi/MagicMirror/modules/MMM-Trello/node_modules/request/request.js:185:22)
        at Request.emit (events.js:182:13)
        at Request. (/home/pi/MagicMirror/modules/MMM-Trello/node_modules/request/request.js:1161:10)
        at Request.emit (events.js:182:13)
        at IncomingMessage. (/home/pi/MagicMirror/modules/MMM-Trello/node_modules/request/request.js:1083:12)
        at Object.onceWrapper (events.js:273:13)
        at IncomingMessage.emit (events.js:187:15)
        at endReadableNT (_stream_readable.js:1090:12)
        at process._tickCallback (internal/process/next_tick.js:63:19)
      statusCode: 504,
      responseBody: 'Response Timeout',
      statusMessage: 'Gateway Timeout' }
    [10:11:04.548] [LOG]    { Error: Response Timeout
        at Request._callback (/home/pi/MagicMirror/modules/MMM-Trello/node_modules/node-trello/lib/node-trello.js:88:13)
        at Request.self.callback (/home/pi/MagicMirror/modules/MMM-Trello/node_modules/request/request.js:185:22)
        at Request.emit (events.js:182:13)
        at Request. (/home/pi/MagicMirror/modules/MMM-Trello/node_modules/request/request.js:1161:10)
        at Request.emit (events.js:182:13)
        at IncomingMessage. (/home/pi/MagicMirror/modules/MMM-Trello/node_modules/request/request.js:1083:12)
        at Object.onceWrapper (events.js:273:13)
        at IncomingMessage.emit (events.js:187:15)
        at endReadableNT (_stream_readable.js:1090:12)
        at process._tickCallback (internal/process/next_tick.js:63:19)
      statusCode: 504,
      responseBody: 'Response Timeout',
      statusMessage: 'Gateway Timeout' }
    [10:21:04.674] [LOG]    { Error: Response Timeout
        at Request._callback (/home/pi/MagicMirror/modules/MMM-Trello/node_modules/node-trello/lib/node-trello.js:88:13)
        at Request.self.callback (/home/pi/MagicMirror/modules/MMM-Trello/node_modules/request/request.js:185:22)
        at Request.emit (events.js:182:13)
        at Request. (/home/pi/MagicMirror/modules/MMM-Trello/node_modules/request/request.js:1161:10)
        at Request.emit (events.js:182:13)
        at IncomingMessage. (/home/pi/MagicMirror/modules/MMM-Trello/node_modules/request/request.js:1083:12)
        at Object.onceWrapper (events.js:273:13)
        at IncomingMessage.emit (events.js:187:15)
        at endReadableNT (_stream_readable.js:1090:12)
        at process._tickCallback (internal/process/next_tick.js:63:19)
      statusCode: 504,
      responseBody: 'Response Timeout',
      statusMessage: 'Gateway Timeout' }
    

    And some later stuff. May be from today?

    [01:13:38.555] [LOG]    { Error: getaddrinfo EAI_AGAIN api.trello.com api.trello.com:443
        at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:50:26)
      errno: 'EAI_AGAIN',
      code: 'EAI_AGAIN',
      syscall: 'getaddrinfo',
      hostname: 'api.trello.com',
      host: 'api.trello.com',
      port: 443 }
    [01:13:42.233] [LOG]    { Error: getaddrinfo EAI_AGAIN api.trello.com api.trello.com:443
        at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:50:26)
      errno: 'EAI_AGAIN',
      code: 'EAI_AGAIN',
      syscall: 'getaddrinfo',
      hostname: 'api.trello.com',
      host: 'api.trello.com',
      port: 443 }
    [01:15:35.996] [LOG]    { Error: connect ETIMEDOUT 23.67.88.251:443
        at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1161:14)
      errno: 'ETIMEDOUT',
      code: 'ETIMEDOUT',
      syscall: 'connect',
      address: '23.67.88.251',
      port: 443 }
    

    Not sure if the logs help anyone else. But to me it just looks as thought it is timing out on the request and there is nothing necessarily wrong. As mentioned before, a refresh seems to fix the issue. I’m just curious about it.



  • @pattanner92 said in MMM-Trello sometimes fails to refresh. Any ideas?:

    api.trello.com

    many times the modules haven’t tested error conditions like this and get ‘stuck’ when things don’t work normally. because u can refresh and get out of it, I suspect that is the problem here…

    I looked at the module code, but it uses a node library, and I don’t have time today to dig in deeper…(sorry)



  • @sdetweil No worries. Thanks for the tip about pm2 logs, I actually knew about this, but completely forgot they existed. Maybe others who have noticed this have ideas as well, and we can come up with an answer together!

    I know just enough about these things to be able to track and fix small issues (that I usually caused), but this is over my head. I just love learning and growing with this stuff! I’ll resort to refreshing for now (I pulled a keyboard/mouse out anyhow to get the logs) and see if I can’t find something.



  • @pattanner92 if u enable ssh on the mirror, then u can connect from your windows machine and get the log info. no keyboard required on mirror

    (dev window requires keyboard, but many times PM2 is capturing that too)



  • @sdetweil I used to use this all the time. As a matter of fact, I used to open my mirror on my computer’s browser, and open a ssh connection in terminal and do edits and refresh on the computer as it was faster and my screen is the size of a football field.

    Unfortunately (as mentioned in the original post) I work at a University, where we have a large enterprise network with various subnets and gateways. If my iMac and Raspi aren’t on the same subnet there is no way to connect the two. I have tried to change the CIRD format of whitelisted address to allow all sorts of combinations of subnet masking, including allowing everything. We had a power failure a couple days ago, so my Mirror connected to wifi about 36 hours ahead of my computer (I keep my computer disconnected from wifi generally as I have a hard line which allows me to connect to various printers and servers around campus), so they are nowhere near the same subnet. Simply reconnecting my mirror doesn’t help either.

    I talked to the guy who manages the network on my campus and he said that if I don’t have the same subnet, there is no way to interconnect the two. He was actually impressed that I even got the Raspi on the wifi to begin with. Technically speaking our campus also routes through the main campus network, which is 100+ miles away, allowing interconnection across all five campuses across the state.



  • @pattanner92 yeh, sorry, read, it and forgot it!