hermanho / MMM-GooglePhotos

Display your photos on MagicMirror from Google Photos.
MIT License
170 stars 65 forks source link

Upload Feature doesn't upload to google photos #137

Open lnk64 opened 2 years ago

lnk64 commented 2 years ago

I noticed this issue when attempting to use MMM-SelfiShot to utilize MMM-GooglePhotos auto Upload capability.

When attempting to do, no upload would occur.

After debugging it, i started to notice that GooglePhotos would throw the following error:

[GPHOTOS] No uploadable album exists.

I did determine that my configuration did specify and uploadAlbum, and said album did get created via create_uploadable_album.js

I tracked down the issue to node_helper.js. The config.uploadAlbum variable was always coming back as undefined in tryToIntitialize: async function() after initializeAfterLoading: function() attempted to call it.

The config was not being passed between the two.

I made the following modifications incase you want to update the repo:

Current: Line 80: this.tryToIntitialize()

My modification: Line 80: this.tryToIntitialize(config)

Current

Line 83: tryToIntitialize: async function() {

My modification: Line 83: tryToIntitialize: async function(config) {

After this I was able to confirm that image were able to upload