You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 23, 2021. It is now read-only.
I am using RGA::get_realtime from an openshift environment.
Issue observed
Usage of RGA::get_realtime results in the following error Error in gzfile(file, mode) : cannot open the connection In addition: Warning message: In gzfile(file, mode) : cannot open compressed file '.<XXXXX>-token.rds', probable reason 'Permission denied'
(instead of <XXXXXX> there is my GA email address, I removed it from this github issue for safety concerns)
NOTE: running get_realtime twice in a row with the same parameters results in failure of the first call and success of the second call. Weird behavior.
Tests performed
I tested using RGA::get_realtime from my local machine, no problem there. -> Problem appears only on the openshift environment.
I checked whether the token is correctly read from the .rds file into R session. The token seems to be correctly read from file.
I isolated the problem down to the function RGA:::list_mgmt: calling RGA:::list_mgmt twice results in the same issue: the first call fails with the error above, the second call succeeds. Maybe the problem is further down in RGA:::get_data but I don't know
I checked with identical() whether calling RGA:::list_mgmt changes the token. It does not.
Calling RGA::get_realtime a first time wrapped in httr::with_verbose results in following (NOTE: I edited out sensitive information by substituting it with <XXXX>)
The token is created on my local machine with RGA::authorize. I changed the name of the created .rds containing the token, and injected the token in the openshift pod as a file. My R script seems to have no problem reading in this token from file with readRDS().
The text was updated successfully, but these errors were encountered:
Thank you for the detailed report.
Seems httr tries to check token and refresh it. Then httr tried to write refreshed token to file but can't do it due the permissions.
Hi, thanks for your quick answer!
Any guess as to why it fails on first call but succeeds on a second subsequent call?
Suggestions on something I need to do to make sure that the first call succeeds?
The system user running the R-script has write access to the token file. Here's the permissions to the file lrwxrwxrwx.
Moreover: in order to issue a refreshed token, isn't it necessary that client.secret and client.id be loaded somewhere in the environment or RGA's own namespace? I do not inject client.secret and client.id anywhere in the machine that runs the R-script, so token refreshing should fail (unless they are included in the token.rds, I guess).
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Context
I am using
RGA::get_realtime
from an openshift environment.Issue observed
Usage of
RGA::get_realtime
results in the following errorError in gzfile(file, mode) : cannot open the connection In addition: Warning message: In gzfile(file, mode) : cannot open compressed file '.<XXXXX>-token.rds', probable reason 'Permission denied'
(instead of
<XXXXXX>
there is my GA email address, I removed it from this github issue for safety concerns)NOTE: running
get_realtime
twice in a row with the same parameters results in failure of the first call and success of the second call. Weird behavior.Tests performed
RGA::get_realtime
from my local machine, no problem there. -> Problem appears only on the openshift environment.RGA:::list_mgmt
: callingRGA:::list_mgmt
twice results in the same issue: the first call fails with the error above, the second call succeeds. Maybe the problem is further down inRGA:::get_data
but I don't knowidentical()
whether callingRGA:::list_mgmt
changes the token. It does not.Calling
RGA::get_realtime
a first time wrapped inhttr::with_verbose
results in following (NOTE: I edited out sensitive information by substituting it with<XXXX>
)A second subsequent call with same parameters results in
Additional technical details
The token is created on my local machine with
RGA::authorize
. I changed the name of the created .rds containing the token, and injected the token in the openshift pod as a file. My R script seems to have no problem reading in this token from file withreadRDS()
.The text was updated successfully, but these errors were encountered: