Closed m-mohr closed 2 years ago
A similar issue might occurs, when you try to login in pure R.
Copy <anonymized> and paste when requested by the browser
Press <enter> to proceed:
/usr/bin/xdg-open: 882: www-browser: not found
/usr/bin/xdg-open: 882: links2: not found
/usr/bin/xdg-open: 882: elinks: not found
/usr/bin/xdg-open: 882: links: not found
/usr/bin/xdg-open: 882: lynx: not found
/usr/bin/xdg-open: 882: w3m: not found
xdg-open: no method available for opening 'https://aai.egi.eu/auth/realms/egi/device?user_code=<anonymized>'
✔ Waiting for response from server [1m 12.7s]
There are error messages and at the end, where you can copy/paste the link. I'm not sure if we can somehow query the R system if a browser is installed.
options("jupyter.in_kernel"=TRUE)
connect("openeo.cloud")
login()
This fails: Login failed. Reason: OAuth 2.0 device flow requires an interactive session
I guess the interactive requirement for the check is preventing the rest of the code from running:
Yes, this is probably why we set interactive to TRUE back then.
So this really needs a better implementation in httr2, I think? At least try/catch the browser code and if it fails show the URL so that you don't get stuck?!
Not tested yet. We need to test a locally hosted Jupyter and a remote one.
Related: #119
We need to check whether we run into this issue again: https://github.com/r-lib/httr2/pull/103
Maybe we can remove the code completely?