romm icon indicating copy to clipboard operation
romm copied to clipboard

[Bug] Clicking download refreshes page

Open bevy1994 opened this issue 1 year ago • 3 comments

RomM version 3.1.0-rc.3, also present on 3.0.3

Describe the bug Trying to download a rom results in the page refreshing to the main page with no download started. Url shows the name of the file. Roms play fine using emulatorjs, and RomM has no problem finding the files which makes me think it's not a permission issue. Tried deleting all data and rebuilding the container, but nothing changed.

To Reproduce Steps to reproduce the behavior:

  1. Go to any file in RomM
  2. Click on download
  3. Page refreshes with no download started or errors present

Expected behavior File downloads when clicking on download button

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser: Both firefox and chrome
  • Version: Latest

Additional context I'm using traefik as a reverse proxy. Previously had no issues when loading from my own domain. Below are the logs from docker after hitting the download button. Domain and file names have been redacted for privacy.

INFO: [nginx][2024-04-18 ] 10.17.0.5 - - "GET /assets/romm/resources/gbc/redacted/cover/small.png HTTP/1.1" 200 4682 "https://romm.redacted.com/api/roms/265/content/redacted" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0" rt=0.000 uct="-" uht="-" urt="-"

INFO: [nginx][2024-04-18 ] 10.17.0.5 - - "GET /assets/romm/resources/gbc/redacted/cover/small.png HTTP/1.1" 200 3784 "https://romm.redacted.com/api/roms/265/content/redacted" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0" rt=0.000 uct="-" uht="-" urt="-"

INFO: [nginx][2024-04-18 ] 10.17.0.5 - - "GET /assets/romm/resources/gbc/redacted/cover/small.png HTTP/1.1" 200 4623 "https://romm.redacted.com/api/roms/265/content/redacted" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0" rt=0.000 uct="-" uht="-" urt="-"

INFO: [nginx][2024-04-18 ] 10.17.0.5 - - "GET /assets/romm/resources/gbc/redacted/cover/small.png HTTP/1.1" 200 5395 "https://romm.redacted.com/api/roms/265/content/redacted" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0" rt=0.000 uct="-" uht="-" urt="-"

INFO: [nginx][2024-04-18 ] 10.17.0.5 - - "GET /assets/romm/resources/nes/redacted/cover/small.png HTTP/1.1" 304 0 "https://romm.redacted.com/api/roms/265/content/redacted" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0" rt=0.000 uct="-" uht="-" urt="-"

  • "GET /heartbeat HTTP/1.0" 200

INFO: [nginx][2024-04-18 ] 10.17.0.5 - - "GET /api/heartbeat HTTP/1.1" 200 568 "https://romm.redacted.com/api/roms/265/content/redacted" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0" rt=0.254 uct="0.000" uht="0.254" urt="0.254"

INFO: [nginx][2024-04-18 ] 10.17.0.5 - - "GET /assets/romm/resources/gbc/redacted/cover/big.png HTTP/1.1" 200 32107 "https://romm.redacted.com/api/roms/265/content/redacted" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0" rt=0.000 uct="-" uht="-" urt="-"

INFO: [nginx][2024-04-18 ] 10.17.0.5 - - "GET /assets/romm/resources/gbc/redacted/cover/big.png HTTP/1.1" 200 28681 "https://romm.redacted.com/api/roms/265/content/redacted" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0" rt=0.000 uct="-" uht="-" urt="-"

INFO: [nginx][2024-04-18 ] 10.17.0.5 - - "GET /assets/romm/resources/n64/redacted/cover/big.png HTTP/1.1" 200 21095 "https://romm.redacted.com/api/roms/265/content/redacted" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0" rt=0.000 uct="-" uht="-" urt="-"

INFO: [nginx][2024-04-18 ] 10.17.0.5 - - "GET /assets/romm/resources/gbc/redacted/cover/big.png HTTP/1.1" 200 26859 "https://romm.redacted.com/api/roms/265/content/redacted" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0" rt=0.000 uct="-" uht="-" urt="-"

INFO: [nginx][2024-04-18 ] 10.17.0.5 - - "GET /assets/romm/resources/gbc/redacted/cover/big.png HTTP/1.1" 200 21980 "https://romm.redacted.com/api/roms/265/content/redacted" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0" rt=0.000 uct="-" uht="-" urt="-"

INFO: [nginx][2024-04-18 ] 10.17.0.5 - - "GET /assets/romm/resources/nes/redacted/cover/big.png HTTP/1.1" 200 16415 "https://romm.redacted.com/api/roms/265/content/redacted" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0" rt=0.000 uct="-" uht="-" urt="-"

INFO: [nginx][2024-04-18 ] 10.17.0.5 - - "GET /assets/romm/resources/nes/redacted/cover/big.png HTTP/1.1" 200 29533 "https://romm.redacted.com/api/roms/265/content/redacted" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0" rt=0.000 uct="-" uht="-" urt="-"

INFO: [nginx][2024-04-18 ] 10.17.0.5 - - "GET /assets/romm/resources/gbc/redacted/cover/big.png HTTP/1.1" 200 28384 "https://romm.redacted.com/api/roms/265/content/redacted" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0" rt=0.000 uct="-" uht="-" urt="-"

INFO: [nginx][2024-04-18 ] 10.17.0.5 - - "GET /assets/romm/resources/gbc/redacted/cover/big.png HTTP/1.1" 200 25936 "https://romm.redacted.com/api/roms/265/content/redacted" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0" rt=0.000 uct="-" uht="-" urt="-"

INFO: [nginx][2024-04-18 ] 10.17.0.5 - - "GET /assets/romm/resources/gbc/redacted/cover/big.png HTTP/1.1" 200 24325 "https://romm.redacted.com/api/roms/265/content/redacted" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0" rt=0.000 uct="-" uht="-" urt="-"

INFO: [nginx][2024-04-18 ] 10.17.0.5 - - "GET /assets/romm/resources/gbc/redacted/cover/big.png HTTP/1.1" 200 33424 "https://romm.redacted.com/api/roms/265/content/redacted" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0" rt=0.000 uct="-" uht="-" urt="-"

INFO: [nginx][2024-04-18 ] 10.17.0.5 - - "GET /sw.js HTTP/1.1" 200 5432 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0" rt=0.000 uct="-" uht="-" urt="-"

9:M 18 Apr 2024 14:36:54.043 * 100 changes in 300 seconds. Saving...

9:M 18 Apr 2024 14:36:54.044 * Background saving started by pid 1217

1217:C 18 Apr 2024 14:36:54.639 * DB saved on disk

1217:C 18 Apr 2024 14:36:54.641 * Fork CoW for RDB: current 1 MB, peak 1 MB, average 0 MB

9:M 18 Apr 2024 14:36:54.646 * Background saving terminated with success

bevy1994 avatar Apr 18 '24 20:04 bevy1994

Can you record a video and post it here (or streamable if its too big)? Also I'm assuming the redacted URL is a real domain with HTTPS?

gantoine avatar Apr 18 '24 21:04 gantoine

Sure thing. Yes, the redacted URL is a real domain with HTTPS. It worked fine at some point, can't really say when as I don't frequently access the webpage. It may have been prior to v3. Hopefully the video works, you should find it below.

https://github.com/rommapp/romm/assets/149719137/2d175a83-85a0-4378-b4a9-e444d96d715d

bevy1994 avatar Apr 18 '24 23:04 bevy1994

We'll Ill be damned, clear as day. 🤔

I'm going to backlog this as high-priority and have a look when I'm back home late next week. Will update you here with any findings/questions.

gantoine avatar Apr 19 '24 13:04 gantoine

Sorry for the delay on this, which browser are you using, and on which OS? And you do have popups blocked by an extension?

gantoine avatar May 25 '24 22:05 gantoine

No worries! I tested it on firefox and chrome on two different windows systems and the problem was present on both. I did have success with an ubuntu system and the playnite integration works fine on windows. I do have an ad blocker, both network level and in the browser but I disabled all of it in my testing.

bevy1994 avatar May 26 '24 00:05 bevy1994

different windows systems

My only windows PC is hooked up to my TV but I'll give it a try on windows at some point this week, see if I can reproduce it.

gantoine avatar May 26 '24 02:05 gantoine

~~I have this same issue. But only in Chromium, works fine in firefox.~~ ~~I originally thought it might be my reverse proxy doing something funny, but I've checked and I've got 1:1 the same config as in the wiki.~~

~~One interesting thing though, the URL in the top bar changes to the location of the file that is supposed to be downloaded, but no download is initiated.~~ ~~Doing a hard reload (ctrl+shit+r) starts the download.~~ Ignore all this above, I was impatient and just needed to clear all cookies and data for the site.

The issue for me was solved by properly setting the security headers as mentioned in the wiki for configuring a reverse proxy.

vodkapmp avatar Aug 09 '24 04:08 vodkapmp

Closing this issue as resolved, it's likely a problem with the reverse proxy setup.

gantoine avatar Aug 09 '24 14:08 gantoine