@bugsounet THANK YOU! This saved me a lot of headaches. I went ahead and updated to 2.18 and got the exact error you reference in the exact same module. A quick search and I found your very helpful solution. Thank you for sharing.
Read the statement by Michael Teeuw here.
Posts made by gonzonia
-
RE: electron-rebuild and MagicMirror v2.18 (and more)
-
RE: MMM-NewsFeed
I’m trying this out as a replacement for the default newsfeed. I’m having trouble styling it though. I’d like it to have a more transparent background and to make the font white. I can’t seem to make that happen.
For example- on the default newsfeed module I set the background with rgba(0, 0, 0, 0.2);I can’t get that to apply to this one.
-
RE: MMM-GooglePhotos
@sdetweil It’s interesting. I’m seeing this error now instead of the socket disconnected error. I’ve changed the DNS on the MM to not use the pihole (it’s using Google DNS).
I don’t know why I’m seeing this vs. the other error all of a sudden. I still think it’s hard to blame the network exclusively. I have other modules too that all run fine at the exact same time.
I’ve tried to figure out how to catch the error but I don’t think I can. From what I can tell it’s making the async call and then while waiting for a response it loses the connection for some reason. I’m not skilled enough to re-write try the async queue method referenced in the github post I linked to previously. I’m just hopeful someone who has the same problem might have the skills to fix it or at least catch it better so that the module doesn’t fail completely. (Meanwhile I’ll keep trying to identify what the problem is).
-
RE: MMM-GooglePhotos
@sdetweil I do but I thought I’d switched the DNS on there to not use it. Apparently not. This new error was likely the result of the update to pihole v5 (need to figure that out separately). Thanks for pointing me in the right direction!
-
RE: MMM-GooglePhotos
New error now that I’ve increased logging. Not sure it’s related but it does seem more specific.
Error: getaddrinfo EAI_AGAIN photoslibrary.googleapis.com
Which could be this. https://github.com/googleapis/google-api-nodejs-client/issues/761Popping up at this line (I have a log entry directly before that shows up, and one after that doesn’t)
var response = await this.request(token, 'mediaItems:search', 'post', null, data)
-
RE: MMM-GooglePhotos
@Sean thank you. As always I appreciate the efforts you’ve put in. Much of my posting has been throwing out ideas to see what might stick too. I’m not adept enough at js to tackle this myself but may try at some point. I’ve got it logging at almost a line by line level to see if there’s one call that has the problem. I actually got a whole new error today which was weird. I’ll keep posting as I discover anything but please don’t think I’m trying to get you to do something, it’s more for documentation of the problem in hopes that someone can fix it!
-
RE: MMM-GooglePhotos
@cowboysdude said in MMM-GooglePhotos:
He added logging and in there it should tell you why it’s failing…
Yes. This is the error and I appreciate all @Sean has done. However, whatever is causing the error below isn’t something I can identify/control/fix. There are no network issues anywhere else on my network except this single module. At least once a day I need to manually intervene to get it started again.
Error: Client network socket disconnected before secure TLS connection was established (/home/pi/MagicMirror/modules/MMM-GooglePhotos/GPhotos.js:124 GPhotos.log)
-
RE: MMM-GooglePhotos
@cowboysdude The URLs only last for an hour. That’s why it re-indexes and updates after 50 min. The issue @kykzzang and I are having is that sometimes during indexing there’s a network issue and the indexing doesn’t complete. When that happens the URLs don’t get updated and the module tries using the old URLs resulting in the the failed image loading.
-
RE: MMM-GooglePhotos
@Sean Okay. I think I’m understanding the behavior a little more. It ran yesterday for over 12 hours. When it failed, it happened on indexing, then a single image was loaded successfully. After that all images failed and the module never tried refreshing the token or indexing again.
I don’t know what the cause of the network socket disconnected error is, but is there any way for the module to recover?
If it recovered even in another 50 min when it should do another scan, I think that’s reasonable. The problem is that the error is fatal to the scanning process and all the URLs are bad after the 60 min lifespan. The module never restarts the scanning after the initial failure.
-
RE: MMM-GooglePhotos
@Sean So I had over 24 hours with it working. Swapped back to the original file and it errored out within 2 hours. Swapped back to new file and again errored in 2 hours. I don’t get it. I was mistaken with what I changed, I changed the getImage call to a pageSize of 25. This made indexing take longer. It always returns the TLS error when indexing. I have it looking at two albums. One is big with 937 images. The other is only 129. When the error happens it is always while indexing the first one. Is the large album the problem?
[2020-05-02 21:35:51.841] [LOG] 2020-05-02T21:35:51 <log> [GPHOTOS] Start Album scanning (/home/pi/MagicMirror/modules/MMM-GooglePhotos/node_helper.js:44 Class.log) [2020-05-02 21:35:51.845] [LOG] 2020-05-02T21:35:51 <log> [GPHOTOS:AUTH] Token is alive. (/home/pi/MagicMirror/modules/MMM-GooglePhotos/GPhotos.js:20 Auth.log) [2020-05-02 21:35:51.848] [LOG] 2020-05-02T21:35:51 <log> [GPHOTOS:CORE] Indexing photos now. (/home/pi/MagicMirror/modules/MMM-GooglePhotos/GPhotos.js:124 GPhotos.log) [2020-05-02 21:35:53.427] [LOG] 2020-05-02T21:35:53 <log> [GPHOTOS:CORE] Indexing photos now. (/home/pi/MagicMirror/modules/MMM-GooglePhotos/GPhotos.js:124 GPhotos.log) [2020-05-02 21:35:55.358] [LOG] 2020-05-02T21:35:55 <log> [GPHOTOS:CORE] Indexing photos now. (/home/pi/MagicMirror/modules/MMM-GooglePhotos/GPhotos.js:124 GPhotos.log) [2020-05-02 21:35:56.996] [LOG] 2020-05-02T21:35:56 <log> [GPHOTOS:CORE] Indexing photos now. (/home/pi/MagicMirror/modules/MMM-GooglePhotos/GPhotos.js:124 GPhotos.log) [2020-05-02 21:35:58.431] [LOG] 2020-05-02T21:35:58 <log> [GPHOTOS:CORE] Indexing photos now. (/home/pi/MagicMirror/modules/MMM-GooglePhotos/GPhotos.js:124 GPhotos.log) [2020-05-02 21:35:59.769] [LOG] 2020-05-02T21:35:59 <log> [GPHOTOS:CORE] Indexing photos now. (/home/pi/MagicMirror/modules/MMM-GooglePhotos/GPhotos.js:124 GPhotos.log) [2020-05-02 21:36:01.544] [LOG] 2020-05-02T21:36:01 <log> [GPHOTOS:CORE] Indexing photos now. (/home/pi/MagicMirror/modules/MMM-GooglePhotos/GPhotos.js:124 GPhotos.log) [2020-05-02 21:36:16.288] [LOG] 2020-05-02T21:36:16 <log> [GPHOTOS:CORE] Error: Client network socket disconnected before secure TLS connection was established (/home/pi/MagicMirror/modules/MMM-GooglePhotos/GPhotos.js:124 GPhotos.log)