Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation from Github Fails #62

Closed
ailich opened this issue May 1, 2023 · 10 comments
Closed

Installation from Github Fails #62

ailich opened this issue May 1, 2023 · 10 comments

Comments

@ailich
Copy link

ailich commented May 1, 2023

Running remotes::install_github("claudiozandonella/trackdown", build_vignettes = TRUE) results in:

** testing if installed package can be loaded from temporary location
Warning: The `app` argument of `drive_auth_configure()` is deprecated as of googledrive
2.1.0.
ℹ Please use the `client` argument instead.
ℹ The deprecated feature was likely used in the trackdown package.
  Please report the issue at
  <https://github.com/claudiozandonella/trackdown/issues>.
Error: package or namespace load failed for 'trackdown':
 .onLoad failed in loadNamespace() for 'trackdown', details:
  call: drive_auth_configure(client = app, path = path, api_key = api_key)
  error: missing(client) || is.null(client) || inherits(client, "gargle_oauth_client") is not TRUE
Error: loading failed
Execution halted
ERROR: loading failed
* removing 'C:/Users/socce/AppData/Local/R/win-library/4.3/trackdown'
Warning message:
In i.p(...) :
  installation of package ‘C:/Users/socce/AppData/Local/Temp/Rtmpsxm0e2/file17745baa135e/trackdown_1.5.0.tar.gz’ had non-zero exit status
R.version
               _                                
platform       x86_64-w64-mingw32               
arch           x86_64                           
os             mingw32                          
crt            ucrt                             
system         x86_64, mingw32                  
status                                          
major          4                                
minor          3.0                              
year           2023                             
month          04                               
day            21                               
svn rev        84292                            
language       R                                
version.string R version 4.3.0 (2023-04-21 ucrt)
nickname       Already Tomorrow         
@jpalma-espinosa
Copy link

I can confirm that I have the same error.

remotes::install_github("claudiozandonella/trackdown",build_vignettes = TRUE)
Downloading GitHub repo claudiozandonella/trackdown@HEAD
Running `R CMD build`...
* checking for file/tmp/RtmppU05US/remotes22a582009ef6c/ClaudioZandonella-trackdown-8a48063/DESCRIPTION... OK
* preparingtrackdown:
* checking DESCRIPTION meta-information ... OK
* installing the package to build vignettes
      -----------------------------------
* installing *source* packagetrackdown...
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
Warning: The `app` argument of `drive_auth_configure()` is deprecated as of googledrive
2.1.0.Please use the `client` argument instead.The deprecated feature was likely used in the trackdown package.
  Please report the issue at
  <https://github.com/claudiozandonella/trackdown/issues>.
Error: package or namespace load failed fortrackdown:
 .onLoad failed in loadNamespace() for 'trackdown', details:
  call: drive_auth_configure(client = app, path = path, api_key = api_key)
  error: missing(client) || is.null(client) || inherits(client, "gargle_oauth_client") is not TRUE
Error: loading failed
Ejecución interrumpida
ERROR: loading failed
* removing/tmp/RtmpuxvbT3/Rinst22af55d43277b/trackdown-----------------------------------
ERROR: package installation failed
STDOUT:
* checking for file/tmp/RtmppU05US/remotes22a582009ef6c/ClaudioZandonella-trackdown-8a48063/DESCRIPTION... OK
* preparingtrackdown:
* checking DESCRIPTION meta-information ... OK
* installing the package to build vignettes
      -----------------------------------
* installing *source* packagetrackdown...
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
Warning: The `app` argument of `drive_auth_configure()` is deprecated as of googledrive
2.1.0.Please use the `client` argument instead.The deprecated feature was likely used in the trackdown package.
  Please report the issue at
  <https://github.com/claudiozandonella/trackdown/issues>.
Error: package or namespace load failed fortrackdown:
 .onLoad failed in loadNamespace() for 'trackdown', details:
  call: drive_auth_configure(client = app, path = path, api_key = api_key)
  error: missing(client) || is.null(client) || inherits(client, "gargle_oauth_client") is not TRUE
Error: loading failed
Ejecución interrumpida
ERROR: loading failed
* removing/tmp/RtmpuxvbT3/Rinst22af55d43277b/trackdown-----------------------------------
ERROR: package installation failed
STDERR:

