Closed jessmhoehner closed 1 year ago
Sounds like there is a bug somewhere since this isn't performing as expected.
get_outable()
calls on two sub-functions to pull the country UIDs and org unit levels.
Both of those function handle credentials via lazy_secrets()
.
If no user and/or password are provided or available (ie stored from glamr
), the user should be prompted to enter both/either via GUI pop-up:
So we need to look into what is happening at this step 🤔
@jessmhoehner I tested this out and got a pop up for credentials with nothing stored or provided (code below). You might want to check (1) your password if its outdated and (2) you have access to final.datim.org
library(gagglr)
library(grabr)
library(keyring)
#ensure I have the latest version of grabr
oha_sitrep()
#current DATIM user name
datim_accnt <- "" #add DATIM user ID
#remove stored DATIM credentials
key_delete("datim", datim_accnt)
#confirm credential are removed
# expect: TRUE
!"datim" %in% key_list()$service
#run fcn that requires DATIM credentials
# no credentials provided here and none stored
# expect: 2 sets of popups requiring user and password be entered into GUI
get_outable()
#add credential back
set_datim(datim_accnt)
unrelated to the specifics of this issue, but #13 resolved the dual pop up windows uncovered https://github.com/USAID-OHA-SI/grabr/issues/11#issuecomment-1405159540
Currently if a user doesn't have DATIM creds stored, this is the error message that the function throws.
"Error: lexical error: invalid char in json text. <webMessage xmlns="http://dhis2 (right here) ------^"
if datim_user and datim_pwd are blank. It would be nice to add a unit tests that checks if these necessary values are blank ("") and if so, provide an actionable error message to the user. I volunteer to take this on if developers think it would be a good addition.