Description
Calling POST /api/v1/chat/message always throws a 500 error, regardless of request payload.
Environment
- Torch Remote version: v1.0.13
- Torch version: v1.3.1.340-master
- Space Engineers game version: 1.210.14.0
- Running under Wine 11.0 (parkervcp/yolks:wine_latest Docker image), ListenerType set to
Internal as recommended for Wine setups
- ListenerType: Internal (works fine — server binds and responds, so this is not a Wine issue)
Steps to reproduce
- Configure
TorchRemote.cfg with a valid UrlPrefix and ListenerType=Internal
- Start Torch, plugin loads successfully, web server binds without error
- Send a POST request to
/api/v1/chat/message with a valid Bearer token:
{"author":"Test","message":"Hallo Welt","channel":0}
Expected behavior
Message is broadcast to the game chat.
Actual behavior
500 Internal Server Error:
System.MissingFieldException: Field not found: 'VRage.Network.ChatMsg.CustomAuthorName'.
Suspected cause
Looking at ChatController.cs, CustomAuthorName is assigned unconditionally on every call:
var msg = new ChatMsg
{
CustomAuthorName = request.Author ?? Statics.Torch.Config.ChatName,
...
This suggests the plugin binary was built against a version of VRage.Network.ChatMsg that no longer matches the field layout in game version 1.210.14.0 — possibly a field rename/removal in a recent SE update.
Full server-side log
Captured directly from the Torch console output at the moment of the failed request:
13:15:15.951 INF >> [WebServer] [K2wzBTXd0EaMga9K2egneA] POST /api/v1/chat/message: "500 Internal Server Error" sent in 243ms (chunked)
13:15:15.866 ERR >> [WebServer] [K2wzBTXd0EaMga9K2egneA] Unhandled exception.
$type : System.MissingFieldException
Message : Field not found: 'VRage.Network.ChatMsg.CustomAuthorName'.
TargetSite : Void SendMessage(TorchRemote.Models.Requests.ChatMessageRequest)
StackTrace :
at TorchRemote.Plugin.Controllers.ChatController.SendMessage(ChatMessageRequest request)
at lambda_method(Closure , IHttpContext , RouteMatch )
at EmbedIO.Routing.RouteResolverBase1.d__12.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at EmbedIO.Routing.RouteResolverCollectionBase2.d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at EmbedIO.Routing.RoutingModuleBase.d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at EmbedIO.WebModuleBase.d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at EmbedIO.ExceptionHandler.d__16.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at EmbedIO.WebModuleBase.d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at EmbedIO.Internal.WebModuleCollection.d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at EmbedIO.WebServerBase`1.d__41.MoveNext()
Source : TorchRemote.Plugin
HResult : -2146233071
Description
Calling
POST /api/v1/chat/messagealways throws a 500 error, regardless of request payload.Environment
Internalas recommended for Wine setupsSteps to reproduce
TorchRemote.cfgwith a validUrlPrefixandListenerType=Internal/api/v1/chat/messagewith a valid Bearer token:{"author":"Test","message":"Hallo Welt","channel":0}Expected behavior
Message is broadcast to the game chat.
Actual behavior
500 Internal Server Error:
System.MissingFieldException: Field not found: 'VRage.Network.ChatMsg.CustomAuthorName'.
Suspected cause
Looking at
ChatController.cs,CustomAuthorNameis assigned unconditionally on every call:This suggests the plugin binary was built against a version of
VRage.Network.ChatMsgthat no longer matches the field layout in game version 1.210.14.0 — possibly a field rename/removal in a recent SE update.Full server-side log
Captured directly from the Torch console output at the moment of the failed request:
13:15:15.951 INF >> [WebServer] [K2wzBTXd0EaMga9K2egneA] POST /api/v1/chat/message: "500 Internal Server Error" sent in 243ms (chunked)
13:15:15.866 ERR >> [WebServer] [K2wzBTXd0EaMga9K2egneA] Unhandled exception.
$type : System.MissingFieldException
Message : Field not found: 'VRage.Network.ChatMsg.CustomAuthorName'.
TargetSite : Void SendMessage(TorchRemote.Models.Requests.ChatMessageRequest)
StackTrace :
at TorchRemote.Plugin.Controllers.ChatController.SendMessage(ChatMessageRequest request)
at lambda_method(Closure , IHttpContext , RouteMatch )
at EmbedIO.Routing.RouteResolverBase1.d__12.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at EmbedIO.Routing.RouteResolverCollectionBase2.d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at EmbedIO.Routing.RoutingModuleBase.d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at EmbedIO.WebModuleBase.d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at EmbedIO.ExceptionHandler.d__16.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at EmbedIO.WebModuleBase.d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at EmbedIO.Internal.WebModuleCollection.d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at EmbedIO.WebServerBase`1.d__41.MoveNext()
Source : TorchRemote.Plugin
HResult : -2146233071