EcoIssues icon indicating copy to clipboard operation
EcoIssues copied to clipboard

USER ISSUE: Can't connect to server

Open IneaFaedyn opened this issue 1 year ago • 11 comments


User Id: (15d8af73-9240-4df7-2d54-08dcce89dbe7) Version: 0.11.0.4 beta release-722

Steps to Reproduce: I created a server using a cloud hosting service. When joining the server, I get an error message.

The server seems to start properly, I can access the web UI and see the world, but when I try to connect I get NullReferenceException

Expected behavior: connected

Actual behavior: The following error message popped up:

Server encountered an exception:

<size=60.00%>Exception: NullReferenceException
Message:Object reference not set to an instance of an object.
Source:Eco.Gameplay

System.NullReferenceException: Object reference not set to an instance of an object.
   at Eco.Gameplay.Players.User.Login(Player player, INetClient client, Boolean allowDisconnectionAfterActionFailure, Boolean ignoreTestMode)
   at Eco.Gameplay.Players.Player..ctor(User user, Single viewDistance, INetClient client)
   at Eco.Plugins.Networking.Client.SpawnPlayer(Single viewDistance, String language)
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
Outer Exceptions:
Exception has been thrown by the targ</size>...

Check log file to see full message.

Do you have mods installed? Does the issue happen when no mods are installed?: no

**Please provide log files. Instruction is here https://github.com/StrangeLoopGames/EcoIssues/wiki/Getting-the-Eco-game-log-file

IneaFaedyn avatar Sep 07 '24 03:09 IneaFaedyn

in the service hosting console did you link your eco account? something like this pic

pflannigan avatar Sep 07 '24 05:09 pflannigan

@pflannigan Yes 2024-09-07 11_53_26-g-portal com — Mozilla Firefox

ghost avatar Sep 07 '24 15:09 ghost

@pflannigan Not sure if it helps, but I also noticed that it stops responding with the NullReferenceException and changes to

Authentication handshake failed with exception: Server is offline or running in offline mode. It needs to be started in online mode to allow players to connect to it.

I didn't turn it off and I didn't change anything to offline or online mode.

It seems to consistently do this though, starts with NullReferenceException no matter who logs in, and then sometime after shows offline. I assume something internal is breaking and making it shut itself down? But I can still access the web UI and it seems to suggest that time is moving forward in-game.

ghost avatar Sep 07 '24 23:09 ghost

Also found this in a recent log that I don't remember seeing in the initial log, just mentions that it's receiving a 401 response somewhere

[11:53:00.009] [113] [Error] [Eco] System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object. at Eco.Gameplay.Players.User.Login(Player player, INetClient client, Boolean allowDisconnectionAfterActionFailure, Boolean ignoreTestMode) at Eco.Gameplay.Players.Player..ctor(User user, Single viewDistance, INetClient client) at Eco.Plugins.Networking.Client.SpawnPlayer(Single viewDistance, String language) at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor) at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr) --- End of inner exception stack trace --- at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) at Eco.Shared.Networking.RPCInvocation.Invoke() at Eco.Shared.Networking.RPCManager.Invoke(INetClient client, RPCInvocation invocation, Boolean notifyOnPermissionFail) at Eco.Shared.Networking.RPCManager.InvokeOn(INetClient client, BSONObject bson, Object target, String methodName) at Eco.Shared.Networking.RPCManager.HandleReceiveRPC(INetClient client, BSONObject bson) at Eco.Plugins.Networking.NetworkServer.Eco.Shared.Networking.INetworkEventHandler.ReceiveEvent(INetClient client, NetworkEvent netEvent, BSONValue bsonValue) at Eco.Shared.Networking.NetObject.ReceiveEvent(INetClient client, NetworkEvent netEvent, BSONValue bson) at Eco.Plugins.Networking.Client.<.ctor>b__86_4() System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object. at Eco.Gameplay.Players.User.Login(Player player, INetClient client, Boolean allowDisconnectionAfterActionFailure, Boolean ignoreTestMode) at Eco.Gameplay.Players.Player..ctor(User user, Single viewDistance, INetClient client) at Eco.Plugins.Networking.Client.SpawnPlayer(Single viewDistance, String language) at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor) at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr) --- End of inner exception stack trace --- at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) at Eco.Shared.Networking.RPCInvocation.Invoke() at Eco.Shared.Networking.RPCManager.Invoke(INetClient client, RPCInvocation invocation, Boolean notifyOnPermissionFail) at Eco.Shared.Networking.RPCManager.InvokeOn(INetClient client, BSONObject bson, Object target, String methodName) at Eco.Shared.Networking.RPCManager.HandleReceiveRPC(INetClient client, BSONObject bson) at Eco.Plugins.Networking.NetworkServer.Eco.Shared.Networking.INetworkEventHandler.ReceiveEvent(INetClient client, NetworkEvent netEvent, BSONValue bsonValue) at Eco.Shared.Networking.NetObject.ReceiveEvent(INetClient client, NetworkEvent netEvent, BSONValue bson) at Eco.Plugins.Networking.Client.<.ctor>b__86_4() [12:51:41.700] [136] [Error] [Eco] The HTTP status code of the response was not expected (401).

Status: 401 Response:

ghost avatar Sep 07 '24 23:09 ghost

Actually that log file also shows that it logs in I think

log_240907010609.log

[11:50:11.026] [10] [ Info] [Eco] Logged in to Strange Cloud using username and password.

[11:50:11.051] [15] [ Info] [Eco] Eco Server 0.11.0.4 beta release-722, Logged in as Sizdian

[11:50:11.051] [4] [ Info] [Eco] Starting PerformancePlugin ...

ghost avatar Sep 07 '24 23:09 ghost

Also I can see the join attempts in the chat logs

[2024-09-06 22:30:25.530][ Info] --> Inea Faedyn joined the server. [2024-09-06 22:53:25.145][ Info] --> Inea Faedyn joined the server. [2024-09-06 23:01:34.197][ Info] --> Inea Faedyn joined the server. [2024-09-06 23:14:32.283][ Info] --> Inea Faedyn joined the server. [2024-09-06 23:15:41.635][ Info] --> Vundecat joined the server.

ghost avatar Sep 07 '24 23:09 ghost

What cloud service is that? A 401 could indicate a block by cloudflare.

D3nnis3n avatar Sep 08 '24 22:09 D3nnis3n

@D3nnis3n G-Portal

ghost avatar Sep 08 '24 22:09 ghost

Is this solely happening for you or for everyone? Does the issue persist when you create a new world? Can you join other worlds with the same account?

D3nnis3n avatar Sep 09 '24 06:09 D3nnis3n

@D3nnis3n It was happening for everyone and persisted each time I created a new world. I didn't try to join another world, but I just switched cloud hosts and everything's good now, so it might have been something specific to the other one.

I dunno if the issue should be kept open. I don't have a problem anymore, but I feel like the error could have been more descriptive as I wouldn't have solved it with the old game host because I didn't have enough insight or control over the server and the error and logs didn't tell me much about the actual underlying issue. I assume something network related.

ghost avatar Sep 13 '24 15:09 ghost

Well, it's a 401 - Unauthorized, so requests from that server were denied. Potentially by Cloudflare for security reasons. Without direct contact to someone that has system access to the host server (so a G-Portal Rep) and the IP of the server while it's running there isn't anything that could be investigated there, hence I'm going to close the report.

That also wouldn't be a bug, but an issue for [email protected].

D3nnis3n avatar Sep 15 '24 16:09 D3nnis3n