2
votes

I have tried to install Google's cloud SDK with no luck, as I have run into the following error after I tried to start the emulator.

WARNING: Reusing existing data in [C:\Users\User\AppData\Roaming\gcloud\emulators\datastore].
Executing: cmd /c C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\platform\cloud-datastore-emulator\cloud_datastore_emulator.cmd start --host=localhost --port=8900 --store_on_disk=True --consistency=0.9 --allow_remote_shutdown C:\Users\User\AppData\Roaming\gcloud\emulators\datastore
[datastore] 'C:\Program' is not recognized as an internal or external command

I have done the following:

Rebooting my machine

reinstalling the Google cloud SDK

  • installed on all users in file location "C:\Program Files (x86)"
  • accepted all options

I have no "App engine server" installed like others have had problems with. Gcloud beta emulators data store start error Google/Cloud is not recognized as an internal or external command

I have of course followed the steps up to the command "gcloud beta emulators datastore start" as described in https://cloud.google.com/datastore/docs/tools/datastore-emulator

the contents inside the ' cloud_datastore_emulator.cmd '

setlocal

set GCD_DIR=%~dp0
set DATASTORE_JAR="%GCD_DIR%CloudDatastore.jar"

if NOT EXIST %DATASTORE_JAR% (
  echo %DATASTORE_JAR% not found
  exit /B 1
)

java -cp %DATASTORE_JAR% ^
    com.google.cloud.datastore.emulator.CloudDatastore %* 

endlocal

And it works on my college's computer with the same file naming

please ask any questions, if anything is unclear?

1
Sounds like a bad/missing path escape/quotation somewhere, causing incorrect argument parsing due to the spaces in C:\Program Files (x86).Dan Cornilescu

1 Answers

0
votes

One of ChrisV's colleges here.

Based on @Dan Cornilescu 's comment, we checked Chris's path and sure enough, his user folder had a whitespace because he used his full name. Running the setup on a user without whitespace worked.

Solution: Ensure the users folder does not contain a whitespace. E.g. "C:\Users\mjh" is ok, but "C:\Users\Martin Jul Hammer" is not.

Thanks for the help to Dan!