Cloud Code Deployment status stuck at 0%

Hello,

When I try to deploy or update Cloud Code -scripts from Editor’s Deployment-window nothing happens. Deployment-status progress bar just sits at 0% until I close the window. On reopen the window is reset to default view. Weird thing is that this is working as intended on my coworkers computer but not mine. There are no errors or messages in the Console.

1 Like

Hi simo_unity543, thanks for raising the issue, we’ll look into it right away.

To have a bit more context to help us identify your situation:

  • Do you have the same behaviour with any other scripts ? and is it also failing to do anything with another org/project/environment in UGS ?
  • What version of the packages (com.unity.services.cloudcode & com.unity.services.deployment) are you using and what Editor version ?

Thanks!

Hello,

I can’t deploy any scripts. I also now tried to deploy in a different project (same org) and the result was exactly the same. I hope I understood your first point correctly.

Version details:

  • Unity Editor 2021.3.12f1

  • Deployment 1.0.0-pre-7

  • Deployment API 1.0.0-pre.5

  • Cloud Code 2.2.1

  • Manager level permissions in organization. Feature works on the computer of Owner-permission having person.

Thanks for the informations and yes that answered my initial question. We’ll investigate and come back to you soon.

Quick update: We are still trying to reproduce the issue, in the meantime, could you confirm if the script is updated still or not in the dashboard after you deploy (regardless of the ui remaining @ 0)?

We’ll work on preparing a new version with additional logging so that we can see better what is happening on your side. Apologies for the delays.

Hello everyone,

I have the same issue. UI remains at 0%. Also the scripts aren’t updated to the cloud dashboard regardless of the UI.
I can “almost” confirm that it worked perfectly before on pre-7 and unity 2021.3.11f1 as I could check and test deploying using the latest group feature for the scripts.

  • Unity Editor 2021.3.12f1

  • Deployment 1.0.0-pre-7

  • Cloud Code 2.2.1

It would be nice to find this bug soon, as currently the deployment editor window its the only sane way to handle multiple environments (dev->stage->production) for the cloud scripts. Thanks!

1 Like

Tested this and the update I made did not reach the dashboard.

1 Like

Thanks for the updates.

We are still investigating the issue. As mentioned before, we prepared a new version of Cloud Code, 2.2.2, to help identify the problem. It is now available through package manager by name. 8756683--1186699--install-by-name.png

Once installed, to enable the verbose logging, simply add this scripting define symbol in your Player Settings: ENABLE_UNITY_SERVICES_VERBOSE_LOGGING.

If you could try again with this and share with us the console logs in a dm, it would help us debug the issue.

Your help is much appreciated. Thanks!

Hi!

It is worth mentioning that you can now use the UGS CLI to deploy cloud code configuration (as well as remote config).
It is the same implementation as the deploy action from the cloud code deployment UI, except executed from the command line.
It enables more use cases and provide the ability to deploy files as part of automated build pipeline.

Please refer to the forum post for more informations and how to get started with the CLI!

Hi!

I could solve the issue thanks to the new 2.2.2 cloud code version. After updating the package I tried to update a script but this time I got some errors on the console. Those errors pointed to node environment settings, which they were somehow wrong.

Thanks for your help.

1 Like

I managed to solve the issue with these instructions. I was missing the node.js installation. Preferences- > Cloud Code already had the path to correct place by default. I double checked and the CloudCode-documentation does not mention this as a requirement. Coworker had this already installed and that is why this was working as intended on his computer.

Thank you for your help!

1 Like

Glad to see this was resolved, we’ll look into improving that part of the logging as well as the documentation to make it more clear in terms of requirement. Thanks for those feedback.

I’m having a similar issue. Closing unity once usually fixes the issue. The times it has NOT worked have been when I’ve had errors in the cloud code module (this flew under my radar since they don’t show up in the console) or when certain files in my module haven’t been saved, which would normally result in another console error when things don’t line up between scripts, but again, no console errors. Very confused why I have to reset unity each time I want to deploy a change, though… I’m on unity 6 and cloud code 2.9.0 and Deployment 1.4.1

I upgraded all my packages and it fixed the issue. If I had to guess at a specific one, I’d say it was the Multiplayer services package, since it’s the only one that I uypdated that had a dependency or was linked with the deployment package

ah, interesting. I don’t have multiplayer package in my project. Maybe i’ll try adding it and see if it magically fixes it.

it did not fix the problem. trying to deploy gets stuck on “Compiling…” 0% until unity is closed and opened again.

