trackdown
trackdown copied to clipboard
Authentication Issues
Please report here any issue regarding authentication or google access.
To upload, edit, and download our files in Google Drive, trackdown relies on the Google APIs. Using Google APIs requires to create an app in Google Cloud Console and activate the required Google APIs
Trackdown already provides an internal app to use the Google APIs. However, the number of users is limited and we already reached the maximum number (i.e., 100 users).
To get unlimited access I need to complete all the verification steps required by Google. Unfortunately, the process is slow and I was rejected several times. The reason is that trackdown is an r-package working with in-line commands but they require GUI interfaces with logos etc. to pass all the verification steps.
Thus to use trackdown, we are required to create our own App in Google Cloud Console. To create an App in Google Cloud Console, follow instructions at https://claudiozandonella.github.io/trackdown/articles/oauth-app-configuration.html
After installing Trackdown 1.5.0 and following the instructions for creating a Google Cloud App, I still get the following error:
Error in `map()`:
ℹ In index: 1.
Caused by error in `drive_auth()`:
! Can't get Google credentials.
This is the same error I got trying to use the CRAN version out of the box.
I tried both setting the environment variable and using trackdown_auth_configure(path = "/Users/kendall/client_secret_XXX.apps.googleusercontent.com.json")
(where the actual file name has a long random string in place of XXX).
trackdown_has_token()
returns FALSE
, but I don't know if this is related to the success of the the authorization.
Perhaps it is related to the following warning:
`oauth_app_from_json()` was deprecated in gargle 1.3.0.
ℹ Please use `gargle_oauth_client_from_json()` instead.
@ClaudioZandonella I followed your instructions but I am not able to publish the application because it needs to be reviewed and I am not able to provide the needed details, so I don't know how to move forward with installing newer versions of trackdown
(which I need for .qmd
support)
Do you have any recommendations on what we can do to use newer versions of the package? Thanks so much!
@ClaudioZandonella you can pin this issue so it's always at the top of the issue tracker https://docs.github.com/en/issues/tracking-your-work-with-issues/pinning-an-issue-to-your-repository (and then you can hide/delete this comment :smile_cat:)
After installing Trackdown 1.5.0 and following the instructions for creating a Google Cloud App, I still get the following error:
Error in `map()`: ℹ In index: 1. Caused by error in `drive_auth()`: ! Can't get Google credentials.
This is the same error I got trying to use the CRAN version out of the box.
I tried both setting the environment variable and using
trackdown_auth_configure(path = "/Users/kendall/client_secret_XXX.apps.googleusercontent.com.json")
(where the actual file name has a long random string in place of XXX).
trackdown_has_token()
returnsFALSE
, but I don't know if this is related to the success of the the authorization.Perhaps it is related to the following warning:
`oauth_app_from_json()` was deprecated in gargle 1.3.0. ℹ Please use `gargle_oauth_client_from_json()` instead.
Hi @BruceKendall,
Sorry for the late reply. I just released version 1.5.1
that fixed compatibility with the new version of googledrive
.
I am not sure this was the cause in your case as your message error is something unusual I have never seen before.
Please, could you try to install trackdown
again and check if there are still problems with the installation?
Thank you and sorry again for the late reply
@ClaudioZandonella I followed your instructions but I am not able to publish the application because it needs to be reviewed and I am not able to provide the needed details, so I don't know how to move forward with installing newer versions of
trackdown
(which I need for.qmd
support)Do you have any recommendations on what we can do to use newer versions of the package? Thanks so much!
Hi @januz,
I am so happy to hear from you again! I hope that everything is fine!
Publishing the app does not require verification by Google. When you publish the app the message indicates a list of Google requirements for the verification, but you do not need the verification. Without verification, Google allows only a limited number of users (100). The Verification is required only if you want to make it available to everyone. [I am trying to obtain it for trackdown
so all users can use the Google APIs through the same client app without bothering about creating their own app]
So if you plan to use trackdown for your own work or with other colleagues, you do not need verification. Note that access to app credentials is necessary only for those using trackdown to upload/download files to Google Drive. In the case of colleagues that simply need to edit the text, you only need to share the link to the drive file, they do not count as users. App users are only those who use google APIs. Without verification, up to 100 users are allowed.
Please let me know if now it is more clear. Or please let me know if I missed something!
I added some comments in the documentation as well.
I'm having issues uploading files using trackdown 1.5.1
. upload_file()
redirects me to a page to choose which Google account to connect with. After selecting the appropriate account, I'm getting a warning notice (in the web browser) saying:
This application has been blocked. This application tried to access sensitive information from your Google account. Google has blocked this access to protect your account.
Using trackdown 1.1.1
(from CRAN) works fine. I'd like to upload .qmd
files though so that version doesn't suit me.
I'm using googledrive version 2.1.1
.
Edit: the documentation mentions this error here. If I understand correctly, I need to specify my credentials using trackdown_auth_configure()
. That function should be exported but doesn't seem to exist when loading the package though. It's not listed when using trackdown:::
as well.
hi @arnaudgallou,
thank you for reporting the issue. You are right! It is required to specify your own credentials.
To create your credentials you need to follow all steps described here https://claudiozandonella.github.io/trackdown/articles/oauth-client-configuration.html
(that is the page you have already linked👍)
Creating your own credentials is a little bit complicated so do not hesitate to ask for further help if something is not clear.
Regarding trackdown_auth_configure()
, the function is actually exported see https://claudiozandonella.github.io/trackdown/reference/index.html and also the NAMESPACE file https://github.com/ClaudioZandonella/trackdown/blob/242d7ff615721eca613937c3765d7fbcc6b9c0b7/NAMESPACE#LL6C7-L6C7
So my guess is that you installed version 1.5 but version 1.1 was still loaded. Try restarting the r studio session and loading again trackdown checking the version with packageVersion("trackdown")
Please let me know if this solves the issue or if there are any other problems!
Thank you so much for the help. Restarting R Studio fixed the problem with the function. Everything is working fine now :)