Read the statement by Michael Teeuw here.
MMM-GooglePhotos
-
Unhandled promise rejection is not the reason of this symptom, rather result.
Anyway,
I thinkClient network socket disconnected before secure TLS connection was established
is not coming from program logic. It probably might be caused from unstable network status. (Especially handling TLS connection).
There is no one reason of that issue, so it has no simple solution to diagnose or solve.
I can’t represent this symptom, so hard to find the solution at this moment.@gonzonia
For me;reconnect once the connection works again, the image being stuck won’t be an issue. Right now once the connection breaks the module can’t recover.
When I force to break the connection then reconnect again, the module works again without issue. This module just loads an image from external google URL on each update schedule. So, if network is ok, image should be loaded and displayed. I suspect your router or proxy setting is interfering TLS connection between Google Server. but not sure.
Anyway, at this moment hard to find reason why yours are not working.
-
@Sean I appreciate you trying. I’ll see if I can figure out more detail. It’s weird because it’ll work fine sometimes for days and then all of a sudden I can’t get it to do more than 1 or 2 photos before it stops. Nothing else on the pi has that issue, newsfeeds still update, weather updates, CalendarExt2 updates.
I’m going to circumvent the pihole I have set up and point to GoogleDNS and see if that helps.
I wasn’t seeing anything from the MagicMirror in the query logs for the pihole which was in itself odd.
-
@sdetweil - I was replying to the warning about the buffer package being deprecated.
-
@bhepler ah. never mind!
-
@Sean I’ve got a theory. I don’t know enough about how it’s all working to be sure, but I’m testing it a little. I noticed in the logs that the error seemed to coincide with something the CalendarExt2 module was doing. Since they’re both connecting to Google, I thought, perhaps there’s something happening there. I’ve disabled the CalendarExt2 module and haven’t had a problem. I’m going to see how it all runs for today and then turn the module back on to see if the problem returns.
-
@gonzonia
It makes some sense. By racing to use the same connection, there could be some conflicts. Hmmmm… -
@Sean Sadly, it doesn’t look like that’s it. Everything ran great for 12 hours, than quit again. Restarted this morning and it lasted an hour or two. The problem always appears arround indexing.
[2020-04-30 08:56:17.785] [LOG] 2020-04-30T08:56:17 <log> [GPHOTOS] Start Album scanning (/home/pi/MagicMirror/modules/MMM-GooglePhotos/node_helper.js:44 Class.log) [2020-04-30 08:56:17.789] [LOG] 2020-04-30T08:56:17 <log> [GPHOTOS:AUTH] Token is alive. (/home/pi/MagicMirror/modules/MMM-GooglePhotos/GPhotos.js:20 Auth.log) [2020-04-30 08:56:17.791] [LOG] 2020-04-30T08:56:17 <log> [GPHOTOS:CORE] Indexing photos now. (/home/pi/MagicMirror/modules/MMM-GooglePhotos/GPhotos.js:124 GPhotos.log) REPEATS.... [2020-04-30 08:56:55.332] [LOG] 2020-04-30T08:56:55 <log> [GPHOTOS:CORE] Indexing photos now. (/home/pi/MagicMirror/modules/MMM-GooglePhotos/GPhotos.js:124 GPhotos.log) [2020-04-30 08:57:17.685] [LOG] 2020-04-30T08:57:17 <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) [2020-04-30 08:57:18.712] [LOG] 2020-04-30T08:57:18 <log> [GPHOTOS] Image loaded: https://lh3.googleusercontent.com/XXXXXX (/home/pi/MagicMirror/modules/MMM-GooglePhotos/node_helper.js:44 Class.log) [2020-04-30 08:59:18.130] [LOG] 2020-04-30T08:59:18 <log> [GPHOTOS] Image loading fails. Check your network.: https://lh3.googleusercontent.com/XXXXXXXX(/home/pi/MagicMirror/modules/MMM-GooglePhotos/node_helper.js:44 Class.log)
I’m determined to figure this out though.
-
correct, the code then fails, the module sends the helper a message
case 'IMAGE_LOAD_FAIL': this.log("Image loading fails. Check your network.:", payload) break
and the helper logs it, but never does anything after that
so, now the module is waiting for another image,case 'UPLOAD': this.upload(payload) break
but the helper doesn’t know
-
@sdetweil
Nothing can be dine after image loading fails. Even connected again, couldn’t be recognized. It is just kind logging.
I’m not sure what could be possible to do for this kind of network issue by module itself. -
Hi @Sean , thanks a lot for your time and effort on creating this module, I was searching for something similar for a long time already. From time to time, I’m getting several Forbidden 403 responses from the requests to load new pictures, this gives the impression that the pictures are stuck. Do you have an idea of what might be causing that?