cloudyr / googleComputeEngineR

An R interface to the Google Cloud Compute API, for launching virtual machines
https://cloudyr.github.io/googleComputeEngineR/
Other
152 stars 41 forks source link

gce_global_project function takes only character strings. #97

Closed makarandsystems closed 6 years ago

makarandsystems commented 6 years ago

Evrionment: 1.1.423 R studio version and R version 3.4.3 gce_global_project api which in googleComputeEngineR package takes only character strings and / hypens and is not accepting integers. Where as in the home dashboard contains project id as "driven-tenure-196015" and project number as 840 032709940. Both inputs are not being accepted by API. If we set the project name using gce_global the then api gce_vm( template = "rstudio", name="my-rstudio",username="l",password="", predefined_type = "n1-highmem-2") does not work.

If we use the project name as input parameter in gce_global_project we the following error 2018-03-01 11:16:31> Token exists. 2018-03-01 11:16:31> Request: https://www.googleapis.com/compute/v1/projects/lalithamakarand/zones/us-east1-b/instances/?filter=status%20eq%20TERMINATED Auto-refreshing stale OAuth token. Request failed [404]. Retrying in 1.9 seconds... Request failed [404]. Retrying in 2 seconds... 2018-03-01 11:16:36> Request Status Code: 404 2018-03-01 11:16:37> API returned error: Failed to find project lalithamakarand 2018-03-01 11:16:37> No retry attempted: Failed to find project lalithamakarand Scopes: https://www.googleapis.com/auth/cloud-platform App key: 840032709940-2nif558apvj6qf7e846592tpcilp5lld.apps.googleusercontent.com Method: new_token

image

MarkEdmondson1234 commented 6 years ago

This is a bug that is fixed on the GitHub version, could you please install that and retry? Or change your project to one with no numbers. Sorry for the trouble.

MarkEdmondson1234 commented 6 years ago

see here for details https://github.com/cloudyr/googleComputeEngineR/issues/72