Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to host more than 1 match consecutively if an achievement is obtained #36

Closed
MaMo7x opened this issue Aug 31, 2024 · 84 comments
Closed
Assignees
Labels
bug Something isn't working server server executable or genCert wontfix This will not be worked on
Milestone

Comments

@MaMo7x
Copy link

MaMo7x commented Aug 31, 2024

Describe the bug
I'm posting kind of 2 bugs in a single because I think they might be related to same problem. I'm not sure if they are both related but here they are:-

  1. Unable to rehost the game after the match ends. Not until I restart the server and the game.
  2. Receiving Receiving TLS certificate error in the server even though I am able to see the http://192.168.1.16:443/test endpoint.
    image

To Reproduce
Steps to reproduce the behavior:

  1. Create a Multiplayer Lobby.
  2. Play a game with your friend.
  3. Try to host game again after first match.
  4. Error:
    Screenshot 2024-08-31 200242
    tried to host 2-3 times still got the same error!

Expected behavior
I should be able to rehost the game after a match. Waste a lot of time and resources restarting the game and server. Also, I think TLS certificate should not give bad certificate error.

Software Components

Problem related to:

  • Server
  • Server Certificate generator

Server

  • OS/Arch: Windows 11/x64
  • Server version 1.3.1:

Launcher

  • OS/Arch: Windows 11/x64
  • Client version: image

Additional information

Additional context
I'm manually starting the server not by launcher. And I have set IP: 192.168.1.16, in my server config too . .
My IP is 192.168.1.16.
Bro's IP is 192.168.1.18.
Network type is private on both machines. http://192.168.1.16:443/test endpoint works on both machines!
I made sure checking that required programs are allowed in the firewall.

@MaMo7x MaMo7x added the bug Something isn't working label Aug 31, 2024
@MaMo7x
Copy link
Author

MaMo7x commented Aug 31, 2024

image

@MaMo7x
Copy link
Author

MaMo7x commented Aug 31, 2024

image

@luskaner luskaner added launcher launcher executable or subexecutable server server executable or genCert labels Aug 31, 2024
@luskaner luskaner added this to the v1.3.X milestone Aug 31, 2024
@luskaner
Copy link
Owner

luskaner commented Aug 31, 2024

Hello:

Yeah I agree the TLS error is kind of misleading but it is how the launcher tests first if the connection works (host mapped correctly) without checking the certificate, and then the ceritificate is checked.
Anyway, I will check as there should not be the need to restart the server to create another lobby.

@luskaner luskaner added server server executable or genCert and removed server server executable or genCert launcher launcher executable or subexecutable labels Aug 31, 2024
@luskaner
Copy link
Owner

Also, as it is a self-signed certificate the browsers are likely not to trust it and that is expected too.

@KalaRaja
Copy link

KalaRaja commented Aug 31, 2024

it happens to me also but not very common. The issue I am facing that could be related to it is after playing the LAN game the first time, I (or my friends) am able to re create the lobby, but when I invite my friends or when they try to join the lobby, they get an error. All of us then have to restart the game. I'll post the screenshots and other shortly.

@luskaner
Copy link
Owner

@KalaRaja @MaMo7x Does it happen too without using a custom launcher?

@KalaRaja
Copy link

@luskaner yes it does.

@luskaner
Copy link
Owner

@KalaRaja alright will look into it
By your reports, it looks like it's probably the state the server keeps in memory that probably after 1 or more matches becomes bad.

It would also help - if you can consistently repeat the issue easily - to test the latest of 1.0.X, 1.1.X and 1.2.X to see if it is a bug that did not occur originally.

@luskaner luskaner pinned this issue Aug 31, 2024
@KalaRaja
Copy link

KalaRaja commented Sep 1, 2024

so this is the server log that I got When my friend tried to join my lobby for the second game but failed with an error -
TLS handshake error from 192.168.4.39:49832: remote error: tls: bad certificate

I'll try to test other versions

@luskaner
EDIT: below logs could be helpful

http: panic serving 192.168.4.41:54565: runtime error: invalid memory address or nil pointer dereference
goroutine 285 [running]:
net/http.(*conn).serve.func1()
        /opt/hostedtoolcache/go/1.22.6/x64/src/net/http/server.go:1903 +0xbe
panic({0xc34080?, 0x10a9620?})
        /opt/hostedtoolcache/go/1.22.6/x64/src/runtime/panic.go:770 +0x132
github.com/luskaner/aoe2DELanServer/server/internal/models.(*Peer).GetUser(...)
        /home/runner/work/aoe2DELanServer/aoe2DELanServer/server/internal/models/peer.go:22
