Error running authorize.js
Closed this issue · 10 comments
I'm running into an error when running the authorize.js script
`
pi@raspberrypi:~/MagicMirror/modules/MMM-GoogleCalendar $ node authorize.js
/home/pi/MagicMirror/modules/MMM-GoogleCalendar/authorize.js:37
redirect_uris[0]
^
TypeError: Cannot read property '0' of undefined
at authorize (/home/pi/MagicMirror/modules/MMM-GoogleCalendar/authorize.js:37:18)
at fs.readFile (/home/pi/MagicMirror/modules/MMM-GoogleCalendar/authorize.js:23:3)
at FSReqWrap.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:53:3)
`
Any luck on this? I'm having the same issue.
This error means the credentials you're using is missing a value in it called redirect_uris
, try creating or updating your credentials from google cloud and check if there's any blank field for redirect urls. You can use localhost:8080
as value or whatever is the address of your MagicMirror in the browser. If this doesn't work, check if your credential type is supported by this module.
I guess the question would be if "TV & Limited Input devices" is supported the same as the "TV and unlimited input" is that is referenced here. "TV and unlimited input" is not an option.
try "TV & Limited Input devices"
let me know if it works!
I tried starting from scratch and using "TV and Limited Input devices" again and received the same error as @mikmat described again. I ended up just creating one using "Web application" and using http://localhost:8080 as the Authorized JavaScript origins and Authorized redirect URIs. And then I had to sign in with my account once MM initiated.
As @DizzyDwarf0013 mentioned, the "TV and Limited Input" type did not work. Using "Web application" and signing in with my account did the trick.
Great job guys!
Same issues here. However, the "web application" alternative did not work for me. After I click allow on the google prompt I get a page not found error, and MM still display click here to enable this module.
I am seeing the same issues.
Apparently the TV type creds from Google no longer includes any redirect_uri member.
The web type has moved the namespace to be credentials.web
.
Same issues here. However, the "web application" alternative did not work for me. After I click allow on the google prompt I get a page not found error, and MM still display click here to enable this module.
Same issue TV creds didnt work for me and getting the page not found error because im running the MM through unraid docker, so im not on the same browser as the MM is. Any solutions?
A new version of this module has been released, now only supporting Desktop app
as the OAuth type, it should fix these errors. Closing this for now, feel free to open a new issue if problem persist in the new version.