Unable to run ML-Agents at my Win11 PC due to gRPC exception

Hi everyone!

I’m starting to learn about ML-Agents, and want to run the 3DBall example.
At first, I setup both environments(Windows 11 Pro), unity side(ML Agents Extensions) and Python side(ml-agents & ml-agents-env).
Next, I loaded a 3D Ball project for Unity, and did some setup.
Finally, I ran mlagents-learn and push Unity run button.

At this time, ML-Agents Extention returned the “Unexpected gRPC exception”.(Details are given at the end of the text.)
I did the same in a Windows 10 environment, but it didn’t occurred this error.

I hope to resolve this problem, and want to run a ML-Agents Extention in my Win11 PC.
I would appreciate it a lot if anyone could help. Thanks!

  • Environment

  • PC

  • OS: Windows 11 Pro(Version 22H2, OS build:22621.1413)

  • CPU:Intel Core i9-13900KF

  • GPU:NVIDIA GeForce RTX 4090

  • RAM:128GB

  • Sortware (I tried some versions)

  • Unity 2020.3 / 2021.3 / 2022.2

  • ML-Agents(from GitHub) release 19/14/20 & latest main branch.


Unexpected gRPC exception when trying to initialize communication: Grpc.Core.RpcException: Status(StatusCode=Cancelled, Detail=“Received http2 header with status: 404”)
at Grpc.Core.Internal.AsyncCall2[TRequest,TResponse].UnaryCall (TRequest msg) [0x00172] in <2f154ad39ec14cfea604815989d96352>:0 at Grpc.Core.Calls.BlockingUnaryCall[TRequest,TResponse] (Grpc.Core.CallInvocationDetails2[TRequest,TResponse] call, TRequest req) [0x00006] in <2f154ad39ec14cfea604815989d96352>:0
at Grpc.Core.DefaultCallInvoker.BlockingUnaryCall[TRequest,TResponse] (Grpc.Core.Method2[TRequest,TResponse] method, System.String host, Grpc.Core.CallOptions options, TRequest request) [0x00009] in <2f154ad39ec14cfea604815989d96352>:0 at Grpc.Core.Interceptors.InterceptingCallInvoker.<BlockingUnaryCall>b__3_0[TRequest,TResponse] (TRequest req, Grpc.Core.Interceptors.ClientInterceptorContext2[TRequest,TResponse] ctx) [0x0001b] in <2f154ad39ec14cfea604815989d96352>:0
at Grpc.Core.ClientBase+ClientBaseConfiguration+ClientBaseConfigurationInterceptor.BlockingUnaryCall[TRequest,TResponse] (TRequest request, Grpc.Core.Interceptors.ClientInterceptorContext2[TRequest,TResponse] context, Grpc.Core.Interceptors.Interceptor+BlockingUnaryCallContinuation2[TRequest,TResponse] continuation) [0x00009] in <2f154ad39ec14cfea604815989d96352>:0
at Grpc.Core.Interceptors.InterceptingCallInvoker.BlockingUnaryCall[TRequest,TResponse] (Grpc.Core.Method2[TRequest,TResponse] method, System.String host, Grpc.Core.CallOptions options, TRequest request) [0x00010] in <2f154ad39ec14cfea604815989d96352>:0 at Unity.MLAgents.CommunicatorObjects.UnityToExternalProto+UnityToExternalProtoClient.Exchange (Unity.MLAgents.CommunicatorObjects.UnityMessageProto request, Grpc.Core.CallOptions options) [0x00000] in C:\Users\10008161\tmp\ml-agents_19\com.unity.ml-agents\Runtime\Grpc\CommunicatorObjects\UnityToExternalGrpc.cs:90 at Unity.MLAgents.CommunicatorObjects.UnityToExternalProto+UnityToExternalProtoClient.Exchange (Unity.MLAgents.CommunicatorObjects.UnityMessageProto request, Grpc.Core.Metadata headers, System.Nullable1[T] deadline, System.Threading.CancellationToken cancellationToken) [0x00000] in C:\Users\10008161\tmp\ml-agents_19\com.unity.ml-agents\Runtime\Grpc\CommunicatorObjects\UnityToExternalGrpc.cs:80
at Unity.MLAgents.RpcCommunicator.Initialize (System.Int32 port, Unity.MLAgents.CommunicatorObjects.UnityOutputProto unityOutput, Unity.MLAgents.CommunicatorObjects.UnityInputProto& unityInput) [0x00038] in C:\Users\10008161\tmp\ml-agents_19\com.unity.ml-agents\Runtime\Communicator\RpcCommunicator.cs:227
at Unity.MLAgents.RpcCommunicator.Initialize (Unity.MLAgents.CommunicatorInitParameters initParameters, Unity.MLAgents.UnityRLInitParameters& initParametersOut) [0x0003b] in C:\Users\10008161\tmp\ml-agents_19\com.unity.ml-agents\Runtime\Communicator\RpcCommunicator.cs:112
UnityEngine.Debug:Log (object)
Unity.MLAgents.RpcCommunicator:Initialize (Unity.MLAgents.CommunicatorInitParameters,Unity.MLAgents.UnityRLInitParameters&) (at C:/Users/10008161/tmp/ml-agents_19/com.unity.ml-agents/Runtime/Communicator/RpcCommunicator.cs:135)
Unity.MLAgents.Academy:InitializeEnvironment () (at C:/Users/10008161/tmp/ml-agents_19/com.unity.ml-agents/Runtime/Academy.cs:452)
Unity.MLAgents.Academy:LazyInitialize () (at C:/Users/10008161/tmp/ml-agents_19/com.unity.ml-agents/Runtime/Academy.cs:286)
Unity.MLAgents.Academy:.ctor () (at C:/Users/10008161/tmp/ml-agents_19/com.unity.ml-agents/Runtime/Academy.cs:255)
Unity.MLAgents.Academy/<>c:<.cctor>b__86_0 () (at C:/Users/10008161/tmp/ml-agents_19/com.unity.ml-agents/Runtime/Academy.cs:117)
System.Lazy`1<Unity.MLAgents.Academy>:get_Value ()
Unity.MLAgents.Academy:get_Instance () (at C:/Users/10008161/tmp/ml-agents_19/com.unity.ml-agents/Runtime/Academy.cs:132)
Unity.MLAgents.DecisionRequester:Awake () (at C:/Users/10008161/tmp/ml-agents_19/com.unity.ml-agents/Runtime/DecisionRequester.cs:57)

Hello everyone,

Thank you for taking the time to read our post.

We understand that our situation may be rare, and unfortunately we have not received a response to our question.
As a result, we would like to ask our question on the Unity-Technologies GitHub page (GitHub - Unity-Technologies/ml-agents: The Unity Machine Learning Agents Toolkit (ML-Agents) is an open-source project that enables games and simulations to serve as environments for training intelligent agents using deep reinforcement learning and imitation learning.).

Best regards.