I just a newbie to SpatialOS, was following the instructions to setup the Spatial Environment and GDK (Unity). Then I encountered few problems as described below:
Description
Installer Failed
I followed the instructions to setup the environment for SpatialOS. Everything is fine at the beginning, but Unity crashed during the project loading (I have sent the report to Unity), then once I re-open the project again, it prompted “Can’t find the Spatial CLI and the donet dependency”, Therefore, I tried to re-installed the dependency.
But the SpatialOS Installer (mac.20180830.170931) failed this time, both in installer and terminal. I have done the screen shot for the mac installer but I did for the terminal
Screenshot of failure:
![Screen Shot 2019-06-09 at 6 33 45 AM](https://user-images.githubusercontent.com/3713305/59156818-1dd97080-8ad4-11e9-8ddf-26810e90abc0.png)
Possbile Solution
I manually install the CLI by brew and Launcher by SpatialOS.Launcher.mac.1.6.2.pkg separately, and it works this time.
Don’t know whether is a problem with the installer or my environment
Spatial functions missing in Unity and Failed to build the GDK for Unity
After setup the environment, I clone the project, and open it in Unity (2018.3.11f1),
I remove the project, retry the instructions, this problem still occurred 3 times. But I got things solved out at the 4th
Screenshots:
![Screen Shot 2019-06-09 at 8 21 45 AM](https://user-images.githubusercontent.com/3713305/59156735-d6061980-8ad2-11e9-937d-289d23e07f6a.png)
Possible Solution
I forgot to screenshot the log once the problem occurred, but I remember I have seen the log “Google storage API failed” (or something like this) once I use the “spatial diagnose” in terminal.
I think this because I’m using proxy (I’m in China), the internet connection to access Google API has been block by the firewall, therefore the installation process has failed.
I have change my proxy and internet setting to force all internet access to go though proxy, after that, the installation process has succeeded.
Sorry I forgot the keep the log file.
Deployment Launch Failed in Unity (Donet runtime failed) but able to deploy
I try launch the deployment after everything has done, but the deployment has failed due to donet runtime error. The SpatialOS Console has open in browser anyway before the error message display in Unity Log.
Two workers look like working properly in Spatial OS as the screenshot below, able to use the launcher to launch the game and play
Runtime Error
![Screen Shot 2019-06-09 at 3 44 29 PM](https://user-images.githubusercontent.com/3713305/59156753-051c8b00-8ad3-11e9-968c-29122848977e.png)
Logs:
my_deployment failed
Launch of my_deployment failed. Code: CannotParseOutput Message: Unable to parse the standard error. Raw standard error: Unhandled Exception: System.AggregateException: One or more errors occurred. (A task was canceled.) ---> System.Threading.Tasks.TaskCanceledException: A task was canceled. --- End of inner exception stack trace --- at System.Threading.Tasks.Task
1.GetResultCore(Boolean waitCompletionNotification) at Improbable.Gdk.DeploymentLauncher.Commands.Create.UploadSnapshot(SnapshotServiceClient client, String snapshotPath, String projectName, String deploymentName) in /Users/CMY/Downloads/gdk-for-unity/workers/unity/Packages/com.improbable.gdk.deploymentlauncher/.DeploymentLauncher/Commands/Create.cs:line 184 at Improbable.Gdk.DeploymentLauncher.Commands.Create.CreateDeploymentInternal[TOptions](TOptions options, Func2 getLaunchConfigJson) in /Users/CMY/Downloads/gdk-for-unity/workers/unity/Packages/com.improbable.gdk.deploymentlauncher/.DeploymentLauncher/Commands/Create.cs:line 49 at Improbable.Gdk.DeploymentLauncher.Commands.Create.CreateDeployment(Create options) in /Users/CMY/Downloads/gdk-for-unity/workers/unity/Packages/com.improbable.gdk.deploymentlauncher/.DeploymentLauncher/Commands/Create.cs:line 19 at Improbable.Gdk.DeploymentLauncher.Program.<>c.<Main>b__2_1(Create createOptions) in /Users/CMY/Downloads/gdk-for-unity/workers/unity/Packages/com.improbable.gdk.deploymentlauncher/.DeploymentLauncher/Program.cs:line 22 at Improbable.Gdk.DeploymentLauncher.Program.Main(String[] args) in /Users/CMY/Downloads/gdk-for-unity/workers/unity/Packages/com.improbable.gdk.deploymentlauncher/.DeploymentLauncher/Program.cs:line 17 UnityEngine.Debug:LogError(Object) Improbable.Gdk.DeploymentLauncher.DeploymentLauncherWindow:Update() (at /Users/CMY/Downloads/gdk-for-unity/workers/unity/Packages/com.improbable.gdk.deploymentlauncher/DeploymentLauncherWindow.cs:116) UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
my_deployment_sim1 failed
Launch of my_deployment_sim1 failed. Code: UnknownGrpcError Message: Grpc.Core.RpcException: Status(StatusCode=ResourceExhausted, Detail="couldn't schedule deployment creation; Couldn't launch deployment because your project (beta_eight_cup_619) doesn't have enough quota for it. Quota required: (18). Quota left: (10). Quota is a limit on the compute resources that your SpatialOS project can use. Try stopping any other deployments you have running then launching this one again. If you need a higher quota, get in touch.") at Grpc.Core.Internal.AsyncCall`2.UnaryCall(TRequest msg) at Grpc.Core.DefaultCallInvoker.BlockingUnaryCall[TRequest,TResponse](Method`2 method, String host, CallOptions options, TRequest request) at Grpc.Core.Internal.InterceptingCallInvoker.BlockingUnaryCall[TRequest,TResponse](Method`2 method, String host, CallOptions options, TRequest request) at Improbable.SpatialOS.Deployment.V1Alpha1.DeploymentService.DeploymentServiceClient.CreateDeployment(CreateDeploymentRequest request, CallOptions options) at Google.Api.Gax.Grpc.ApiCall.<>c__DisplayClass0_0`2.<Create>b__1(TRequest req, CallSettings cs) in C:\Users\jon\Test\Projects\gax-dotnet\releasebuild\src\Google.Api.Gax.Grpc\ApiCall.cs:line 27 at Google.Api.Gax.Grpc.ApiCallRetryExtensions.<>c__DisplayClass1_0`2.<WithRetry>b__0(TRequest request, CallSettings callSettings) in C:\Users\jon\Test\Projects\gax-dotnet\releasebuild\src\Google.Api.Gax.Grpc\ApiCallRetryExtensions.cs:line 79 at Improbable.SpatialOS.Deployment.V1Alpha1.DeploymentServiceClientImpl.CreateDeployment(CreateDeploymentRequest request, CallSettings callSettings) at Improbable.Gdk.DeploymentLauncher.Commands.Create.CreateDeploymentInternal[TOptions](TOptions options, Func`2 getLaunchConfigJson) in /Users/CMY/Downloads/gdk-for-unity/workers/unity/Packages/com.improbable.gdk.deploymentlauncher/.DeploymentLauncher/Commands/Create.cs:line 68 at Improbable.Gdk.DeploymentLauncher.Commands.Create.CreateSimulatedPlayerDeployment(CreateSimulated options) in /Users/CMY/Downloads/gdk-for-unity/workers/unity/Packages/com.improbable.gdk.deploymentlauncher/.DeploymentLauncher/Commands/Create.cs:line 24 at Improbable.Gdk.DeploymentLauncher.Program.<>c.<Main>b__2_0(CreateSimulated createOptions) in /Users/CMY/Downloads/gdk-for-unity/workers/unity/Packages/com.improbable.gdk.deploymentlauncher/.DeploymentLauncher/Program.cs:line 21 at Improbable.Gdk.DeploymentLauncher.Program.Main(String[] args) in /Users/CMY/Downloads/gdk-for-unity/workers/unity/Packages/com.improbable.gdk.deploymentlauncher/.DeploymentLauncher/Program.cs:line 17 UnityEngine.Debug:LogError(Object) Improbable.Gdk.DeploymentLauncher.DeploymentLauncherWindow:Update() (at /Users/CMY/Downloads/gdk-for-unity/workers/unity/Packages/com.improbable.gdk.deploymentlauncher/DeploymentLauncherWindow.cs:116) UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
Screenshot for SpatialOS Console
![Screen Shot 2019-06-09 at 3 58 55 PM](https://user-images.githubusercontent.com/3713305/59156764-2d0bee80-8ad3-11e9-94d5-ae66417dac98.png)
Possible Solution
I reinstalled the donet runtime and update to 2.2.5 and the problem solved.
Think you should noice people the runtime version. As I use the 2.2.204 before.
Environment
System: macOS Mojave 10.14.5
Unity: 2018.3.11f1
Donet: Core 2.2 Runtime (v2.2.5)
Summary
I have finally got everything done, the game runs perfect. Just let you guys know the problem that I encountered during the setup 🙂