googleCloudStorageR icon indicating copy to clipboard operation
googleCloudStorageR copied to clipboard

Not saving to GCS when using gcs_last()

Open orthodoc opened this issue 5 years ago • 7 comments

When I run gcs_last() I get this error message:

GCE auth didn't work, looking for GCS_AUTH_FILE

Saving data to Google Cloud Storage:
xray.orthodoc.in
Warning message:
In value[[3L]](cond) : Problem saving to GCS

And the files are not uploaded to the cloud. What am I doing wrong??

orthodoc avatar Nov 03 '19 09:11 orthodoc

Are you putting gcs_last() in your .RProfile ? You also need to set the authentication for GCS in the GCS_AUTH_FILE environment argument within your .Renviron.

MarkEdmondson1234 avatar Nov 03 '19 09:11 MarkEdmondson1234

gcs_last() is in my .RProfile file.

GCS_AUTH_FILE in .Renviron points to json auth file

library(googleCloudStorageR) results in this success msg

Successfully auto-authenticated via ~/path/to/auth.json

Points to the same file so I know the json file and is being read correctly

Its all here in this repo: https://github.com/orthodoc/xrimg Except that the .Renviron file is located in the homedirectory and not at the root of the project.

orthodoc avatar Nov 03 '19 11:11 orthodoc

Update: Used git to clone the project to the vm instance.

Then saved the project to GCS. It worked.

Right after that, not able to restart the VM. Scratching my head over that.

But saving from local still does not work.

Would you know what I need to do now??

orthodoc avatar Nov 03 '19 14:11 orthodoc

Can I check the version you are running on the VM and locally. It sounds as if its not authenticating correctly - you can try running with options(googleAuthR.verbose = 1) to get more logging information.

MarkEdmondson1234 avatar Nov 03 '19 20:11 MarkEdmondson1234

Rstudio versions Local: Version 1.2.1335 VM: 1.1.463

Update

VM is not persisting Have to start with everything afresh in spite of having _gcssave.yaml at the root and in the project And of course, not saving to cloud from local environment.

orthodoc avatar Nov 05 '19 11:11 orthodoc

I'm sorry I need a reproducible example to help further on this.

MarkEdmondson1234 avatar Nov 14 '19 14:11 MarkEdmondson1234

Possibly related to https://github.com/cloudyr/googleCloudStorageR/issues/112

MarkEdmondson1234 avatar Dec 20 '19 12:12 MarkEdmondson1234