github.com/luskaner/aoe2DELanServer/server/internal/models.(*Advertisement).RemovePeer(0xc00016ac60, 0xc0003250e0)
        /home/runner/work/aoe2DELanServer/aoe2DELanServer/server/internal/models/advertisement.go:362 +0x1ad
github.com/luskaner/aoe2DELanServer/server/internal/routes/game/advertisement.Leave({0xd854e0, 0xc0002a84e0}, 0xc0001d17a0)
        /home/runner/work/aoe2DELanServer/aoe2DELanServer/server/internal/routes/game/advertisement/leave.go:30 +0x99
net/http.HandlerFunc.ServeHTTP(0xc00002dd40?, {0xd854e0?, 0xc0002a84e0?}, 0xa11ccf?)
        /opt/hostedtoolcache/go/1.22.6/x64/src/net/http/server.go:2171 +0x29
net/http.(*ServeMux).ServeHTTP(0xc0001d1440?, {0xd854e0, 0xc0002a84e0}, 0xc0001d17a0)
        /opt/hostedtoolcache/go/1.22.6/x64/src/net/http/server.go:2688 +0x1ad
github.com/luskaner/aoe2DELanServer/server/internal/cmd.init.func1.SessionMiddleware.2({0xd854e0, 0xc0002a84e0}, 0xc0001d1440)
        /home/runner/work/aoe2DELanServer/aoe2DELanServer/server/internal/middleware/session.go:44 +0x14d
net/http.HandlerFunc.ServeHTTP(0xd84670?, {0xd854e0?, 0xc0002a84e0?}, 0x10?)
        /opt/hostedtoolcache/go/1.22.6/x64/src/net/http/server.go:2171 +0x29
github.com/gorilla/handlers.loggingHandler.ServeHTTP({{0xd816a0, 0xc000062850}, {0xd816c0, 0xc000391ea8}, 0xcfc4d8}, {0xd84670, 0xc000194e00}, 0xc0001d1440)
        /home/runner/go/pkg/mod/github.com/gorilla/handlers@v1.5.2/logging.go:47 +0xef
net/http.serverHandler.ServeHTTP({0xd83268?}, {0xd84670?, 0xc000194e00?}, 0x6?)
        /opt/hostedtoolcache/go/1.22.6/x64/src/net/http/server.go:3142 +0x8e
net/http.(*conn).serve(0xc0003c62d0, {0xd85b48, 0xc00008e0c0})
        /opt/hostedtoolcache/go/1.22.6/x64/src/net/http/server.go:2044 +0x5e8
created by net/http.(*Server).Serve in goroutine 7
        /opt/hostedtoolcache/go/1.22.6/x64/src/net/http/server.go:3290 +0x4b4
2024/08/31 20:35:29 http: panic serving 192.168.4.42:61050: runtime error: invalid memory address or nil pointer dereference
goroutine 223 [running]:
net/http.(*conn).serve.func1()
        /opt/hostedtoolcache/go/1.22.6/x64/src/net/http/server.go:1903 +0xbe
panic({0xc34080?, 0x10a9620?})
        /opt/hostedtoolcache/go/1.22.6/x64/src/runtime/panic.go:770 +0x132
github.com/luskaner/aoe2DELanServer/server/internal/models.(*Peer).GetUser(...)
        /home/runner/work/aoe2DELanServer/aoe2DELanServer/server/internal/models/peer.go:22
github.com/luskaner/aoe2DELanServer/server/internal/models.(*Advertisement).RemovePeer(0xc00016ac60, 0xc0003ae0c0)
        /home/runner/work/aoe2DELanServer/aoe2DELanServer/server/internal/models/advertisement.go:362 +0x1ad
github.com/luskaner/aoe2DELanServer/server/internal/routes/game/advertisement.Leave({0xd854e0, 0xc00042ea20}, 0xc0000e8ea0)
        /home/runner/work/aoe2DELanServer/aoe2DELanServer/server/internal/routes/game/advertisement/leave.go:30 +0x99
net/http.HandlerFunc.ServeHTTP(0xc00002dd40?, {0xd854e0?, 0xc00042ea20?}, 0xa11ccf?)
        /opt/hostedtoolcache/go/1.22.6/x64/src/net/http/server.go:2171 +0x29
net/http.(*ServeMux).ServeHTTP(0xc0000e8c60?, {0xd854e0, 0xc00042ea20}, 0xc0000e8ea0)
        /opt/hostedtoolcache/go/1.22.6/x64/src/net/http/server.go:2688 +0x1ad
github.com/luskaner/aoe2DELanServer/server/internal/cmd.init.func1.SessionMiddleware.2({0xd854e0, 0xc00042ea20}, 0xc0000e8c60)
        /home/runner/work/aoe2DELanServer/aoe2DELanServer/server/internal/middleware/session.go:44 +0x14d