Error: Failed to install 'trackdown' from GitHub:
  Failed to `R CMD build` package, try `build = FALSE`.

R Version

R.version
               _                           
platform       x86_64-pc-linux-gnu         
arch           x86_64                      
os             linux-gnu                   
system         x86_64, linux-gnu           
status                                     
major          4                           
minor          2.1                         
year           2022                        
month          06                          
day            23                          
svn rev        82513                       
language       R                           
version.string R version 4.2.1 (2022-06-23)
nickname       Funny-Looking Kid     

@maelle
Copy link
Contributor

maelle commented May 25, 2023

I'd recommend trying without the vignette, pak::pak("ClaudioZandonella/trackdown").

Then if you have authentication problems, please refer to #59

I hope this helps!

@ailich
Copy link
Author

ailich commented May 25, 2023

Installing using build_vignettes = FALSE or through pak doesn't resolve the issue. After looking into it a bit further, it seems that trackdown is not compatible with the latest version of the googledrive package (2.1.0). trackdown can be installed if you first install an older version of googledrive using remotes::install_version("googledrive", version="2.0.0").

This happens due to this line since as noted by the warning, "The app argument of drive_auth_configure() is deprecated as of googledrive 2.1.0." Instead of app the client argument should be used.

app is constructed using httr::oauth_app() whereas client is conructed usinggargle::gargle_oauth_client_from_json()

@maelle
Copy link
Contributor

maelle commented May 26, 2023

Oops, sorry! Good catch. Maybe you can make a PR to trackdown?

@ailich
Copy link
Author

ailich commented May 26, 2023

@maelle, I'm not familiar enough with the googledrive package and the authentication protocols to get it working. I tried changing the line to be googledrive::drive_auth_configure(app) or googledrive::drive_auth_configure(client = app) but get

Error in googledrive::drive_auth_configure(client = app) : 
  missing(client) || is.null(client) || inherits(client, "gargle_oauth_client") is not TRUE

I've also tried updating this line from using gargle::oauth_app_from_json to gargle::gargle_oauth_client_from_json since the documentation for drive_auth_configure says that is the function that should be used but it doesn't resolve the issue.

@ClaudioZandonella
Copy link
Owner

Sorry for the issue,

I am working on that to fix the compatibility with the new version of googledrive!

Sorry for neglecting the development in the last couple of months. This weekend I am finally able to work again on the code.

@ailich
Copy link
Author

ailich commented May 26, 2023

Awesome and thanks! I just used trackdown to manage collaboration on a paper and it worked really well!

@ClaudioZandonella
Copy link
Owner

ClaudioZandonella commented May 28, 2023

Hi @ailich,

I fixed the problem🎉. You need to install the develop version remotes::install_github('claudiozandonella/trackdown@develop)

Remember to remove the old version of trackdown first. I will prepare the new release after a few more minor fixes.

Let me know if you can now install trackdown.

ClaudioZandonella added a commit that referenced this issue May 28, 2023
- Fix compatibility with `googledrive` version `2.1.0`. `googledrive` and `gargle` packages changed underlying functions and arguments for managing Google api authentication. Now `trackdown` is aligned with the changes. See Issue #57 #59 #62.
- Add lifecycle badges. See Issue #52.
- Fix unwanted removed lines at download. See Issue #61
@ClaudioZandonella
Copy link
Owner

ClaudioZandonella commented May 28, 2023

Hi @ailich @jpalma-espinosa @maelle

I just released version 1.5.1 that fixed compatibility with the new version of googledrive🎉.

googledirve and gargle (the two packages that manage the communication with Google APIs) changed their underlying functions and arguments. In particular, what was named before app now is client. It is still an ongoing transformation as most functions allow deprecated arguments.

Be sure to install the new version of googledirve and gargle, they are required by trackdown (I already specified it in the Imports section so everything should be automatic).

Now everything should be fixed! I close the issue.

But if there are still problems with the installation, do not hesitate to reopen the issue!😉

@ailich
Copy link
Author

ailich commented May 30, 2023

Thanks! Working great for me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants