Read the statement by Michael Teeuw here.
MMM-GooglePhotos
-
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?
-
@RoggerFabri
All those kinds of errors (403, 500, …) means network/server errors. Nothing could do in client(module) itself. Only thing would be just waiting(stuck) problem solved by network/server. -
@RoggerFabri - I don’t know if this is relevant, but I know Amazon AWS bulk storage returns 403 errors if you get the URL wrong. I’m not sure if their security model is so granular that files have to be authorized independently or if the wrong URL attempts to serve up the directory index and that file is locked out. And I have no idea if Google uses the same technique.
Either way, I would check the request to make sure it is pointing to a valid asset.
-
@Sean 403 is a “forbidden” status. Is it possible to catch that status being returned and then go back to refreshing the token and starting the process over from there?
-
@gonzonia
There could be possibility “dead url after it’s lifetime”(60 minutes) but to avoid it, photos working urls would be rescanned and refreshed per 50mins.
Of course, if there be network error to prevent resurrection, it will not work. That is not the token issue. -
This post is deleted! -
@Sean Okay. Thanks. As a stab in the dark I changed the pageSize in the getAlbum call to 25. It’s been running now for 14 hours without an error. If it’s still good in the morning I’ll restore the old version and see if the error comes back. I don’t remember what led me down that path but something this morning made me think to give it a try.
-
@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)
-
I’m having the same issue above as @gonzonia . After some time the module stops changing the images and they become stuck until I refresh the browser. This only started about 2 or so weeks ago.
-
@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.