net/http.HandlerFunc.ServeHTTP(0xd84670?, {0xd854e0?, 0xc00042ea20?}, 0x10?)
        /opt/hostedtoolcache/go/1.22.6/x64/src/net/http/server.go:2171 +0x29
github.com/gorilla/handlers.loggingHandler.ServeHTTP({{0xd816a0, 0xc000062850}, {0xd816c0, 0xc000391ea8}, 0xcfc4d8}, {0xd84670, 0xc0005a2380}, 0xc0000e8c60)
        /home/runner/go/pkg/mod/github.com/gorilla/handlers@v1.5.2/logging.go:47 +0xef
net/http.serverHandler.ServeHTTP({0xd83268?}, {0xd84670?, 0xc0005a2380?}, 0x6?)
        /opt/hostedtoolcache/go/1.22.6/x64/src/net/http/server.go:3142 +0x8e
net/http.(*conn).serve(0xc000132f30, {0xd85b48, 0xc00008e0c0})
        /opt/hostedtoolcache/go/1.22.6/x64/src/net/http/server.go:2044 +0x5e8
created by net/http.(*Server).Serve in goroutine 7
        /opt/hostedtoolcache/go/1.22.6/x64/src/net/http/server.go:3290 +0x4b4
2024/08/31 20:35:32 Received: map[ackCount:1 clientLibVersion:185 operation:1 sessionToken:stdzzu4jovybkhj9n3qnu7nycvd21g]
2024/08/31 20:35:32 Operation: 1
2024/08/31 20:35:33 Received: map[ackCount:1 clientLibVersion:185 operation:1 sessionToken:fetxcbzqzs6c5meisnpqz4hmziyomn]
2024/08/31 20:35:33 Operation: 1
2024/08/31 20:35:34 Received: map[ackCount:1 clientLibVersion:185 operation:1 sessionToken:4875nkgdeyf4gthfa1jaivf6aexe1m]
2024/08/31 20:35:34 Operation: 1
2024/08/31 20:35:37 Received: map[ackCount:1 clientLibVersion:185 operation:1 sessionToken:558mw7qdbufslprv182zt9wc1zeg1m]
2024/08/31 20:35:37 Operation: 1
2024/08/31 20:35:39 Received: map[ackCount:1 clientLibVersion:185 operation:1 sessionToken:558mw7qdbufslprv182zt9wc1zeg1m]
2024/08/31 20:35:39 Operation: 1
2024/08/31 20:36:01 Received: map[ackCount:1 clientLibVersion:185 operation:1 sessionToken:4875nkgdeyf4gthfa1jaivf6aexe1m]
2024/08/31 20:36:01 Operation: 1
2024/08/31 20:36:41 Received: map[ackCount:1 clientLibVersion:185 operation:1 sessionToken:stdzzu4jovybkhj9n3qnu7nycvd21g]
2024/08/31 20:36:41 Operation: 1
2024/08/31 20:36:41 Received: map[ackCount:1 clientLibVersion:185 operation:1 sessionToken:fetxcbzqzs6c5meisnpqz4hmziyomn]
2024/08/31 20:36:41 Operation: 1
2024/08/31 20:36:41 Received: map[ackCount:1 clientLibVersion:185 operation:1 sessionToken:558mw7qdbufslprv182zt9wc1zeg1m]
2024/08/31 20:36:41 Operation: 1
2024/08/31 20:36:42 Received: map[ackCount:1 clientLibVersion:185 operation:1 sessionToken:4875nkgdeyf4gthfa1jaivf6aexe1m]
2024/08/31 20:36:42 Operation: 1
2024/08/31 21:17:06 websocket: close sent
2024/08/31 21:17:15 websocket: close sent

@luskaner
Copy link
Owner

luskaner commented Sep 1, 2024

@KalaRaja that's extremely helpful! I hope it's the same issue that @MaMo7x has.
It's strange as the bug is when the user tries to leave a lobby it seems (not join). I'll try to get it fixed.

(as stated the TLS error is not really an issue)

@KalaRaja
Copy link

KalaRaja commented Sep 2, 2024

@luskaner i'm going to try today with 7 of my friends.

EDIT:

@luskaner

So now i am able to successfully create lobby after the first match but other players cannot see my lobby and they do not get my invitations either.

2024/09/02 16:13:37 http: panic serving 10.0.0.6:54678: runtime error: invalid memory address or nil pointer dereference
goroutine 175 [running]:
net/http.(*conn).serve.func1()
        S:/go/go1.22.6/src/net/http/server.go:1903 +0xbe
panic({0x604080?, 0xa75620?})
        S:/go/go1.22.6/src/runtime/panic.go:770 +0x132
github.com/luskaner/aoe2DELanServer/server/internal/models.(*Peer).GetUser(...)
        S:/Programacion/aoe2DELanServer/server/internal/models/peer.go:22
github.com/luskaner/aoe2DELanServer/server/internal/models.(*Advertisement).Encode(0xc000424000)
        S:/Programacion/aoe2DELanServer/server/internal/models/advertisement.go:461 +0xf5
github.com/luskaner/aoe2DELanServer/server/internal/models.FindAdvertisementsEncoded(0xc000480f50?)
        S:/Programacion/aoe2DELanServer/server/internal/models/advertisement.go:501 +0xe5
github.com/luskaner/aoe2DELanServer/server/internal/routes/game/advertisement.GetAdvertisements({0x755520, 0xc0000be360}, 0xc00056f7d8?)
        S:/Programacion/aoe2DELanServer/server/internal/routes/game/advertisement/getAdvertisements.go:18 +0x149
net/http.HandlerFunc.ServeHTTP(0xc00002de10?, {0x755520?, 0xc0000be360?}, 0x3e1ccf?)
        S:/go/go1.22.6/src/net/http/server.go:2171 +0x29
net/http.(*ServeMux).ServeHTTP(0xc0002d7560?, {0x755520, 0xc0000be360}, 0xc0002d7680)
        S:/go/go1.22.6/src/net/http/server.go:2688 +0x1ad
github.com/luskaner/aoe2DELanServer/server/internal/cmd.init.func1.SessionMiddleware.2({0x755520, 0xc0000be360}, 0xc0002d7560)
        S:/Programacion/aoe2DELanServer/server/internal/middleware/session.go:44 +0x14d
net/http.HandlerFunc.ServeHTTP(0x7546b0?, {0x755520?, 0xc0000be360?}, 0x10?)
        S:/go/go1.22.6/src/net/http/server.go:2171 +0x29
github.com/gorilla/handlers.loggingHandler.ServeHTTP({{0x7516e0, 0xc000062858}, {0x751700, 0xc00038fea8}, 0x6cc4d8}, {0x7546b0, 0xc0005060e0}, 0xc0002d7560)
        C:/Users/luska/go/pkg/mod/github.com/gorilla/handlers@v1.5.2/logging.go:47 +0xef
net/http.serverHandler.ServeHTTP({0xc0003844b0?}, {0x7546b0?, 0xc0005060e0?}, 0x6?)
        S:/go/go1.22.6/src/net/http/server.go:3142 +0x8e
net/http.(*conn).serve(0xc0003c6480, {0x755b88, 0xc0003a5470})
        S:/go/go1.22.6/src/net/http/server.go:2044 +0x5e8
created by net/http.(*Server).Serve in goroutine 7
        S:/go/go1.22.6/src/net/http/server.go:3290 +0x4b4
2024/09/02 16:13:37 http: panic serving 10.0.0.6:54894: runtime error: invalid memory address or nil pointer dereference
goroutine 8182 [running]:
net/http.(*conn).serve.func1()
        S:/go/go1.22.6/src/net/http/server.go:1903 +0xbe
panic({0x604080?, 0xa75620?})
        S:/go/go1.22.6/src/runtime/panic.go:770 +0x132
github.com/luskaner/aoe2DELanServer/server/internal/models.(*Peer).GetUser(...)
        S:/Programacion/aoe2DELanServer/server/internal/models/peer.go:22
github.com/luskaner/aoe2DELanServer/server/internal/models.(*Advertisement).Encode(0xc000424000)
        S:/Programacion/aoe2DELanServer/server/internal/models/advertisement.go:461 +0xf5
github.com/luskaner/aoe2DELanServer/server/internal/models.FindAdvertisementsEncoded(0xc00027af10?)
        S:/Programacion/aoe2DELanServer/server/internal/models/advertisement.go:501 +0xe5
github.com/luskaner/aoe2DELanServer/server/internal/routes/game/advertisement.GetAdvertisements({0x755520, 0xc0003a2ba0}, 0xc0004f97d8?)
        S:/Programacion/aoe2DELanServer/server/internal/routes/game/advertisement/getAdvertisements.go:18 +0x149
net/http.HandlerFunc.ServeHTTP(0xc00002de10?, {0x755520?, 0xc0003a2ba0?}, 0x3e1ccf?)
        S:/go/go1.22.6/src/net/http/server.go:2171 +0x29
net/http.(*ServeMux).ServeHTTP(0xc00048f7a0?, {0x755520, 0xc0003a2ba0}, 0xc00048f8c0)
        S:/go/go1.22.6/src/net/http/server.go:2688 +0x1ad
github.com/luskaner/aoe2DELanServer/server/internal/cmd.init.func1.SessionMiddleware.2({0x755520, 0xc0003a2ba0}, 0xc00048f7a0)
        S:/Programacion/aoe2DELanServer/server/internal/middleware/session.go:44 +0x14d
net/http.HandlerFunc.ServeHTTP(0x7546b0?, {0x755520?, 0xc0003a2ba0?}, 0x10?)
        S:/go/go1.22.6/src/net/http/server.go:2171 +0x29
github.com/gorilla/handlers.loggingHandler.ServeHTTP({{0x7516e0, 0xc000062858}, {0x751700, 0xc00038fea8}, 0x6cc4d8}, {0x7546b0, 0xc00049c7e0}, 0xc00048f7a0)
        C:/Users/luska/go/pkg/mod/github.com/gorilla/handlers@v1.5.2/logging.go:47 +0xef
net/http.serverHandler.ServeHTTP({0xc000322ed0?}, {0x7546b0?, 0xc00049c7e0?}, 0x6?)
        S:/go/go1.22.6/src/net/http/server.go:3142 +0x8e
net/http.(*conn).serve(0xc0003c6bd0, {0x755b88, 0xc0003a5470})
        S:/go/go1.22.6/src/net/http/server.go:2044 +0x5e8
created by net/http.(*Server).Serve in goroutine 7
        S:/go/go1.22.6/src/net/http/server.go:3290 +0x4b4
2024/09/02 16:14:13 Received: map[ackCount:1 clientLibVersion:185 operation:1 sessionToken:4g837dgcguh70qtlj9b3ipe870q1z0]
2024/09/02 16:14:13 Operation: 1

@luskaner
Copy link
Owner

luskaner commented Sep 3, 2024

Hello:

Thanks for reporting back. It seems that while I fixed the bug, there is still the root problem which looks like to me that the previous lobby stays created but without anyone inside, thus creating more errors. Try this compilation that hopefully fixes the issue completely =)

PS: Please share the server log like @MaMo7x did initially.

aoe2DELanServer_server_1.3.4_linux_arm32.tar.gz
aoe2DELanServer_server_1.3.4_linux_arm64.tar.gz
aoe2DELanServer_server_1.3.4_linux_x86-32.tar.gz
aoe2DELanServer_server_1.3.4_linux_x86-64.tar.gz
aoe2DELanServer_server_1.3.4_mac_all.tar.gz
aoe2DELanServer_server_1.3.4_mac_apple-silicon.tar.gz
aoe2DELanServer_server_1.3.4_mac_intel.tar.gz
aoe2DELanServer_server_1.3.4_win_x86-64.zip
aoe2DELanServer_server_1.3.4_win_x86-32.zip
aoe2DELanServer_server_1.3.4_win_arm32.zip
aoe2DELanServer_server_1.3.4_win_arm64.zip

@KalaRaja
Copy link

KalaRaja commented Sep 3, 2024

@luskaner i'll try today in the evening. Here are the logs that you asked -
access_log_2024-09-02T13-30-14.txt
access_log_2024-09-02T14-57-36.txt
access_log_2024-09-02T16-23-54.txt
access_log_2024-09-02T16-29-03.txt

@MaMo7x
Copy link
Author

MaMo7x commented Sep 3, 2024

So it seems it's half solved . . I'm able to start the match close it early (under 10 mins or so) and able to host the game again. But, if the closed connection is called

2024/09/03 16:23:01 websocket: close sent
2024/09/03 16:23:01 use of closed network connection
2024/09/03 16:24:17 websocket: close sent
2024/09/03 16:24:17 use of closed network connection
2024/09/03 16:35:45 websocket: close sent

and I have to click reconnect to server then I'm unable to host the game, and if I only restart the game and not the server it works!
Now the problem seems to be that if we lose connection to the server we are unable to host/join again even if we reconnect!
EDIT: update! sometime I was able to host even after reconnect but others are unable to join at all!

@luskaner
Copy link
Owner

luskaner commented Sep 3, 2024

@MaMo7x mmm maybe we are in the right direction... It would be helpful if you could provide the access log corresponding to that, thanks.

@luskaner
Copy link
Owner

luskaner commented Sep 3, 2024

Also, @KalaRaja I would like you to test something too, When in a lobby with 3 or more people, if the host leaves the lobby does the match gets cancelled or is there anyway to transfer the host of a lobby?

@KalaRaja
Copy link

KalaRaja commented Sep 3, 2024

