-
Notifications
You must be signed in to change notification settings - Fork 37
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
Possible issue with sso_credential_process on Windows #640
Comments
Ah thanks for this. I dont have windows computer to test this out fully. I will raise a PR. Are you or colleagues able to test this out for me? |
Sure can
…On Fri, Jun 30, 2023 at 1:51 PM Larefly ***@***.***> wrote:
Ah thanks for this. I dont have windows computer to test this out fully. I
will raise a PR. Are you or colleagues able to test this out for me?
—
Reply to this email directly, view it on GitHub
<#640 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/BA6YAFDN5FM47J6Q272JS6TXN4N2TANCNFSM6AAAAAAZ2F7DE4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Am I right in thinking we will need to check 3 locations:
|
@karen5780 Please try: remotes::install_github("dyfanjones/paws/paws.common", ref = "sso_win_path") It is basically the solution you proposed |
Hi - I'm unfortunately probably not a good person to test this as I don't know much about R. When running the line, I got the following message: Package paws.common has compiled code, but no suitable compiler(s) were found. Installation will likely fail. And it did fail. I don't have RTools and have no idea how to install anything that doesn't have a binary. Also FYI, this may perhaps be an issue with another package as I got messages prompted me to update other packages. I couldn't update jsonlite to 1.8.7 from 1.8.5 or digest from 0.6.32 from 0.6.31 as the binaries weren't available. If you have any quick suggestions as to how I can test this out, I'd be happy to try. |
I don't know enough about Windows either to know anything about the environment variables. It's my first time ever explicitly looking at either HOMEPATH or HOMEDRIVE - and only got HOMEDRIVE from a google search. I'm just an actuary who's proud of herself for getting this far. :) |
No worries I believe I can build the binary for you :) paws_common_download_path <- "paws.common_0.5.8.zip"
install.packages(paws_common_download_path , repos = NULL) If you want to install Rtools for building R packages from source, heres the link to Rtools for 4.2 version of R :) Website link: https://cran.r-project.org/bin/windows/Rtools/rtools42/rtools.html |
Hi @DyfanJones, this works for me, thanks! I'll check on Tuesday to see if it works for my coworker - tomorrow is a stat holiday for us in Canada. I imagine this should work. One thing that seems a little strange to me is how the root variable looks on my computer. |
Hi @DyfanJones, this worked for my coworker as well. The production version didn't work for her, so I believe the fix worked. Thanks! |
@karen5780 That is great news. paws.common 0.5.8 will be getting released to the cran shortly. |
Paws.common 0.5.8 has been released to the cran. I will close this ticket. Please re-open if problem persists. |
Hi - I'm not a developer and am not really sure what I'm doing. As in I created a github account just now to make this post. But I've run into a possible bug that I think has an easy fix.
I'm running R 4.2.2 on Windows 10 and am using paws 0.2.0 to get AWS S3 data. The code I'm using (pasted below) works for me, and some but not all of the other users.
I've narrowed the issue to within sso_credential_process():
root <- ifelse(Sys.info()[[1]] == "Windows", Sys.getenv("HOMEPATH"), "~")
sso_cache <- file.path(root, ".aws", "sso", "cache", json_file)
if (!file.exists(sso_cache))
R is not finding the sso_cache file for some of my fellow users with only the HOMEPATH variable being specified. I don't know enough about how to figure out what file.exists is doing behind the scenes, but for them, the HOMEDRIVE also needs to be specified. As in, the root assignment line root <- ifelse(Sys.info()[[1]] == "Windows", paste0(Sys.getenv("HOMEDRIVE"), Sys.getenv("HOMEPATH"), "~") fixes the problem.
FYI, here's the code I'm using to read in from S3 with SSO.
library(paws)
config_path <- paste(Root_Folder,"config", sep = "/")
sso_profile <- "profile-name"
Sys.setenv(AWS_CONFIG_FILE = config_path,
AWS_PROFILE = sso_profile)
system(paste("aws sso login --profile", sso_profile))
s3 <- paws::s3(config = list(region = "ca-central-1"))
file <- s3$get_object(Bucket = bucket_name, Key = "File.csv")
The text was updated successfully, but these errors were encountered: