-
Notifications
You must be signed in to change notification settings - Fork 14
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
Error: Function askForPassword not found in RStudio
when running auth_setup()
outside of RStudio
#158
Comments
If you are not using RStudio, try the following: auth_setup(browser = FALSE) Just checked on my Ubuntu machine with VS Code setup and it should work |
Thanks for your quick reply, unfortunately still getting the same error.
|
Lines 231 to 236 in a0262e0
The question now is why this chain of tests (line 232 and line 233) is debug(rtoot:::rtoot_ask)
auth_setup(browser = FALSE) Step through the running of |
Thanks here is what's happening after the URL step:
Let me know if this helps. Thanks a lot for your support. |
@vidonne So, rstudioapi::isAvailable() returns |
For some mystic reasons yes it does return It seems something kind of similar raised in positron rstudio/rstudioapi#302 |
ok, thank you for the pointer. Now I know the problem. rstudio/rstudioapi#302 Thank you Positron. I will modify this to not using |
Maybe this could do the trick:
From one of the answer: rstudio/rstudioapi#302 (comment) |
@vidonne Could you give this a try? remotes::install_github("gesistsa/rtoot@fix158") |
Worked perfectly thanks for the fix!!! |
Description
I'm trying to authenticate with the rtoot package in VS Code on WSL Ubuntu. After loading the package and running auth_setup(), I get the following error:
This error seems to be due to
askForPassword()
being specific to RStudio, which isn’t available in my setup.Steps to Reproduce
library(rtoot)
auth_setup()
to attempt authentication.Expected Behavior
I expect to be prompted for a token or authentication details, even when not in RStudio.
Observed Behavior
The error Error: Function askForPassword not found in RStudio appears, halting the authentication process.
Session Info
To help with debugging, here is my session information:
Could there be an alternative way to securely prompt for passwords outside of RStudio, perhaps using the
askpass package
or allowing direct environment variable input?Thank you for your help!
The text was updated successfully, but these errors were encountered: