luskaner / ageLANServer

Age Lan Server, supporting AoE: DE, AoE II: DE and AoE III: DE, for 100% offline play.
GNU Affero General Public License v3.0
30 stars 3 forks source link

Error while creating lobby #52

Closed terabyte110 closed 1 month ago

terabyte110 commented 1 month ago

As I mentioned on Reddit, I am getting an error while creating a lobby in any of the modes for multiplayer.

Source: AdvertisementJoinEvent Error Code: 0x00000022

As you had recommended, I have checked that the battleserver.exe is running.

Also I have manually changed the network priority. Since I will be playing over a shared wifi, I have set the priority to Wifi IPv6.

Still running into the same error.

I tried searching around for this specific error code, but didn't get any results.

luskaner commented 1 month ago

Hello:

Sad to see you still have issues, while it does not seem to be related to my server (as it happened before as you say), let's try to find the root cause :P

Can you attach the latest log you find in server/logs directory?

PS: Keep in mind both the game and my launcher/server run on IPv4 so idk if running a local network on IPv6 could create issues.

juanctkc commented 1 month ago

Same error here Attaching logs. access_log_2024-10-18T18-56-10.txt access_log_2024-10-18T18-44-59.txt

luskaner commented 1 month ago

@juanctkc

Unfortunately, the logs don't show any obvious issue.

Have you tried briefly disabling your firewall to see if that's the issue? Have you tried letting your friends host the lobby and you join it?

@terabyte110 please try these too.

juanctkc commented 1 month ago

Have you tried briefly disabling your firewall to see if that's the issue?

Yes, no changes.

Have you tried letting your friends host the lobby and you join it?

Yes, well I have 2 laptops. then i restarted them and switch their roles: (what means run launcher first the other machine to be server).

Multiplayer is enabled when i use launcher, but i can't create a lobby on both, i got this: 0x00000022

This is the error that i get when i try to create the lobby image

I also enabled Turn Windows features on or off> Windows components > Legacy Components > Direct Play

luskaner commented 1 month ago

@juanctkc when creating the lobby are you selecting in the server option (dropdown) "Use Local LAN Server" ?

juanctkc commented 1 month ago

I set "Use Local LAN Server" and allowed batllenet, server.exe, launcher.exe and age exe . I can create the lobby, but i can't see it from other laptop. I switched them between server and host, reviewed firewall. Tried public, private. Not sure if there is something that i'm missing.

luskaner commented 1 month ago

Have you tried inviting the other user from inside the lobby (search by name)?

El sáb, 19 oct 2024, 2:48, juanctkc @.***> escribió:

I set "Use Local LAN Server" and allowed batllenet, server.exe, launcher.exe and age exe . I can create the lobby, but i can't see it from other laptop. I switched them between server and host, reviewed firewall. Tried public, private. Not sure if there is something that i'm missing.

— Reply to this email directly, view it on GitHub https://github.com/luskaner/aoe2DELanServer/issues/52#issuecomment-2423413056, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOQZYW2WQ2GI2E4NCVXRZTZ4GT7HAVCNFSM6AAAAABQFSZCLGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMRTGQYTGMBVGY . You are receiving this because you were assigned.Message ID: @.***>

juanctkc commented 1 month ago

Yes, and the only way that i was able to see the lobby was creating thte lobby and inmediatly search for it in hte other laptop search by its game id: then the lobby is listed, so i click join but i get this error one AdvertisementJoinEvent 0x00000002

image

luskaner commented 1 month ago

@juanctkc mmm I only have a few ideas left:

juanctkc commented 1 month ago

Good News @luskaner , I FIXED IT.

First I'd like to answer your questions to provide more background to you and to respect your and my time that we dedicated to this.

Try setting in one or both PCs, the launcher config, CanBroadcastBattleServer to false

Tried, in one, and in both later. Same result

Are the two PC's different game installations (AKA different steam users)? If not, set in the server config, GeneratePlatformUserId to true.

Same installer was used. steam_emu.ini was updated to change users names and the ID was set to = to get random values. I tried this GeneratePlatformUserId to true, same results.

Have you tried ensuring the network adapters of both PC's the first (highest priority) is the correct network adapter?

It is the only enabled adaptar that is connected. Are wifi ones

Try an older version of the launcher/server combo such as 1.3.3 and 1.2.2

I tried both. Same results.

AGE 2 DE version is v101.102.52940.0 ($118476) 911


Good News

I found that when i connect-reconnect to the server once i opened AGE then the other user is being kicked-disconnected. That is was causing the previous described behavior.

How i Fixed it

### Steam Account ID, set it to 0 to get a random Account ID
###
AccountId=12451114

I think that the setting 'GeneratePlatformUserId' = true in the server config file should have managed this issue, but it seems it is doesn't work even for 1.2.2, 1.3.3 or 1.4.0. Or i might be missing something as i'm not developing this wonderful app.

Step by step

  1. download 1.4.0 full
  2. update launcher/resources/config.ini by setting 'Executable' variable to my aoe 2 de exe file location
  3. update 'steam_emu.ini' file from the game installation folder, by setting 'AccountId' to a random number
  4. Step 1 to 3 have to be done in Machine A and B
  5. Run launcher.exe in Machine A, follow the console outputs accept the file execution and network access: it should launch the server and then the game
  6. Run launcher.exe in Machine B, , follow the console outputs accept the file execution and network access: it should find the server that is running in Machine A
  7. Create a match in one of these machines, mandatory settings are "Local Lan Server" and "Public" . In the other Machine you need to find the match by simple searching-refreshing for matches in the lobby, or filter the match name or match ID
  8. Join and Enjoy

@luskaner Thank you so much!

luskaner commented 1 month ago

@juanctkc Oh glad to see it finally works (and good work with your extensive explanation and testing everything I could think of)!

The issue you had, other uses had it before and they were able to fix it via the mentioned Server config, so it's quite strange that it doesn't work for you (as long as the two PC's use different IP's which I think it's always the case).

The issue about the Steam emulator I think it's because once you set it to 0 and run the emulator the ID is then generated and saved (typically in your user profile) so it is only generated once and reused from that point.

PS: @terabyte110 how it's your issue going?

luskaner commented 1 month ago

Closing due to inactivity