StrangeLoopGames / EcoIssues

131 stars 21 forks source link

Unable to add Private, Non-LAN server to Favorites #8048

Closed Wally1169 closed 5 years ago

Wally1169 commented 6 years ago

When I join a private, non-LAN server, I'm not given the option to add it to my Favorites list. Also, it never appears in my Recent list to be able to Favorite it from there. The attached image is what my Join screen looks like after:

  1. Clicking the + icon
  2. Entering the private server address and clicking Join
  3. Disconnecting from the private server
  4. Returning to the Join screen

Note: the private server is available for me to connect to via the Continue button (since it was my last-connected game), however if I connect to another server, or play a single player game, I then have to use the + icon on the Join screen and type in the address again.

I am, however, able to extract the UniqueIdentifier from the player.eco file and build the JSON in the favorites.eco file manually. Then, the private server is listed in my Favorites list, and I'm able to connect to it.

ecojoin

MarjieAVolk commented 6 years ago

What version of the game are you on? I believe a fix for this issue was released recently.

Wally1169 commented 6 years ago

This was originally posted for 0.7.4.6. In 0.7.4.7, I'm having somewhat of the opposite issue. For example, the following has started happening to me in 0.7.4.7 that didn't happen before: "Fixed non-LAN servers appearing in the LAN section on the Join screen" Also, my LAN server no longer appears in the LAN section. When I connect to my LAN server via the + button, it appears in the Recents list but appears as blank. I can Favorite it, but I cannot connect to it via the Recents or Favorites list - I have to type the address again via the + sign

MarjieAVolk commented 6 years ago

Is your LAN server on a port other than the default port? The behavior you're describing sounds like that. The LAN section only scans on the default port, and there is another bug for favorites on different ports not working: https://github.com/StrangeLoopGames/EcoIssues/issues/8044

Wally1169 commented 6 years ago

No it happens even when the default ports are used. Here's the portion of the recentServers.eco file that refers to my LAN server (localhost, actually)

{"Description":null,"UniqueIdentifier":0,"Address":"localhost","GamePort":3000}

MarjieAVolk commented 6 years ago

Okay well that's weird and scary. So to clarify, the original issue you posted is no longer happening after the update?

Wally1169 commented 6 years ago

Correct, I can now choose a private, non-LAN server from my Recents and connect to it or add it to my Favorites.

MarjieAVolk commented 6 years ago

Great.

So I tried out some recentServers.eco entries similar to the one you gave me. It looks like the game is having trouble connecting by ip address and port, rather than by unique identifier, which your entry there is missing.

MarjieAVolk commented 6 years ago

That's disappointing because I just implemented that recently, I was pretty sure it worked then. 🤔

Wally1169 commented 6 years ago

What weird is, my local server’s shows up just fine in the player(?) file where it’s used for the continue button.

Ah, the joys of software development

MarjieAVolk commented 6 years ago

Okay, so if the continue button works - that only works based on unique id. So the server must have a unique id. So the issue here is that your recents listing is missing the unique id. I can get the same behavior on mine if I set my recent listing to have a unique id of 0. But then if I connect to my server again, I get a new listing in Recents, and the new one has a correct unique id and works fine.

So, do you know how the unique id of 0 got into that file? Like did you put that there? I ask since you seem to have been messing with these files.

But you say that connecting to the server again doesn't change the behavior 🤔 It's very weird, because if the current identifier of the server is the same as what's saved in recents, then it should load. If it isn't the same, then it should create a new entry when you connect, and that entry will load. So maybe I haven't identified the right thing here.

MarjieAVolk commented 6 years ago

Could you show me what your player.eco file has in it, in any case? It's in the same folder as the recentServers.eco file.

That's the config for the Continue button, so I can see if it has a different unique id

Wally1169 commented 6 years ago

Yep, because I figured out that I could make my own favorites.eco file by manually creating the Json. When 0.7.4.7 came out, I renamed my favorites and recentservers files so that new ones would be generated under the new patch. That’s when I noticed the new behavior.

Wally1169 commented 6 years ago

{"LocalWorld":null,"ServerUniqueIdentifier":1911699347269766206}

sorry, forgot to paste

MarjieAVolk commented 6 years ago

Okay, so you have the correct unique id in that file. And you say you put the unique id: 0 into the other file yourself? Maybe try pasting that unique id into the recent servers listing:

{"Description":null,"UniqueIdentifier":1911699347269766206,"Address":"localhost","GamePort":3000}

Wally1169 commented 6 years ago

No, I didn’t put the 0 in the recents file... I built a favorites file in 0.7.4.6 (or probably earlier) so that I wouldn’t have to type the address in every time I jumped back and forth between my local server and our private one. I was talking to another player and decided to report this after they were complaining about the issue. I’ll doublecheck in a little bit but I think I tested that if I put the correct unique id in the recents file, it stays there even after connecting and disconnecting.

Wally1169 commented 6 years ago

Confirmed that if I add the ID in to the file manually, it stays there after connecting and disconnecting. Then, I cleared out the file to let it rebuild itself. When I connect to the game (via the + button) and then disconnect, the Join screen shows the "blank" entry in the Recent list and the recentServers file is back to:

[{"Description":null,"UniqueIdentifier":0,"Address":"localhost","GamePort":3000}]

Also, this local game never shows up under LAN during either visit to the Join screen.

Wally1169 commented 6 years ago

Correction: when the Favorites (and possibly also Recent) list is completely empty, the LAN game shows up.

Even weirder, if I connect to our non-LAN private server in this same condition (Favorites and Recent files completely blank) and then disconnect from it and return to the Join screen, the LAN list now shows our non-LAN private server and the Recent list shows a "blank" record. Meanwhile, the recentServers file shows our non-LAN private server with Description:null and UniqueIdentifier:0 (but the Address and GamePort are correct), and the player file shows the correct ServerUniqueIdentifier for the server.

(I'm hesitant to just copy/paste the entry here, due to it containing our server address and port, the knowledge of which we want to keep limited, given that this page is publicly viewable.)

If I then copy and paste the ServerUniqueIdentifier from the player file into the UniqueIdentifier field of the entry in the recentServers file, the remote server now appears both in the LAN and Recent lists.

Amendment: the remote server only shows up in the LAN list when my local server is running (but not always).