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

Error after Rstudio Update "exeecutable file not found in $PATH" #2023

Open
andrewtaylor-appfolio opened this issue Jul 18, 2024 · 8 comments
Labels
Type: question Usage question

Comments

@andrewtaylor-appfolio
Copy link

What would you like help with?

Hi Team,

I recently updated Rstudio and ever since, I've received 2 errors when trying to run con <- adbc_connection_init(db).I've tried to uninstall and reinstall adbcdrivermanager to no avail. Randomly, I tried an old version of RStudio and it worked for a short amount of time.

Both of the errors have been flavors of the following:

con <- adbc_connection_init(db)
time="2024-07-18T09:39:27-07:00" level=error msg="Authentication FAILED" func=gosnowflake.authenticate file="auth.go:364"
Error in force(code) : 390195 (08004): The provided ID Token is invalid.

then (or sometimes only the following error)

Error in force(code) : 
  IO: exec: "open": executable file not found in $PATH

Additional information:

> R.version
platform       aarch64-apple-darwin20                         
version.string R version 4.3.2 (2023-10-31)
go version
go version go1.21.6 darwin/arm64
which go
/opt/homebrew/bin/go

I suspect its user error of sorts, so any direction here would be helpful.

Thanks in advance!

@andrewtaylor-appfolio andrewtaylor-appfolio added the Type: question Usage question label Jul 18, 2024
@paleolimbot
Copy link
Member

Thanks for opening!

What does packageVersion("adbcsnowflake") get you? Reinstalling that package might be more helpful than reinstalling the driver manager.

Also, what authentication mechanism are you using?

@andrewtaylor-appfolio
Copy link
Author

The package version I'm using is

> packageVersion("adbcsnowflake")
[1] ‘0.9.0.9000’
> pak::pak("apache/arrow-adbc/r/adbcsnowflake")
! Using bundled GitHub PAT. Please add your own PAT using `gitcreds::gitcreds_set()`.
✔ Loading metadata database ... done                                          
                                                                              
→ Will install 1 package.
→ Will download 1 package with unknown size.
+ adbcsnowflake   0.13.0.9000 👷🏼‍♀️🔧 ⬇ (GitHub: 2435619)
ℹ Getting 1 pkg with unknown size
✔ Got adbcsnowflake 0.13.0.9000 (source) (5.57 MB)               
✔ Downloaded 1 package (5.57 MB) in 1.4s                         
ℹ Packaging adbcsnowflake 0.13.0.9000
✔ Packaged adbcsnowflake 0.13.0.9000 (1.3s)                          
ℹ Building adbcsnowflake 0.13.0.9000                                 
✔ Built adbcsnowflake 0.13.0.9000 (35.4s)                            
✔ Installed adbcsnowflake 0.13.0.9000 (github::apache/arrow-adbc@2435619) (70ms)
✔ 1 pkg + 2 deps: kept 1, added 1, dld 1 (NA B) [42.4s]                

After a reinstall the version is updated to the following:

> packageVersion("adbcsnowflake")
[1] ‘0.13.0.9000’

However I still get the following error.

> con <- adbc_connection_init(db)
Error in force(code) : 
  IO: exec: "open": executable file not found in $PATH

@paleolimbot
Copy link
Member

Great! Just curious what authentication mechanism you're attempting (I'm wondering if adding some explicit arguments for authentication might be a workaround)

@andrewtaylor-appfolio
Copy link
Author

andrewtaylor-appfolio commented Jul 18, 2024

Apologies there - the authentication mechanism is the following: adbc.snowflake.sql.auth_type = 'auth_ext_browser',

@andrewtaylor-appfolio
Copy link
Author

FWIW: I've had success going back to Rstudio version RStudio-2023.12.1-402 The newest release 2024.04.2+764 does not work. I do not think it's an large issue. I have a work around for now.

Just incase anyone else runs into this issue in the future, it may be interesting if anything substantial has changed loading PATH across the two versions.

@paleolimbot
Copy link
Member

Thanks for the investigation! We'll keep this open to troubleshoot...I am guessing that the Snowflake Go connector uses something like system("open 'http://...'") on MacOS where the PATH of the calling process matters. I have seen some other tools print out the URL to the console for oauth when the built-in launching of the browser fails and maybe that's what we (or the Snowflake Go connector) needs to do here.

@Ido-deBaat
Copy link

Hi!
I'm curious to try the new adbc connector, but I'm running into the same issue. Is there any update/solution on this issue?

@paleolimbot
Copy link
Member

I don't have any updates here, but it might be worth handling the OAuth in R (I believe httr2 makes this relatively straightforward). It may be that this could be fixed in the Snowflake Go connector or it may be that this is lower level in Go (I am not sure where the open command is issued), but I believe we have ability to pass through an authentication token (which is possible to obtain via an oauth workflow in R).

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

No branches or pull requests

3 participants