an-anime-team / an-anime-game-launcher

An Anime Game launcher for Linux with telemetry disabling
https://discord.gg/ck37X6UWBp
GNU General Public License v3.0
1.58k stars 68 forks source link

Cannot launch launcher because file exists #433

Open t0msk opened 2 months ago

t0msk commented 2 months ago

When I tried to play Genshin I got "X" instead of Play button like this:

image

So I uninstalled launcher, deleted game folder and tried to reinstall launcher again, but after that launcher doesnt open anymore and I just get this error:

"name" = "anime-game-launcher"
"operating_system" = "Arch Linux Rolling Release [64-bit]"
"crate_version" = "3.12.1"
"explanation" = """
Panic occurred in file 'src/main.rs' at line 114
"""
"cause" = 'Failed to create launcher folder: Os { code: 17, kind: AlreadyExists, message: "File exists" }'
"method" = "Panic"
"backtrace" = """

   0: 0x56d038bcade2 - <unresolved>
   1: 0x56d038b22f19 - <unresolved>
   2: 0x56d038bc722d - <unresolved>
   3: 0x78049c091e08 - <unresolved>
   4: 0x78049c091ecc - __libc_start_main
   5: 0x56d038a69d15 - <unresolved>
   6:        0x0 - <unresolved>"""

I understand that there is some file exists in my system, but log could be more helpful and say which file, because I dont know where it can be located, maybe improvement to future make that code in line 114 with some "try catch" if it exists do something and not just crash.

H2102M commented 2 months ago

Maybe try deleting ~/.local/share/anime-game-launcher/ and ~/.cache/anime-game-launcher/. https://github.com/an-anime-team/an-anime-game-launcher/blob/main/src/main.rs#L113

t0msk commented 2 months ago

Yeah that solved issue :) maybe there could be function if it exists use it or remove it automatically :)