@luskaner when the host quits the lobby while in a match, the match continues. There is no way to go back to the lobby once the match ends. The re-match option just starts another match but does not take us back to the lobby.

@luskaner
Copy link
Owner

luskaner commented Sep 3, 2024

@KalaRaja I meant before starting the match while in the lobby, it seems weirds to me that it gets cancelled (even when server is not lan) when the host leaves.

@MaMo7x
Copy link
Author

MaMo7x commented Sep 3, 2024

#36 (comment)

EDIT: update! sometime I was able to host even after reconnect but others are unable to join at all!

@KalaRaja
Copy link

KalaRaja commented Sep 3, 2024

@luskaner yes, after the host quits the lobby, other players are kicked out.

@KalaRaja
Copy link

KalaRaja commented Sep 7, 2024

@MaMo7x thanks for the logs and sad it is still the same for you :(

@KalaRaja thanks for testing, that error you posted as far as I know is not related to the server, it is usually firewall issue, something to do with network interfaces etc. in the launcher you may want to try to set CanBroadcastBattleServer to false (or even check the link the game itself said)

our firewalls are off both for public and private networks. I turned off CanBroadcastBattleServer on every PC's launcher config. We all have only one network interface with 192.168.4.xx IP. Facing the same issue.

@luskaner
Copy link
Owner

luskaner commented Sep 7, 2024

@KalaRaja If you check with the previous unstable (this issue's releases) and stable 1.3.2 version, does it happen there too?

@KalaRaja
Copy link

KalaRaja commented Sep 7, 2024

@KalaRaja If you check with the previous unstable (this issue's releases) and stable 1.3.2 version, does it happen there too?

yes it happened to me with all versions but resolved after restarting the server and restarting my friends launchers. With the 1.3.2.mod.3 version, no matter what I do, my friends cannot join (I can re-host after the match though).

In fact, my first ever comment on this Issue was related to players not able to join the lobby intermittently, I didn't even know there was a bug where we cannot host after the first match.

@luskaner
Copy link
Owner

luskaner commented Sep 7, 2024

@MaMo7x your issue seems to be related with achievements, if you look the access_log you will see a spam of 'grantAchievement' the server will not authorize them to avoid cheating (maybe it should?), can you try making a match of any type, and surrender fast so you don't win any achievement at all? you may try doing exactly the same with the live server and then repeating the same so you don't win an achivement on the local server. You can then check it worked if in the access_log there is not a single 'grantAchievement'

@luskaner
Copy link
Owner

luskaner commented Sep 7, 2024

@KalaRaja Indirectly there are some bugs which might prevent re-hosting, (and one more issue was reintroduced in an unstable version posted here) the thing is, you both and @MaMo7x have different issues that may end up with the same outcome if that makes sense. have you provided the logs for the last version and your friends unable to join?

@KalaRaja
Copy link

KalaRaja commented Sep 7, 2024

Hi @MaMo7x and @KalaRaja, this new build should hopefully fix the issue of not being able to create more than one match (additionally, a regression introduced after the 1.3.3 test build is fixed too), a bunch of other fixes are included too (of course running the server for more than 1h should not be buggy either).
aoe2DELanServer_server_1.3.2-mod.3_linux_arm32.tar.gz aoe2DELanServer_server_1.3.2-mod.3_linux_arm64.tar.gz aoe2DELanServer_server_1.3.2-mod.3_linux_x86-32.tar.gz aoe2DELanServer_server_1.3.2-mod.3_linux_x86-64.tar.gz aoe2DELanServer_server_1.3.2-mod.3_mac_all.tar.gz aoe2DELanServer_server_1.3.2-mod.3_mac_apple-silicon.tar.gz aoe2DELanServer_server_1.3.2-mod.3_mac_intel.tar.gz aoe2DELanServer_server_1.3.2-mod.3_win_arm32.zip aoe2DELanServer_server_1.3.2-mod.3_win_arm64.zip aoe2DELanServer_server_1.3.2-mod.3_win_x86-32.zip aoe2DELanServer_server_1.3.2-mod.3_win_x86-64.zip

I was able to create the first lobby but my friends could not join it.

20240907_093044.jpg

logs_unable_to_join_first_lobby.zip

Password is in the email

I'll test again to see if I am somehow able host the first match and then update if I am not able to host the next one.

EDIT : None of my friends could join the first lobby no matter how many times I restart the server.

@luskaner here are the logs and i have emailed you the password

@luskaner
Copy link
Owner

luskaner commented Sep 7, 2024

@KalaRaja thanks

@luskaner
Copy link
Owner

luskaner commented Sep 7, 2024

@KalaRaja as stated, the issue of your friends unable to join the game is not related to the server per se, the game has another server called BattleServer. There is nothing the server can do to make that work, the launcher includes a fix that helps in some situations (or may hinder in others idk). It is an issue with the game itself, as you can see, even the game developers include a link to help solve the issues.

The same config I stated before, your friends can also change that to see if it helps.

PS: as you said, is also not related to this issue either.

@KalaRaja
Copy link

KalaRaja commented Sep 7, 2024

@KalaRaja as stated, the issue of your friends unable to join the game is not related to the server per se, the game has another server called BattleServer. There is nothing the server can do to make that work, the launcher includes a fix that helps in some situations (or may hinder in others idk). It is an issue with the game itself, as you can see, even the game developers include a link to help solve the issues.

The same config I stated before, your friends can also change that to see if it helps.

PS: as you said, is also not related to this issue either.

nice. Then I guess if I get it working, all of my issues will be resolved. Thanks.

@KalaRaja
Copy link

KalaRaja commented Sep 7, 2024

@KalaRaja as stated, the issue of your friends unable to join the game is not related to the server per se, the game has another server called BattleServer. There is nothing the server can do to make that work, the launcher includes a fix that helps in some situations (or may hinder in others idk). It is an issue with the game itself, as you can see, even the game developers include a link to help solve the issues.

The same config I stated before, your friends can also change that to see if it helps.

PS: as you said, is also not related to this issue either.

nice. Then I guess if I get it working, all of my issues will be resolved. Thanks.

@luskaner My raspberry pi pi-vpn was enabled that was causing some problems. I can create lobby and my friends can join now. Even hosting after the first match works. Looks like my issues are resolved. I'm going to try to play for more than 1 hour and verify if re hosting works.

@luskaner
Copy link
Owner

luskaner commented Sep 7, 2024

@KalaRaja oh perfect, that makes total sense, I hope it works, but as per Mamo7x report you might encounter issues if some player gains an achievement ;)

@KalaRaja
Copy link

KalaRaja commented Sep 7, 2024

@KalaRaja oh perfect, that makes total sense, I hope it works, but as per Mamo7x report you might encounter issues if some player gains an achievement ;)

so far it's all good at my side. if I encounter problems I'll post logs.

@MaMo7x
Copy link
Author

MaMo7x commented Sep 8, 2024

@MaMo7x your issue seems to be related with achievements, if you look the access_log you will see a spam of 'grantAchievement' the server will not authorize them to avoid cheating (maybe it should?), can you try making a match of any type, and surrender fast so you don't win any achievement at all? you may try doing exactly the same with the live server and then repeating the same so you don't win an achivement on the local server. You can then check it worked if in the access_log there is not a single 'grantAchievement'

Ya, I tried and your logic seems to be true. But it shouldn't be an issue to allow all achievements when and if I'm using custom launcher. What do you say? Or don't return 200 on grantAchievement?

I hosted 3-4 times resigned with no achievement and re-host seems to be working fine.

Then, I hosted another game played whole match and couldn't rehost. Looking at the access_logs I could see the spam of grantAchievement on it this time.

@luskaner
Copy link
Owner

luskaner commented Sep 8, 2024

@MaMo7x that's right if using a custom launcher I think even if the server allowed it, the client could not really claim it anyway - however the server has no knowledge if the client is using a custom launcher or not - good suggestion will try changing the http status code, the issue is reproducing it as I need to do something that makes me win an achievement

@luskaner luskaner changed the title Unable to host more than 1 match consecutively . . . Unable to host more than 1 match consecutively if an achievement is obtained Sep 8, 2024
@luskaner
Copy link
Owner

luskaner commented Sep 8, 2024

Thanks to @KalaRaja and @MaMo7x now we have the v1.3.3 release :), it will however not fix this specific issue about achievements, but until I find a final solution @MaMo7x, here it is a modded version based off that which just agrees to granting achievements so it should work.

