Make-Tarkov-Great-Again/MTGA-JS

[Linux] Connecting to server using Wine

MadByteDE opened this issue · 8 comments

Hey,

I'm on Linux using wine / proton / lutris to run the game (works well unmodified / with BepInEx installed but no plugins).

I installed BepInEx sucessfully (config dir etc created, getting log files) and installed the plugin as well as nvm, node.js and the server.

I had to change the port of the server to something else since (as stated in the readme) I'd need admin privilege which is a bit tricky on Linux using the Steam Deck.

Now when launching the game it closes immediately and I assume I have to set the correct port for the client. How can I do that? Or may I have another issue? I got so far, I hope it can work on Linux :D

Here is the error in the log file.

Thanks!

You are just running the exe or from the webinterface?
Because the exe need a parameters to actually connect to server and so on

You are just running the exe or from the webinterface? Because the exe need a parameters to actually connect to server and so on

hadn't seen there is an web interface, thanks for the hint. I "registered" in it now, but launching from here won't be possible out of the box. I'll look into the code to see if there is a way to launch my specific command to pipe the parameters to. But I guess there is some code needed server-side to do it properly on linux / wine setups.. which I believe wouldn't be a priority at all :D

Would it be possible to display the specific parameters the client would get from the server to manually append them? I'll look into it as well. Thanks so far!

Found it:

exec(tarkovPath + ' -bC5vLmcuaS5u={"email":"' + userAccount.email + '","password":"' + userAccount.password + '","toggle":true,"timestamp":0} -token=' + sessionID + ' -config={"BackendUrl":"https://' + ip + ':' + port + '","Version":"live"}');

I'll play around with it a bit. Thanks.

Okay, I actually managed to append my modified parameter arguments successfully, but I potentially don't have the correct session id since when connecting it works but the game menu is just blank, no buttons - just the background. I tried to use the "session id" I could find in the server console when connecting with my profile, but I believe this is not the right one ? The server shows:

[WARNING] 2023-02-04 11:44:20 Bundles not implemented yet
[12:44:19.798] INFO (41540): incoming request {"reqId":"req-6","req":"[POST] /client/WebSocketAddress"}
[12:44:19.802] INFO (41540): request completed {"reqId":"req-6","res":"200","responseTime":4.0545899998396635}
[12:44:20.401] INFO (41540): incoming request {"reqId":"req-7","req":"[GET] /getBundleList"}
[12:44:20.404] INFO (41540): request completed {"reqId":"req-7","res":"200","responseTime":2.8809730000793934}
[12:44:20.678] INFO (41540): incoming request {"reqId":"req-8","req":"[POST] /client/raid/person/killed/showMessage"}
[12:44:20.679] INFO (41540): request completed {"reqId":"req-8","res":"200","responseTime":1.2426750008016825}
[12:44:38.699] INFO (41540): incoming request {"reqId":"req-9","req":"[POST] /client/game/start"}
[12:44:38.702] INFO (41540): Request body size did not match Content-Length {"reqId":"req-9","res":"400"}
    err: {
      "type": "FastifyError",
      "message": "Request body size did not match Content-Length",
      "stack":
          FastifyError: Request body size did not match Content-Length
              at IncomingMessage.onEnd (/run/media/mmcblk0p1/escape-from-tarkov/drive_c/Battlestate Games/MTGA-Backend-main/node_modules/fastify/lib/contentTypeParser.js:260:18)
              at IncomingMessage.emit (node:events:513:28)
              at endReadableNT (node:internal/streams/readable:1359:12)
              at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
      "name": "FastifyError",
      "code": "FST_ERR_CTP_INVALID_CONTENT_LENGTH",
      "statusCode": 400
    }
[12:44:38.705] INFO (41540): request completed {"reqId":"req-9","res":"400","responseTime":6.054610999301076}

This is my parameter string:

-bC5vLmcuaS5u={\'email\':\'test\',\'password\':\'test\',\'toggle\':true,\'timestamp\':0} -token=63de301f3bc2d17d8c0030d2 -config={\'BackendUrl\':\'https://127.0.0.1:6030\',\'Version\':\'live\'}

I had to change " to ' and escape the character with \ because Linux would just filter the characters out otherwise.

So close. :/

Are you using the develop branch?

Are you using the develop branch?

In settings "Developer" is selected yes. Changing to "Edge of Darkness" doesn't seem to change anything either.

EDIT:
You mean on Github, no the latest release version / main branch.

Are you using the develop branch?

It works with the develop branch!

Thanks.. 👍

No problem,

Have fun!