gaseous-project / gaseous-server

A game ROM manager, with a built in web based emulator using multiple sources to identify and provide metadata
GNU Affero General Public License v3.0
336 stars 12 forks source link

Different game is opened when pressing "Launch" #43

Closed FlorianH1989 closed 1 year ago

FlorianH1989 commented 1 year ago

Describe the bug When pressing the "Launch" Button for a specific N64 game, a different N64 game opens.

To Reproduce Steps to reproduce the behavior:

  1. Go to the Game
  2. Click "Launch"
  3. Different N64 Game is opened in EmulatorJS

Expected behavior Correct Game should launch.

Desktop (please complete the following information): Docker Compose Image V 1.30

Additional context I double checked and download the rom from Gaseous and manually opened it in a self-hosted EmulatorJS instance. The correct game launches. Which log file can I provide to help?

michael-j-green commented 1 year ago

Sounds like it's not matched correctly. If you click the little "i" button next to the rom, does it say it matched using TOSEC?

Screenshot 2023-08-02 at 9 49 10 pm

If so, I'd be curious to see the ROM you're using.

If not, click "Title Match" and use the drop downs to fix the match.

michael-j-green commented 1 year ago

Oh wait... that's not the problem you reported is it? :)

Let me think about that a bit.

michael-j-green commented 1 year ago

That is a very weird thing indeed. The endpoint used to download the file is the same one that the built in emulator uses to launch the ROM, so it should be the same file for both the emulator and download.

Can you send me the filename, URL for the download link, and the URL for the Launch link?

FlorianH1989 commented 1 year ago

Now it is getting even weirder. Now when i press launch the CORRECT game start. So far so good. But when I try to open the game which was previously opened, it doesn't start. But the game which I wanted to open in the first place gets started instead. So the problem is reversed now. It seems more like the last N64 game I played gets stuck somewhere.

Unfortunately I cannot find the original download link to the rom. Is there any other way I can send it to you?

michael-j-green commented 1 year ago

You'll never guess what... mine just did it too. Tried to load Mario Kart - so far so good, then tried loading Shadows of the Empire - got Mario Kart.

Let me do some testing and get back to you. My gut is saying it's around caching with the newer version of Emulator.

michael-j-green commented 1 year ago

Confirmed bug. EmulatorJS is caching roms in the indexed storage of the browser using the last part of the URI for the ROM (/file rather than the file name which is provided by the API). Will need to update the URI API to not be so easily cached.

Clearing the ejs-roms indexed database allows the correct title to load.

michael-j-green commented 1 year ago

The latest commit contains the fix to the issue. With me clearing my cache all the time, I failed to pick up this quirk.

The fix will go out in the next release of the Gaseous which will include the bulk naming change you requested in #25

FlorianH1989 commented 1 year ago

This is so awesome! Thank you!