@KalaRaja
Copy link

KalaRaja commented Sep 8, 2024

so here are the logs from 1.3.2.mod.3 that have some achievements and lobby failed to create after the first match.
I'll try the 1.3.3.mod.1 and see if the second lobby works if the players earn achievements.

EDIT: @luskaner oops I didn't upload the logs and deleted it later on my machine. It had bunch of grantAchievements requests. Anyway, I'll test the new 1.3.3.mod.1

@luskaner
Copy link
Owner

luskaner commented Sep 8, 2024

@KalaRaja ok, better just go ahead with testing with v1.3.3 and any possible mod based off it. One thing I forgot is that this modded version with not produce the requests.json so just ignore it =)

@MaMo7x
Copy link
Author

MaMo7x commented Sep 8, 2024

About the 1.3.3

Fix: The host of a lobby must always be present, the host leaving deletes the lobby instead of just the host being vacant.

Today on v1.3.2mod3 when I left the game during match other's match just stuck . . . haven't tested it completely but it happened.

@luskaner
Copy link
Owner

luskaner commented Sep 8, 2024

@MaMo7x yeah I think that was possible, but let's see how the current version works for you for any further fix.

To not make this issue about everything, please create another issue if it's not related to the achievements :)

@MaMo7x
Copy link
Author

