Skip to content
This repository has been archived by the owner on Jun 27, 2022. It is now read-only.

Infinite connecting loop #6

Closed
jjablonski-it opened this issue Jan 7, 2021 · 12 comments
Closed

Infinite connecting loop #6

jjablonski-it opened this issue Jan 7, 2021 · 12 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@jjablonski-it
Copy link

2021-01-07T13:52:48.098661+00:00 app[web.1]: 100.0% - Finalizing world - 0.0%
2021-01-07T13:52:50.971907+00:00 app[web.1]: Terraria Server v1.4.1.2
2021-01-07T13:52:50.971978+00:00 app[web.1]:
2021-01-07T13:52:50.974250+00:00 app[web.1]: Listening on port 7777
2021-01-07T13:52:50.977677+00:00 app[web.1]: Type 'help' for a list of commands.
2021-01-07T13:52:50.977844+00:00 app[web.1]:
2021-01-07T13:52:51.225250+00:00 app[web.1]: : ================
2021-01-07T13:52:51.225290+00:00 app[web.1]: 01/07/2021 13:52:51: Unhandled Exception
2021-01-07T13:52:51.225290+00:00 app[web.1]: Thread: 7 [Server Input Thread]
2021-01-07T13:52:51.225291+00:00 app[web.1]: Culture:
2021-01-07T13:52:51.225292+00:00 app[web.1]: Exception: System.NullReferenceException: Object reference not set to an instance of an object
2021-01-07T13:52:51.225293+00:00 app[web.1]: at Terraria.Main.startDedInputCallBack () [0x00017] in :0
2021-01-07T13:52:51.225296+00:00 app[web.1]: at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00014] in :0
2021-01-07T13:52:51.225298+00:00 app[web.1]: at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00071] in :0
2021-01-07T13:52:51.225298+00:00 app[web.1]: at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in :0
2021-01-07T13:52:51.225300+00:00 app[web.1]: at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x0002b] in :0
2021-01-07T13:52:51.225301+00:00 app[web.1]: at System.Threading.ThreadHelper.ThreadStart () [0x00008] in :0
2021-01-07T13:52:51.225301+00:00 app[web.1]: ================
2021-01-07T13:52:51.225843+00:00 app[web.1]: [ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object
2021-01-07T13:52:51.225844+00:00 app[web.1]: at Terraria.Main.startDedInputCallBack () [0x00017] in :0
2021-01-07T13:52:51.225845+00:00 app[web.1]: at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00014] in :0
2021-01-07T13:52:51.225845+00:00 app[web.1]: at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00071] in :0
2021-01-07T13:52:51.225846+00:00 app[web.1]: at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in :0
2021-01-07T13:52:51.225846+00:00 app[web.1]: at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x0002b] in :0
2021-01-07T13:52:51.225847+00:00 app[web.1]: at System.Threading.ThreadHelper.ThreadStart () [0x00008] in :0

@barbarbar338
Copy link
Owner

I have also encountered this error. The reason is not related to this project, but to Terraria. When trying to open a new version map (eg 1.4.1.2) with an old version Terraria (eg 1.4.1.1) it gives this error. try to regenerate your map or downgrade your terraria server version.

@jjablonski-it
Copy link
Author

@barbarbar338 It crashes right away before I even try to connect to a server. Works good on localhost. Tried multiple times same result.
I changed server version to 1.4.1.1 (https://terraria.org/system/dedicated_servers/archives/000/000/041/original/terraria-server-1411.zip) and now it doesn't see the server files.
2021-01-07T15:30:22.365947+00:00 heroku[web.1]: Starting process with command npm start
2021-01-07T15:30:25.921129+00:00 app[web.1]:
2021-01-07T15:30:25.921155+00:00 app[web.1]: > [email protected] start /app
2021-01-07T15:30:25.921155+00:00 app[web.1]: > ts-node src --start
2021-01-07T15:30:25.921156+00:00 app[web.1]:
2021-01-07T15:30:32.204357+00:00 app[web.1]: [TerrariaServer]: TerrariaServer.bin.x86_64 not found. Run build first.
2021-01-07T15:30:32.328453+00:00 heroku[web.1]: Process exited with status 0
2021-01-07T15:30:32.375244+00:00 heroku[web.1]: State changed from starting to crashed

@barbarbar338
Copy link
Owner

barbarbar338 commented Jan 7, 2021

Can you write down the exact server startup and connection phases? i'll try to do same as you. Because idk whats the problem :( exactly what commands do you use and how do you connect from terraria

@jjablonski-it
Copy link
Author

jjablonski-it commented Jan 7, 2021

For now I was just cloning the repo, installing dependencies and pushing it to heroku. Haven't tried connecting from client yet because of crashes.

@jjablonski-it
Copy link
Author

Run build first.

Ok I can't read. I thought it says "Running build first" and exits. Im supposed to build it first. I'll try to add heroku-postbuild script to handle that

@barbarbar338
Copy link
Owner

If this "heroku-postbuild" thing works, I would appreciate it if you open a pull request for it <3

@jjablonski-it
Copy link
Author

jjablonski-it commented Jan 7, 2021

I would love to. I love the idea but I can't get it to work :(
Should it work right away after cloning and uploading it to heroku, or is there any configuration to be made?

Edit: I have noticed that even after error I had opened the issue with, the app itself is still standing and the message
"Terraria server started on 172.16.62.58:7777" is visible on the side, but still can't connect. (endless loading)

@barbarbar338
Copy link
Owner

Are we sure that Heroku opened the port "7777" to us? As far as I know it opens a different port each time and saves it to the process environment.

@jjablonski-it
Copy link
Author

You are right, It opens a different port each time. I also tried to connect through the logged port at the server start, still endless connecting. :(

@BjornGrylls
Copy link
Contributor

BjornGrylls commented Jan 7, 2021

If I remember correctly the Exception: System.NullReferenceException: Object reference not set to an instance of an object comes because of TerrariaServer is being run as a background service. If you connect with the bash and start the server from there, the server doesn't crash because of that, but instead crashes because of missing memory. And you can't connect anyway. Thats why I dumped Heroku free tier as Terraria server.
Also they only allow http requests, so you would need some kind of adapter on both the server and client. (In case Terraria doesn't use http for communication, which I haven't checked)
Also their inside port is dynamic, and will be mapped to port 80/443 on the outside. I was about to fix that last time I looked at this project, but the other things made me stop trying.

I don't recall what Glitch's policies are about connecting.

In the end my solution was to grab an old laptop, reset BIOS master pw (because I had forgotten it) and setup the server on that. Then using GameRanger to connect because I don't have a public IP and couldn't get Hamachi virtual LAN working without installing anything on the PCs.

@barbarbar338
Copy link
Owner

barbarbar338 commented Jan 8, 2021

Well, i guess this repo is going to be archived soon 😢

@barbarbar338 barbarbar338 pinned this issue Jan 8, 2021
@barbarbar338 barbarbar338 changed the title Server crashing Infinite connecting loop Jan 8, 2021
@barbarbar338 barbarbar338 added bug Something isn't working help wanted Extra attention is needed labels Jan 8, 2021
@barbarbar338
Copy link
Owner

I don't know if you are still interested but I fixed the problem with #7

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants