Closed YairHadari closed 2 years ago
Hi @YairHadari,
I don't unterstand the issue because there is no occurrence of credentials.web.redirect_uris[0]
in my code.
My client_secret.json has an installed
key as root element. Did you somehow make a search and replace from installed
to web
by accident? 😄
It looks like this:
{
"installed": {
"client_id": "3333333333-blabla.apps.googleusercontent.com",
"project_id": "my-project-xxxx",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_secret": "mysecret",
"redirect_uris": [
"urn:ietf:wg:oauth:2.0:oob",
"http://localhost"
]
}
}
The script is getting the web keyword from Google json. I have attached previously the content of the file.
Thanks Yair
On Mon, 23 Mar 2020, 19:21 Christian Zöller, notifications@github.com wrote:
Hi @YairHadari https://github.com/YairHadari, I don't unterstand the issue because there is no occurrence of credentials.web.redirect_uris[0] in my code.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/No3x/MMM-GoogleDocs-Notes/issues/2#issuecomment-602740881, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZ425WWAJ3XNEFERCH5UUDRI6LDBANCNFSM4LQ7UHFQ .
The script is getting the web keyword from Google json. I have attached previously the content of the file.
This doesn't explain the code change const redirectUrl = credentials.web.redirect_uris[0];
.
I was able to reproduce the creation of a client_secret with type web
by selecting the wrong type. Please follow the instructions in the readme.
Select the Credentials tab, click the Create credentials button and select OAuth client ID. Select the application type Other Enter the name Magic Mirror Notes. It is important that this matches exactly.
Thanks Christian!
I have succeed granting permission and got the MMM-GoogleDocs-Notes is authorized note. I have created a document with the name MMM but unfortunately I"m getting a black screen with the message notes and loading...
[image: image.png]
I will appreciate your assistance.
Thanks, Yair
On Mon, Mar 23, 2020 at 8:52 PM Christian Zöller notifications@github.com wrote:
The script is getting the web keyword from Google json. I have attached previously the content of the file. Thanks Yair … <#m5377638319643505537> On Mon, 23 Mar 2020, 19:21 Christian Zöller, @.***> wrote: Hi @YairHadari https://github.com/YairHadari https://github.com/YairHadari, I don't unterstand the issue because there is no occurrence of credentials.web.redirect_uris[0] in my code. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#2 (comment) https://github.com/No3x/MMM-GoogleDocs-Notes/issues/2#issuecomment-602740881>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZ425WWAJ3XNEFERCH5UUDRI6LDBANCNFSM4LQ7UHFQ .
This doesn't explain the code change const redirectUrl = credentials.web.redirect_uris[0];.
I was able to reproduce the creation of a client_secret with type web by selecting the wrong type. Please follow the instructions in the readme.
[image: image] https://user-images.githubusercontent.com/2690708/77352618-c09b6c80-6d3f-11ea-9b93-d9c5be07893a.png
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/No3x/MMM-GoogleDocs-Notes/issues/2#issuecomment-602790713, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZ425REYQC2FFVMZGXVVMTRI6VX5ANCNFSM4LQ7UHFQ .
Sorry I can't reproduce this on the master branch. Please show the log Mine is something like this:
[18:59:39.607] [LOG] [MMM-GoogleDocs-Notes] authorizing...
[18:59:39.609] [LOG] [MMM-GoogleDocs-Notes] printDocContent
[18:59:40.191] [LOG] [MMM-GoogleDocs-Notes] Found 4 documents in drive matching the search 'title starts with MMM'.
[18:59:40.191] [LOG] [MMM-GoogleDocs-Notes] noteDocumentId: 1-xxxexxxxxxxxxxxxxxxxx
[18:59:40.412] [LOG] [MMM-GoogleDocs-Notes] last modified time of the note: 2020-01-04T16:09:56.205Z
Please also show your config. You can also try the develop branch which has some improvements beside this.
Thanks!!! Where the log located and what is the name of it?
On Wed, 25 Mar 2020, 20:02 Christian Zöller, notifications@github.com wrote:
Sorry I can't reproduce this on the master branch. Please show the log Mine is something like this:
[18:59:39.607] [LOG] [MMM-GoogleDocs-Notes] authorizing... [18:59:39.609] [LOG] [MMM-GoogleDocs-Notes] printDocContent [18:59:40.191] [LOG] [MMM-GoogleDocs-Notes] Found 4 documents in drive matching the search 'title starts with MMM'. [18:59:40.191] [LOG] [MMM-GoogleDocs-Notes] noteDocumentId: 1-xxxexxxxxxxxxxxxxxxxx [18:59:40.412] [LOG] [MMM-GoogleDocs-Notes] last modified time of the note: 2020-01-04T16:09:56.205Z
You can also the the develop branch that has some improvements.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/No3x/MMM-GoogleDocs-Notes/issues/2#issuecomment-603995408, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZ425R4XSEROV4I2CL5Y6LRJJBKBANCNFSM4LQ7UHFQ .
The plugin uses default logging mechanism provided by MagicMirror. Depending on your environment you can view that log. Please refer to the MagicMirror documentation. I do not run a Magic Mirror on my own so I don't run it on a RPi or something like that. Therefore I don't know about this pm2 stuff. Instead I just run it on my PC in a bash environment with CygWin on Windows. As last resort I can describe how to setup such a environment but please just try to find the log.
Missing information required to provide further help:
Thanks!!! Where the log located and what is the name of it? …
If you're using pm2 for autostart, then you'll have the log in /home/user/.pm2/logs/mm-out.log.
For realtime log use tail -f /home/user/.pm2/logs/mm-out.log
Hi! Thanks for contributing the plugin to the community! I have created a OAuth 2.0 Client ID and downloaded the file. When running sudo -u pi -- node authorize.js I'm getting the following error:
Please note that the file looks like that:
Regards, Yair