Hey @Valentine13 ,

To confirm, you are using CC@2.9 and deployment@1.4.1 right?
Can you add the following define directive (Project Settings> Player > Scripting Define Symbols) and try again? ENABLE_UNITY_CLOUD_CODE_AUTHORING_VERBOSE_LOGGING

Send your console output my way, maybe it’ll diagnose something. It should give a lot of extra info.

I had a similar problem happen once, and it had to do with the dotnet process just stalling, what OS are you running? Try killing the dotnet process and trying again without restarting the editor.
I may need to pop a timeout in that :sweat: .

Is there a specific part I should be pasting? or a… text file logged somewhere? It looks like a lot of line references that may not be so useful…

however, I noticed this " -c Release -r “linux-x64” -o " and I am not running linux. I’m on Windows 10 64 bit.

killing the .net host processes works perfectly, though I have to do it each time. Seems it can only handle 1 upload.
And yes those package version numbers are what I have in this project.

Help → Open Editor Console Log.
Anything that stands out could be useful

Cloudcode itself runs on linux machines on the cloud :slight_smile:

This could be a good lead, if you do a single upload it always works? if you do 2, but if there are 2, it does not? Does it stall for 2? under what circumstances do you need to kill dotnet?
Trying to figure out what the conditions are, so we can repro/fix.

On a separate but related topic, why do you have multiple modules?

We recommend strongly against having multiple modules, it makes logical sense to have 2 modules, one for runtime work (everything in general) and one for admin work (eg help me populate a leaderboard with dummy data) . Having a bunch of modules will degrade the experience of your game, since we have to boot different containers per module.

Cheers

Oh sorry, I miscommunicated. I only have a single module. I can upload it one time, but then if I make a change and try to upload again, it freezes and I have to kill the .net host process. The same issue happens when I click generate bindings. it will hang until i kill .net, then clicking generate bindings again will work. I have not been able to get it to work twice in a row without resetting the .net.

this is what I get when it’s stuck on 0%