MaMo7x commented Sep 8, 2024

@luskaner So, I hosted the game with AI (cause my brother is gone now for studies I'm basically alone), and I got achievements and couldn't rehost. I tried restarting the client (not the server) got error:
image
And in access_logs I still see the achievement spam: access_log_2024-09-09T01-24-08.txt

@luskaner
Copy link
Owner

luskaner commented Sep 8, 2024

@MaMo7x Mmm you sure you tried the modded v1.3.3 and not the base version? should not happen... 🤔

The relevant log part:

192.168.1.16 - - [09/Sep/2024:02:08:03 +0500] "POST /game/advertisement/host HTTP/1.1" 200 44
192.168.1.16 - - [09/Sep/2024:02:08:04 +0500] "POST /game/relationship/setPresence HTTP/1.1" 200 4
192.168.1.16 - - [09/Sep/2024:02:08:07 +0500] "GET /game/advertisement/findAdvertisements?appBinaryChecksum=118476&callNum=38&connect_id=9pyplutl9y5pb7ay2mj2esvwdik4rm&count=50&dataChecksum=0&desc=0&matchType_id=0&modDLLChecksum=0&modDLLFile=INVALID&modName=INVALID&modVersion=INVALID&sessionID=9pyplutl9y5pb7ay2mj2esvwdik4rm&start=0&versionFlags=56950784 HTTP/1.1" 200 10
192.168.1.16 - - [09/Sep/2024:02:08:07 +0500] "GET /game/advertisement/findAdvertisements?appBinaryChecksum=118476&callNum=39&connect_id=9pyplutl9y5pb7ay2mj2esvwdik4rm&count=50&dataChecksum=0&desc=0&matchType_id=0&modDLLChecksum=0&modDLLFile=INVALID&modName=INVALID&modVersion=INVALID&sessionID=9pyplutl9y5pb7ay2mj2esvwdik4rm&start=0&versionFlags=56950784 HTTP/1.1" 200 10
192.168.1.16 - - [09/Sep/2024:02:08:09 +0500] "POST /game/advertisement/host HTTP/1.1" 200 44

at no point is the server notified the first match ended, so it will not let the user host another... the user must do /game/advertisement/leave after the first /game/advertisement/host

Edit: these are actual the 2nd and 3rd call to /host, there are multiple login/logout so it's difficult to determine the actual issue, but looks like it's the achievements again :(.

@KalaRaja
Copy link

KalaRaja commented Sep 9, 2024

@luskaner Could not create the lobby after the first match. 1.3.3.mod.1
access_log_2024-09-08T18-46-02.txt

@luskaner
Copy link
Owner

luskaner commented Sep 9, 2024

@KalaRaja thanks, that means the attempted fix does not work at all, will go back to the drawing board.

@luskaner
Copy link
Owner

luskaner commented Sep 9, 2024

@KalaRaja + @MaMo7x

Summary of my findings:

  • The only way to fix this in the server is to give him all the achievements, so the player won't request any more achievements. The game will actually claim the achievements and so because of cheating this cannot be done.
  • The only other possible way is to grant him the single achievement it's asking for, once again, this should not be possible, it's still cheating - on a much more limited scale - as you are not playing on official servers, and yet I've tried but could not make it work.

I see two possible workarounds:

  • Enable the lobby 'cheats' and as quickly as you enter the match, do some small cheat code (that can be reverted), likely all other players need to do that as well.
  • Restart the game after each match.

TLDR: It cannot be fixed by the server/launcher alone, it's how the game works.

@luskaner luskaner added the wontfix This will not be worked on label Sep 9, 2024
@MaMo7x
Copy link
Author

MaMo7x commented Sep 9, 2024

But we didn't try giving error when asked for achievement . . might also try that? What do you say? Or isn't there a way to disable achievements? Can I disable achievements on custom launcher?

@luskaner
Copy link
Owner

luskaner commented Sep 9, 2024

@MaMo7x I was able to reproduce locally and regardless of what message and status code you return the client keeps repeating the requests with no end. Look at workarounds (and your mail)

@luskaner luskaner closed this as not planned Won't fix, can't repro, duplicate, stale Sep 9, 2024
@luskaner luskaner unpinned this issue Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working server server executable or genCert wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants