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

Cannot see each others in lobby, Monster Hunter multiplayer #19772

Open
4 of 5 tasks
Atsilut opened this issue Dec 28, 2024 · 14 comments
Open
4 of 5 tasks

Cannot see each others in lobby, Monster Hunter multiplayer #19772

Atsilut opened this issue Dec 28, 2024 · 14 comments

Comments

@Atsilut
Copy link

Atsilut commented Dec 28, 2024

Game or games this happens in

ULJM05500 - Monster Hunter Portable 2nd G, ULJM05800 - Monster Hunter Portable 3rd

What area of the game / PPSSPP

There is a connection issue when playing multiplayer on Monster Hunter Portable 2nd G(Freedom Unite) & Monster Hunter Portable 3rd with direct LAN connect to my router.

Symptoms

  1. Network Initailized
  2. I can see someone entering my room, even it's able to chat each other
  3. Cannot find each other, tried multiple times posting quest and accept but never happened.
  4. We can find each other in socom.cc wep page.
    Even socom.cc connection has same symptoms, so it is really weird

Settings

These are my test-environment.
|| means OR, which I also cross-tested every possible variances.

PPSSPP Settings

  • Use same build version of PPSSPP, v1.18.1 || v1.18.1-549-gcc040ab251
  • No port offset(which also set on server PC and client mobile || PC with completely different LAN)
  • WLAN activated(don't ask me again. it's stupid), Checked use built-in adhoc server
  • Address : Usually DDNS for my router || Direct IP Address || socom.cc address
  • Host - Used UPnP
    Don't ask me again about IP address is correct, I ping-tested DDNS and direct IP with another PC from different region.

Router

  • Firewall inbound settings(TCP/UDP) || Disable whole Firewall
  • Router's DMZ & Fort-forward(TCP/UDP 27312 || TCP/UDP 1~30000 || TCP 27312 + UDP 10000)
  • Built-in AdHoc Server from PPSSPP || SOCOM server

I thought it should be my network issue, so tested and see bunch of codes for debug like 10 hours but it happens in SOCOM server. What a big lame.
By the way, I'm too tired. I apologize for bad written issue report.
Let me know if you need more information like logs and connection conditions.

What should happen

It syncs well, can see each other, even quest can be posted and joined.

Logs

This is the log tested with SOCOM server, written by SCENET INFO level.
The "Invalid socket id" caused when I re-entered the room for re-connect, when I can find someone entered my room in the console log. I'm not sure if it caused re-entering empty room condition.

log.txt

Platform

Android

Mobile device model or graphics card (GPU)

RTX 4070, SM-G996N, etc

PPSSPP version affected

v1.18.1, v1.18.1-549-gcc040ab251, latest Android PPSSPP

Last working version

No response

Graphics backend (3D API)

Vulkan

Checklist

  • Test in the latest git build in case it's already fixed.
  • Search for other reports of the same issue.
  • Try resetting settings or older versions and include if the issue is related.
  • Try without any cheats and without loading any save states.
  • Include logs or screenshots of issue.
@Atsilut
Copy link
Author

Atsilut commented Dec 28, 2024

I don't know it's appropriate reporting this issue, I have an weird symptom too.
When I entered room, someone(that I don't know) joined my room. What feels weird is, I think that 'someone' controlled my character. I let my controller like already drank crushed coke-can on my desk *so far away from me, but character moves, even find some selection to leave another room.

@anr2me
Copy link
Collaborator

anr2me commented Dec 28, 2024

I'm not sure which ports are used by MH games, but by using "No port offset" (in other words 0 port offset) means that the game could use restricted ports under 1024, which is blocked by Android system.
Have you tried using Port Offset 10000 or 20000 to see whether it was caused by blocked ports by Android OS?

Regarding "invalid socket id" it can happen if the game tried to use an already deleted socket, from the logs it probably happened at the time you ungracefully left multiplayer.
It might also occurred right before the FriendFinder thread (the one communicating with Adhoc Server) is shutting down, may be it have leftover data that need to be send to Adhoc Server before shutting down (ie. logout packet or something), it's hard to tell whether that "invalid socket id" came from the game's code or from the FriendFinder's code (since the FriendFinder thread doesn't have it's own PSP thread).

Regarding your character being controlled by someone, did you use any cheat? because the cheat might accidentally tampered with character ID number, so i would suggest disabling any cheat while testing, since no one have reported this kind of issue before.

Also, have you tried using older version of PPSSPP, like v1.17 or v1.16 or even v1.15, in case this issue only occurred on the latest version.

PS: There was an issue of broken multiplayer on MH Freedom after the introduction of RetroAchievements before #17969 (not sure whether it's related or not), you can try with DisableHTTPS = False in ppsspp.ini

@Atsilut
Copy link
Author

Atsilut commented Dec 28, 2024

  1. I tested almost time with other PC in different region. So I guess that's not the problem.
    But you said it's wrong, so I will try some more with different offset.
  2. I didn't use any cheat, I tested only vanila game.
  3. I tried only v1.17, but it had same problem and not that quite old version so I didn't mention.
  4. I read Monster Hunter Freedom - multiplayer broke for some people #17969, But there is only similar option named HTTPEnabled currently. Yeah.. I tried that False too, but nothing changes

@Atsilut
Copy link
Author

Atsilut commented Dec 28, 2024

By the way, Do you have any recommended older version to test? I really wonder it is emulator issue because someone's still doing well, and even I have successfully played multiplayer in socom.cc once

@Atsilut
Copy link
Author

Atsilut commented Dec 28, 2024

Yep I guess port offset doesn't matter with this, it still doesn't work

@anr2me
Copy link
Collaborator

anr2me commented Dec 28, 2024

  1. I read Monster Hunter Freedom - multiplayer broke for some people #17969, But there is only similar option named HTTPEnabled currently. Yeah.. I tried that False too, but nothing changes

i think you will need to add that DisableHTTPS = False, DisableHTTPS and HTTPEnabled are probably 2 different things.

@Atsilut
Copy link
Author

Atsilut commented Dec 28, 2024

Okay I tested some more like 10 times with put DisableHTTPS = False to ppsspp.ini (with v1.18.1), it doesn't change.
I even tried DisableHTTPS = True, knowing it doesn't work.
Also found socom.cc sometimes connect well, but sometimes doesn't.
I'm quite confused now because there is no console error with INFO level logging, though I can't sync with other PC, or mobile whatever it is.
Is there any Idea?

@anr2me
Copy link
Collaborator

anr2me commented Dec 28, 2024

If you're playing with other people at socom.cc, the problem could be on their side (ie. some of their ports got blocked).

But i also saw something strange in the logs

I[SCENET]: HLE\proAdhocServer.cpp:1351 AdhocServer: Crosslinked ULJM05500 to ULUS10391

It tried to mix Monster Hunter Portable 2nd G [JP] with Monster Hunter Freedom Unite (USA) O.o are they the same game? if not, it's expected to have communication issue.

And this is the lines that cross-linked both (Monster Hunter Portable 2nd G [JP] and Monster Hunter Freedom Unite [EUR]) games with Monster Hunter Freedom Unite (USA) game

{ "ULES01213", "ULUS10391" },
{ "ULJM05500", "ULUS10391" },

@Atsilut
Copy link
Author

Atsilut commented Dec 29, 2024

I think that log is from when I entered a room for test, some random guy was already there.
And sorry I didn't say that, every test I did with my friend in different region was with same ISO file.

I have two logs, tested with MH2G(MHFU), v1.18.1
This is the log with succesfully connected in socom.cc.
The logs before "Connection Success" comment are connection with my router.
log with successful connection.txt

And this is the log from failed connection in socom.cc, with some random guys
log with random guy, didn't connect.txt

@anr2me
Copy link
Collaborator

anr2me commented Dec 29, 2024

Well those INFO Logs didn't shows any communication between players, it only shows communication with Adhoc Server (which includes the chat feature), may be you need to get the Debug Logs to see the Send/Recv logs.

For example, if the logs only shows Send without any Recv, it's usually due to blocked port preventing any incoming packet, both player's logs need to be checked since the blocked port could be on someone else side.

Another issue that could cause communication issue is when a port remapping occurred, for example if the opened port supposed to be 2000 (internal port known by PPSSPP & the game) but for some reason the public port that was opened by ISP is a different one (usually random port), this will make you able to send but unable to receive because the game only know it supposed to communicate over port 2000 (but the one opened by ISP was different, thus can't go through port 2000 on public IP).

We can only detects this port remapping issue on games that use AdhocMatching and GameMode library, because we know which port it supposed to use for sending and receiving, and when we detects data that came from a different port we shows a "Data from Unknown port" warning on screen, and use that unknown port the next time we send to that IP (we assumed that the sender of that data from unknown port was having port remapping issue).
Unfortunately, we can't detects these issue on games that use low-level sockets and implement their own matchmaking without using AdhocMatching/GameMode library, because different games can use different port for communication and we have no idea whether the data came from the correct port or not (since it depends on the game developer implementation)

@Atsilut
Copy link
Author

Atsilut commented Dec 29, 2024

I see. I'm not sure I understand correctly because I'm not native English speaker so I'd be glad if you let me obvious.
As I understand, that INFO logs are now totally useless because it doesn't give any clue of packet send/receive, so we need to get deeper by DEBUG log.
Also MH seems not using AdhocMatching/GameMode library, so the port remapping issues might not be detected.

  1. I will try to gather logs of the success and failure in debug level, SCENET log is the only things I need? Or need some more like SYSTEM/PRINTF?
  2. My friends are not interested in this problem, so maybe it's just only me. I think the only way I test myself is, my PC + my phone not using PC network router, then logging with adb. Would that be enough?
  3. I mean no offense what I'm saying. If I do these things, would you be willing to help me? I will do my best, but I'm just a junior web dev-wannabe so solving my own feels quite challenging

@anr2me
Copy link
Collaborator

anr2me commented Dec 29, 2024

Debugging multiplayer is difficult, since we need the logs from both players, so we can compare the logs' timestamp to see whether the packets sent by Player1 was able to be received by Player2 (and vice versa), and how long it took to be received.

  1. You can set SCENET to Debug, with SCEUTIL, PRINTF, IO, (and may be SCEMISC too) to Info.
  2. Yes, you can test this on LAN first by using PC + Phone, you can use your WiFi router or Phone's tethering to connect both device without internet, you may want to disable UPnP when playing on LAN.
  3. I'm no longer active on networking stuff, but i can at least checked the logs to see what happened. However, i might not be able to notice anything strange, since the game is using low-level sockets and implement their own netcode, and i'm not familiar to this game's netcode either.

@Atsilut
Copy link
Author

Atsilut commented Jan 2, 2025

I used Port offset 20000 for these tests.

  1. First of all, I'm not sure if it is set by debug level logging in android one, I did the setting but it seems not working. So, I know it's not enough but I have no clue to correct this(I set my phone's debug log as same as my PC).
  2. When I test with my WiFi router, It happens Already Existing IP, and surely it's same IP (cuz PC using exact that router too). So I think it shouldn't be done as I expect.
  3. I couldn't get the log of successful connection, just failed log for now.

Here is the log, you can match with the name of log file.
socom failed ADB.txt
socom failed PC.txt
router failed ADB.txt
router failed PC.txt
socom failed long ADB.txt
socom failed long PC.txt

@anr2me
Copy link
Collaborator

anr2me commented Jan 3, 2025

I'm currently in the middle of updating my Win11 to 24H2 which have been updating for 20 hours, but still at 60% due to slow HDD, so it will probably took awhile before i can use my laptop.

  1. However, i did a quick look at the ADB logs on my phone, and Yes it doesn't contains any D PPSSPP Debug logs (other than the one from Activity logs), so we can't compare those logs. You should also filter out those Activity logs as it added too many noise.
    I forgot what parameters used to filter the logcat, as it's been a long time since i use adb.
    And i'm not sure whether Debug channel works on PPSSPP Android's release version too or not.

  2. Adhoc Servers only allows one IP per player, so you can't use the same internet connection on public Adhoc Server like socom, since it will be detected as one public IP.
    However, if you're playing in LAN, each device should have different LAN IP (don't use localhost IP), so it shouldn't shows that message. Unless, one of the PPSSPP that was connected to the Adhoc Server was disconnected/shutted down forcefully to the point where it didn't have a chance to send the logout packet to Adhoc Server, the Adhoc Server might still think that player still existed, but will be timed out after 15 seconds i think.

  3. You should be able to get the successful logs by playing multiplayer using multiple instances on PC. You can duplicates the ppsspp folder (to avoid corrupting each other data when saving), and run the PPSSPP exe from each folder. Both PPSSPP should connect to built-in Adhoc Server using localhost IP when playing with multiple instances.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants