nilp0inter / MiSTer_WebMenu

A web interface for MiSTer
Apache License 2.0
60 stars 9 forks source link

Error parsing cores #15

Closed molnara closed 4 years ago

molnara commented 4 years ago

Describe the bug A clear and concise description of what the bug is.

Describe your setup

To Reproduce Steps to reproduce the behavior:

  1. Go to 'http://mister'
  2. Click on 'Scan Cores'
  3. See error

Expected behavior List of cores.

Resulting behavior

Json.Decode.oneOf failed in the following 2 ways:

(1) Problem with the given value:

    {
            "rbfs": null,
            "mras": [
                {
                    "path": "/media/fat/_Arcade/Alibaba 40 Thieves.mra",
                    "filename": "Alibaba 40 Thieves.mra",
                    "ctime": 1588562608,
                    "lpath": [
                        "Arcade"
                    ],
                    "md5": "d41d8cd98f00b204e9800998ecf8427e",
                    "name": "Ali Baba and 40 Thieves",
                    "roms": [
                        {
                            "zip": "alibaba.zip"
                        }
                    ],
                    "roms_found": false
                },
                {
                    "path": "/media/fat/_Arcade/Alien Arena.mra",
                    "filename": "Alien Arena.mra",
                    "ctime": 1584496548,
                    "lpath": [
                        "Arcade"
                    ],
                    "md5": "d41d8cd98f00b204e9800998ecf8427e",
                    "name": "Alien Arena (Stargate upgrade)",
                    "roms": [
                        {
                            "zip": "alienar.zip|alienaru.zip"
                        }
                    ],
                    "roms_found": false
                },
                {
                    "path": "/media/fat/_Arcade/Amidar.mra",
                    "filename": "Amidar.mra",
                    "ctime": 1584496552,
                    "lpath": [
                        "Arcade"
                    ],
                    "md5": "d41d8cd98f00b204e9800998ecf8427e",
                    "name": "Amidar (Scramble hardware)",
                    "roms": [
                        {
                            "zip": "amidar.zip|amidars.zip"
                        }
                    ],
                    "roms_found": false
                }
            ]
        }

    Expecting null

(2) Problem with the value at json.rbfs:

        null

    Expecting a LIST

Web Browser:

Additional context It outputs that error for every mra file, I've just truncated the error so it's not too big.

Also, all my roms are located in /media/fat/games/mame and /media/fat/games/hbmame.

nilp0inter commented 4 years ago

Hi, thank you for reporting this.

Did the error appear after an upgrade or on a fresh install?

Do you have the core files in the usual folders? (/media/fat/_Arcade, /media/fat/_Computers,...)

molnara commented 4 years ago

No, this was my first time using the script. I was just thinking it's maybe looking for the zip files in the wrong spot. Mine are in /media/fat/games/mame, but it may just be looking in /media/fat/_Arcade/mame

My arcade core files are in /media/fat/_Arcade/cores My other cores are just in the root /media/fat/

I would suggest have a settings that allow us to specify the paths we are using.

nilp0inter commented 4 years ago

This is quite strange, the scan is not finding the core files (apart from the zip files, but that is not the source of the error).

In order to fix this I have to be able to first reproduce it. Is it something non-standard in your setup? Standard core names? Lowercase or uppercase file extensions? Standard filesystem / permissions?

Could you please execute this command via SSH and paste here the output:

# find /media/fat -iname '*.rbf'

Finally, if you could upload the file /media/fat/.cache/WebMenu/cores.json it would be very helpful.

Thank you very much.

BTW, the config file is in the roadmap, I will introduce it before v1.0.0.

molnara commented 4 years ago

Sure no problem.

/root# find /media/fat -iname '*.rbf'
/media/fat/_Arcade/cores/DonkeyKongJunior_20191013.rbf
/media/fat/_Arcade/cores/Gyruss_20200315.rbf
/media/fat/_Arcade/cores/Rygar_20200513.rbf
/media/fat/_Arcade/cores/SEGASYS1_20200108.rbf
/media/fat/_Arcade/cores/Invaders_20190220.rbf
/media/fat/_Arcade/cores/jt1942_20200508.rbf
/media/fat/_Arcade/cores/jt1943_20200508.rbf
/media/fat/_Arcade/cores/jtbiocom_20191201.rbf
/media/fat/_Arcade/cores/jtbtiger_20200508.rbf
/media/fat/_Arcade/cores/jtcommando_20200508.rbf
/media/fat/_Arcade/cores/jtgng_20200603.rbf
/media/fat/_Arcade/cores/jtf1dream_20200508.rbf
/media/fat/_Arcade/cores/jtgunsmoke_20200508.rbf
/media/fat/_Arcade/cores/jtpopeye_20191227.rbf
/media/fat/_Arcade/cores/jttora_20200508.rbf
/media/fat/_Arcade/cores/jtvulgus_20200508.rbf
/media/fat/_Arcade/cores/Asteroids_20200520.rbf
/media/fat/_Arcade/cores/AsteroidsDeluxe_20200520.rbf
/media/fat/_Arcade/cores/AtariTetris_20191229.rbf
/media/fat/_Arcade/cores/BlackWidow_20200219.rbf
/media/fat/_Arcade/cores/MCR1_20200302.rbf
/media/fat/_Arcade/cores/MCR3Scroll_20200302.rbf
/media/fat/_Arcade/cores/CanyonBomber_20200113.rbf
/media/fat/_Arcade/cores/Arkanoid_20200302.rbf
/media/fat/_Arcade/cores/BombJack_20200108.rbf
/media/fat/_Arcade/cores/BurgerTime_20200108.rbf
/media/fat/_Arcade/cores/Centipede_20191218.rbf
/media/fat/_Arcade/cores/CrazyClimber_20200108.rbf
/media/fat/_Arcade/cores/Bagman_20200126.rbf
/media/fat/_Arcade/cores/CosmicAvenger_20191218.rbf
/media/fat/_Arcade/cores/Berzerk_20200114.rbf
/media/fat/_Arcade/cores/BurningRubber_20200112.rbf
/media/fat/_Arcade/cores/ComputerSpace_20191220.rbf
/media/fat/_Arcade/cores/Dominos_20200113.rbf
/media/fat/_Arcade/cores/MCR3_20200302.rbf
/media/fat/_Arcade/cores/CrazyKong_20200109.rbf
/media/fat/_Arcade/cores/FoodFight_20200108.rbf
/media/fat/_Arcade/cores/DonkeyKong_20200108.rbf
/media/fat/_Arcade/cores/Frenzy_20200113.rbf
/media/fat/_Arcade/cores/MCR2_20200521.rbf
/media/fat/_Arcade/cores/DigDug_20200106.rbf
/media/fat/_Arcade/cores/Gaplus_20200108.rbf
/media/fat/_Arcade/cores/Defender_20200220.rbf
/media/fat/_Arcade/cores/MCR3Mono_20200302.rbf
/media/fat/_Arcade/cores/Dorodon_20200109.rbf
/media/fat/_Arcade/cores/LunarLander_20200123.rbf
/media/fat/_Arcade/cores/GnG_20191228.rbf
/media/fat/_Arcade/cores/Pong_20200127.rbf
/media/fat/_Arcade/cores/Pleiads_20200512.rbf
/media/fat/_Arcade/cores/Galaga_20200411.rbf
/media/fat/_Arcade/cores/MoonPatrol_20200109.rbf
/media/fat/_Arcade/cores/Phoenix_20200109.rbf
/media/fat/_Arcade/cores/Popeye_20200305.rbf
/media/fat/_Arcade/cores/RallyX_20191218.rbf
/media/fat/_Arcade/cores/RshnAtk_20191229.rbf
/media/fat/_Arcade/cores/Ultratank_20200128.rbf
/media/fat/_Arcade/cores/SolomonsKey_20191230.rbf
/media/fat/_Arcade/cores/RiverPatrol_20200123.rbf
/media/fat/_Arcade/cores/TraverseUSA_20200123.rbf
/media/fat/_Arcade/cores/SilverLand_20200123.rbf
/media/fat/_Arcade/cores/SuperBreakout_20200320.rbf
/media/fat/_Arcade/cores/Sprint1_20200315.rbf
/media/fat/_Arcade/cores/Xevious_20200414.rbf
/media/fat/_Arcade/cores/Druaga_20191223.rbf
/media/fat/_Arcade/cores/Robotron_20200316.rbf
/media/fat/_Arcade/cores/SnapJack_20200109.rbf
/media/fat/_Arcade/cores/Pengo_20200114.rbf
/media/fat/_Arcade/cores/Sprint2_20200125.rbf
/media/fat/_Arcade/cores/ZigZag_20201009.rbf
/media/fat/_Arcade/cores/LadyBug_20200109.rbf
/media/fat/_Arcade/cores/Scramble_20200302.rbf
/media/fat/_Arcade/cores/Galaxian_20200114.rbf
/media/fat/_Arcade/cores/Pacman_20200116.rbf
/media/fat/_Arcade/cores/Pooyan_20200426.rbf
/media/fat/_Arcade/cores/NinjaKun_20200108.rbf
/media/fat/_Arcade/cores/TimePilot_20200114a.rbf
/media/fat/_Arcade/cores/jtdd_20200604.rbf
/media/fat/_Arcade/cores/Astrocade_20200528.rbf
/media/fat/_Arcade/cores/jtcps1_20200522.rbf
/media/fat/_Arcade/cores/jtsectionz_20200508.rbf
/media/fat/_Arcade/cores/Zaxxon_20200403.rbf
/media/fat/_Arcade/cores/jtcontra_20200528.rbf
/media/fat/_Arcade/cores/IremM62_20200601.rbf
/media/fat/_Arcade/cores/jtdd2_20200604.rbf
/media/fat/Scripts/.mister_updater/menu_20200429.rbf
/media/fat/menu.rbf
/media/fat/NES_20200526.rbf
/media/fat/TurboGrafx16_20200602.rbf
/media/fat/Gameboy_20200510.rbf
/media/fat/MegaCD_20200602.rbf
/media/fat/NeoGeo_20200510.rbf
/media/fat/SNES_20200530.rbf
/media/fat/GBA_20200513.rbf
/media/fat/Genesis_20200502.rbf
/media/fat/SMS_20200602.rbf
nilp0inter commented 4 years ago

I think I see where the problem is. Easy fix. I will do it during the weekend. :+1:

nilp0inter commented 4 years ago

Hi @molnara ,

could you please test this release in your setup and tell me if it fixes your problem?

https://github.com/nilp0inter/MiSTer_WebMenu/releases/tag/v0.4.2rc1

You have to repeat the core scan process clicking "Scan now" under the Core section of the Settings page. If for whatever reason you encounter problems doing that due to the current error, please delete the file /media/fat/.cache/WebMenu/cores.json manually and repeat the process.

Thanks!

molnara commented 4 years ago

Excellent, it works now! 👍