UnityEngine.Logger:Log (string,object)
Unity.Services.CloudCode.Authoring.Editor.Shared.Logging.Logger:LogVerbose (object) (at ./Library/PackageCache/com.unity.services.cloudcode/Editor/Authoring/Shared/Logging/Logger.Gen.cs:26)
Unity.Services.CloudCode.Authoring.Editor.Logging.Logger:LogVerbose (object) (at ./Library/PackageCache/com.unity.services.cloudcode/Editor/Authoring/Logging/Logger.cs:25)
Unity.Services.CloudCode.Authoring.Editor.Projects.Dotnet.DotnetRunner/<ExecuteDotnetAsync>d__7:MoveNext () (at ./Library/PackageCache/com.unity.services.cloudcode/Editor/Authoring/Projects/Dotnet/DotnetRunner.cs:75)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<string>:Start<Unity.Services.CloudCode.Authoring.Editor.Projects.Dotnet.DotnetRunner/<ExecuteDotnetAsync>d__7> (Unity.Services.CloudCode.Authoring.Editor.Projects.Dotnet.DotnetRunner/<ExecuteDotnetAsync>d__7&)
Unity.Services.CloudCode.Authoring.Editor.Projects.Dotnet.DotnetRunner:ExecuteDotnetAsync (System.Collections.Generic.IEnumerable`1<string>,System.Threading.CancellationToken)
Unity.Services.CloudCode.Authoring.Editor.Core.Deployment.SolutionPublisher/<PublishSolution>d__4:MoveNext () (at ./Library/PackageCache/com.unity.services.cloudcode/Editor/Authoring/Core/Deployment/SolutionPublisher.cs:34)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder:Start<Unity.Services.CloudCode.Authoring.Editor.Core.Deployment.SolutionPublisher/<PublishSolution>d__4> (Unity.Services.CloudCode.Authoring.Editor.Core.Deployment.SolutionPublisher/<PublishSolution>d__4&)
Unity.Services.CloudCode.Authoring.Editor.Core.Deployment.SolutionPublisher:PublishSolution (string,string,string,System.Threading.CancellationToken)
Unity.Services.CloudCode.Authoring.Editor.Core.Deployment.SolutionPublisher/<PublishSolutionLinux64>d__2:MoveNext () (at ./Library/PackageCache/com.unity.services.cloudcode/Editor/Authoring/Core/Deployment/SolutionPublisher.cs:20)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder:Start<Unity.Services.CloudCode.Authoring.Editor.Core.Deployment.SolutionPublisher/<PublishSolutionLinux64>d__2> (Unity.Services.CloudCode.Authoring.Editor.Core.Deployment.SolutionPublisher/<PublishSolutionLinux64>d__2&)
Unity.Services.CloudCode.Authoring.Editor.Core.Deployment.SolutionPublisher:PublishSolutionLinux64 (string,string,System.Threading.CancellationToken)
Unity.Services.CloudCode.Authoring.Editor.Core.Deployment.ModuleGeneration.ModuleBuilder/<Publish>d__8:MoveNext () (at ./Library/PackageCache/com.unity.services.cloudcode/Editor/Authoring/Core/Deployment/ModuleGeneration/ModuleBuilder.cs:86)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<bool>:Start<Unity.Services.CloudCode.Authoring.Editor.Core.Deployment.ModuleGeneration.ModuleBuilder/<Publish>d__8> (Unity.Services.CloudCode.Authoring.Editor.Core.Deployment.ModuleGeneration.ModuleBuilder/<Publish>d__8&)
Unity.Services.CloudCode.Authoring.Editor.Core.Deployment.ModuleGeneration.ModuleBuilder:Publish (Unity.Services.CloudCode.Authoring.Editor.Core.Model.IModuleItem,string,System.Threading.CancellationToken)
Unity.Services.CloudCode.Authoring.Editor.Core.Deployment.ModuleGeneration.ModuleBuilder/<CreateCloudCodeModuleFromSolution>d__5:MoveNext () (at ./Library/PackageCache/com.unity.services.cloudcode/Editor/Authoring/Core/Deployment/ModuleGeneration/ModuleBuilder.cs:45)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder:Start<Unity.Services.CloudCode.Authoring.Editor.Core.Deployment.ModuleGeneration.ModuleBuilder/<CreateCloudCodeModuleFromSolution>d__5> (Unity.Services.CloudCode.Authoring.Editor.Core.Deployment.ModuleGeneration.ModuleBuilder/<CreateCloudCodeModuleFromSolution>d__5&)
Unity.Services.CloudCode.Authoring.Editor.Core.Deployment.ModuleGeneration.ModuleBuilder:CreateCloudCodeModuleFromSolution (Unity.Services.CloudCode.Authoring.Editor.Core.Model.IModuleItem,System.Threading.CancellationToken)
Unity.Services.CloudCode.Authoring.Editor.Deployment.Modules.CloudCodeModuleDeployCommand/<Compile>d__9:MoveNext () (at ./Library/PackageCache/com.unity.services.cloudcode/Editor/Authoring/Deployment/Modules/CloudCodeModuleDeployCommand.cs:63)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<System.Collections.Generic.List`1<Unity.Services.CloudCode.Authoring.Editor.Core.Model.IScript>>:Start<Unity.Services.CloudCode.Authoring.Editor.Deployment.Modules.CloudCodeModuleDeployCommand/<Compile>d__9> (Unity.Services.CloudCode.Authoring.Editor.Deployment.Modules.CloudCodeModuleDeployCommand/<Compile>d__9&)
Unity.Services.CloudCode.Authoring.Editor.Deployment.Modules.CloudCodeModuleDeployCommand:Compile (System.Collections.Generic.IEnumerable`1<Unity.Services.CloudCode.Authoring.Editor.Modules.CloudCodeModuleReference>,System.Threading.CancellationToken)
Unity.Services.CloudCode.Authoring.Editor.Deployment.Modules.CloudCodeModuleDeployCommand/<ExecuteAsync>d__7:MoveNext () (at ./Library/PackageCache/com.unity.services.cloudcode/Editor/Authoring/Deployment/Modules/CloudCodeModuleDeployCommand.cs:41)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder:Start<Unity.Services.CloudCode.Authoring.Editor.Deployment.Modules.CloudCodeModuleDeployCommand/<ExecuteAsync>d__7> (Unity.Services.CloudCode.Authoring.Editor.Deployment.Modules.CloudCodeModuleDeployCommand/<ExecuteAsync>d__7&)
Unity.Services.CloudCode.Authoring.Editor.Deployment.Modules.CloudCodeModuleDeployCommand:ExecuteAsync (System.Collections.Generic.IEnumerable`1<Unity.Services.CloudCode.Authoring.Editor.Modules.CloudCodeModuleReference>,System.Threading.CancellationToken)
Unity.Services.DeploymentApi.Editor.Command`1<Unity.Services.CloudCode.Authoring.Editor.Modules.CloudCodeModuleReference>:ExecuteAsync (System.Collections.Generic.IEnumerable`1<Unity.Services.DeploymentApi.Editor.IDeploymentItem>,System.Threading.CancellationToken) (at ./Library/PackageCache/com.unity.services.deployment.api/Editor/DeploymentWindowApi/Command.cs:77)
Unity.Services.Deployment.Editor.Interface.DeploymentViewModel/<ExecuteCommandAsync>d__47:MoveNext () (at ./Library/PackageCache/com.unity.services.deployment/Editor/Interface/DeploymentViewModel.cs:218)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder:Start<Unity.Services.Deployment.Editor.Interface.DeploymentViewModel/<ExecuteCommandAsync>d__47> (Unity.Services.Deployment.Editor.Interface.DeploymentViewModel/<ExecuteCommandAsync>d__47&)
Unity.Services.Deployment.Editor.Interface.DeploymentViewModel:ExecuteCommandAsync (System.Collections.Generic.IEnumerable`1<System.Tuple`2<Unity.Services.DeploymentApi.Editor.DeploymentProvider, Unity.Services.DeploymentApi.Editor.Command>>,System.Collections.Generic.IReadOnlyCollection`1<Unity.Services.Deployment.Editor.Interface.IDeploymentItemViewModel>)
Unity.Services.Deployment.Editor.Interface.DeploymentViewModel:ExecuteCommandAsync (System.Collections.Generic.IReadOnlyCollection`1<Unity.Services.Deployment.Editor.Interface.IDeploymentItemViewModel>,System.Func`2<Unity.Services.DeploymentApi.Editor.DeploymentProvider, Unity.Services.DeploymentApi.Editor.Command>) (at ./Library/PackageCache/com.unity.services.deployment/Editor/Interface/DeploymentViewModel.cs:181)
Unity.Services.Deployment.Editor.Interface.DeploymentViewModel/<DeployItemsAsync>d__39:MoveNext () (at ./Library/PackageCache/com.unity.services.deployment/Editor/Interface/DeploymentViewModel.cs:89)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder:SetResult ()
Unity.Services.Deployment.Editor.Interface.DeploymentViewModel/<ValidateEnvironment>d__41:MoveNext () (at ./Library/PackageCache/com.unity.services.deployment/Editor/Interface/DeploymentViewModel.cs:126)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<Unity.Services.Core.Editor.Environments.ValidationResult>:SetResult (Unity.Services.Core.Editor.Environments.ValidationResult)
Unity.Services.Core.Editor.Environments.EnvironmentValidator/<ValidateEnvironmentAsync>d__5:MoveNext () (at ./Library/PackageCache/com.unity.services.core/Editor/Core/Environments/EnvironmentValidator.cs:50)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<bool>:SetResult (bool)
Unity.Services.Core.Editor.Environments.EnvironmentValidator/<EnvironmentExistsInProjectAsync>d__6:MoveNext () (at ./Library/PackageCache/com.unity.services.core/Editor/Core/Environments/EnvironmentValidator.cs:63)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<System.Nullable`1<Unity.Services.Core.Editor.Environments.EnvironmentInfo>>:SetResult (System.Nullable`1<Unity.Services.Core.Editor.Environments.EnvironmentInfo>)
Unity.Services.Core.Editor.Environments.EnvironmentsClientFactory/<FetchEnvironment>d__4:MoveNext () (at ./Library/PackageCache/com.unity.services.core/Editor/Core/Environments/EnvironmentsClientFactory.cs:43)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<Unity.Services.Core.Editor.Environments.EnvironmentInfo>:SetResult (Unity.Services.Core.Editor.Environments.EnvironmentInfo)
Unity.Services.Core.Editor.Environments.EnvironmentsClient/<GetEnvironment>d__4:MoveNext () (at ./Library/PackageCache/com.unity.services.core/Editor/Core/Environments/EnvironmentsClient.cs:32)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<Unity.Services.Core.Environments.Client.Response`1<Unity.Services.Core.Environments.Client.Models.UnityEnvironmentV1>>:SetResult (Unity.Services.Core.Environments.Client.Response`1<Unity.Services.Core.Environments.Client.Models.UnityEnvironmentV1>)
Unity.Services.Core.Environments.Client.Apis.Default.DefaultApiClient/<UnityGetEnvironmentAsync>d__15:MoveNext () (at ./Library/PackageCache/com.unity.services.core/Editor/Core/Environments/Client/Apis/DefaultApi.cs:572)
System.Threading.ExecutionContext:RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
S