Skip to content

gar_set_client breaks if using web_json argument #234

Description

@genobobeno

What goes wrong

project_id is not declared within the function if the web_json is used.

Error in gar_set_client(json = "", web_json = "keys/client_secret_12345-happyhappyjoyjoy.apps.googleusercontent.com.json") : object 'project_id' not found

Steps to reproduce the problem

Please note that if a reproduceable example that I can run is not available, then the likelihood of getting any bug fixed is low.
gar_set_client(web_json = "mysecretsfile.json")

Expected output

The web_project_id should be copied to project_id variable in absence of json object.

Actual output

Before you run your code, please run:

options(googleAuthR.verbose=2) and copy-paste the console output here.
i 2024-09-13 14:42:17 > options(googleAuthR.scopes.selected=c(' ')) options(googleAuthR.client_id=' ') options(googleAuthR.client_secret=' ') options(googleAuthR.webapp.client_id=' 12345-happyhappyjoyjoy.apps.googleusercontent.com ') options(googleAuthR.webapp.client_secret='XXX')
Error in gar_set_client(json = "", web_json = "keys/client_secret_12345-happyhappyjoyjoy.apps.googleusercontent.com.json") :
object 'project_id' not found

Session Info

Please run sessionInfo() so we can check what versions of packages you have installed
`> sessionInfo()
R version 4.1.2 (2021-11-01)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252 LC_NUMERIC=C LC_TIME=English_United States.1252

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] jsonlite_1.8.7 googleAuthR_2.0.2

loaded via a namespace (and not attached):
[1] httr_1.4.4 compiler_4.1.2 R6_2.5.1 fastmap_1.1.1 assertthat_0.2.1 gargle_1.2.1 cli_3.6.1 tools_4.1.2 fs_1.6.4 glue_1.6.2 rstudioapi_0.15.0 memoise_2.0.1
[13] cachem_1.0.6 digest_0.6.35 rlang_1.1.3 `

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions