flathub / com.mojang.Minecraft

https://flathub.org/apps/details/com.mojang.Minecraft
34 stars 13 forks source link

[WIP] Update Minecraft.tar.gz to 921 #78

Closed AsciiWolf closed 3 years ago

AsciiWolf commented 3 years ago

Work in progress, do not merge yet.

Crashes because of a broken workDir switch in recent Launcher versions:

...
[Info: 2021-03-06 19:18:49.458277730: Common.cpp(32)] Native Launcher Version: 887
[Info: 2021-03-06 19:18:49.458314603: Common.cpp(33)] Operating System: Linux
[Info: 2021-03-06 19:18:49.458378193: Common.cpp(34)] Application Data directory: //.../.minecraft
[Info: 2021-03-06 19:18:49.458454110: Common.cpp(35)] Executable Path: /.../minecraft-launcher
[Info: 2021-03-06 19:18:49.458496661: Common.cpp(36)] App Directory dir: .../minecraft-launcher
[Info: 2021-03-06 19:18:49.458560184: Common.cpp(37)] Game data directory: .../minecraft
[Info: 2021-03-06 19:18:49.458622093: Common.cpp(38)] Launcher dir: .../minecraft/launcher
[Info: 2021-03-06 19:18:49.458671362: Common.cpp(39)] Java dir: .../minecraft/runtime/jre-x64
[Info: 2021-03-06 19:18:49.458710336: Common.cpp(40)] TmpDir dir: .../MinecraftLauncher
[Info: 2021-03-06 19:18:49.458746322: Common.cpp(41)] x64: true
...
[Error: 2021-03-06 19:18:50.285884930: Settings.cpp(33)] Failed to determine configuration file size: No such file or directory
[Error: 2021-03-06 19:18:50.286893905: mainLinux.cpp(191)] Couldn't determine absolute path for
...
[Info: 2021-03-06 19:18:49.867261146: ProductManager.cpp(212)] Product library dir set to /home/asciiwolf/.var/app/com.mojang.Minecraft/data/minecraft/products
[Info: 2021-03-06 19:18:49.867384733: AccountData.cpp(309)] Parsing content from file: .../minecraft/launcher_accounts.json
[Info: 2021-03-06 19:18:49.867531695: SkinManager.cpp(251)] Failed to read skins file: .../minecraft/launcher_skins.json ErrNo such file or directory
...
[0306/202251.819370:WARNING:gpu_process_host.cc(1262)] The GPU process has crashed 9 time(s)
[0306/202251.819413:FATAL:gpu_data_manager_impl_private.cc(445)] GPU process isn't usable. Goodbye.
[Info: 2021-03-06 19:22:51.815507970: NetQueue.cpp(154)] NetQueue: Setting up.
[Info: 2021-03-06 19:22:51.815734326: mainLinux.cpp(160)] Running launcher bootstrap (version 887)
[Error: 2021-03-06 19:22:51.860639778: Settings.cpp(33)] Failed to determine configuration file size: No such file or directory
[Error: 2021-03-06 19:22:51.862623320: mainLinux.cpp(191)] Couldn't determine absolute path for

(Unimportant log parts omitted.)

See this ticket: https://bugs.mojang.com/browse/MCL-17614

https://github.com/flathub/com.mojang.Minecraft/pull/78#issuecomment-803659607

Also, after this issue is resolved, x-data-checker should be fixed as well as part of this PR (see #76).

flathubbot commented 3 years ago

Started test build 41137

flathubbot commented 3 years ago

Build 41137 successful To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/39581/com.mojang.Minecraft.flatpakref
AsciiWolf commented 3 years ago

@p1u3o Maybe the issue is caused by using XDG paths? Could you look at it when you have some time? Thanks!

Justinzobel commented 3 years ago

Any update on this one?

AsciiWolf commented 3 years ago

Sorry, did not have time to look into it.

Teh404Gal commented 3 years ago

its been a while did you figure out what messed the flatpak?

AsciiWolf commented 3 years ago

Feel free to look into it as well. I am unfortunately too busy lately and do not have anyone else who could help me with this Flatpak. I am the only one active maintainer.

I will probably try removing the XDG dirs patch, but even if that fix the problems, I can't push these changes to master since that would break the game files for current users. :-/

AsciiWolf commented 3 years ago

bot, build

flathubbot commented 3 years ago

Queued test build for com.mojang.Minecraft.

flathubbot commented 3 years ago

Started test build 42381

flathubbot commented 3 years ago

Build 42381 successful To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/40773/com.mojang.Minecraft.flatpakref
AsciiWolf commented 3 years ago

So, after removing XDG Directories support from the startup script, everything seems to work fine. However, it is not possible to merge the PR with XDG Directories support just removed, because it would make existing users lose their current game directory with maps, mods, config etc. Maybe we could make a migrating script that would migrate the current XDG game directory (migrated by the old script) back to a default (non-XDG) path? I really, really dislike like this, but it may be the only possible solution, if Mojang won't fix the XDG Directories support in their new launcher builds.

@p1u3o Could you please help me with this? Thanks!

flathubbot commented 3 years ago

Started test build 42385

flathubbot commented 3 years ago

Build 42385 successful To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/40777/com.mojang.Minecraft.flatpakref
Teh404Gal commented 3 years ago

maybe add a script for the next 10 launcher version that checks if ~/.var/app/com.Mojang.minecraft/data is filled and then opens a pop up box that advises them to do mv ~/.var/app/com.Mojang.minecraft/minecraft ~/.minecraft

Justinzobel commented 3 years ago

Confirmed the latest test build works.

On Mon, Mar 22, 2021 at 7:47 AM teh404guy @.***> wrote:

maybe add a script for the next 10 launcher version that checks if ~/.var/app/com.Mojang.minecraft/data is filled and then opens a pop up box that advises them to do mv ~/.var/app/com.Mojang.minecraft/minecraft ~/.minecraft

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/flathub/com.mojang.Minecraft/pull/78#issuecomment-803661427, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKOQBOEEB6MXAG55SIOZN3TEZO47ANCNFSM4YXAUC2Q .

AsciiWolf commented 3 years ago

maybe add a script for the next 10 launcher version that checks if ~/.var/app/com.Mojang.minecraft/data is filled and then opens a pop up box that advises them to do mv ~/.var/app/com.Mojang.minecraft/minecraft ~/.minecraft

There's no need for any pop up box. The migration can happen on background, without any user interaction - just like the original non-XDG to XDG migration happened. It is just reversed ($XDG_DATA_HOME/minecraft to $XDG_DATA_HOME/../.minecraft). But this time, we have to handle more things:

  1. Do migration only if $XDG_DATA_HOME/minecraft exists.
  2. Before migration, remove $XDG_DATA_HOME/../.minecraft if it exists.
  3. Maybe somehow handle $XDG_DATA_HOME/minecraft/.migrated?

And maybe another things as well... If we make any mistake, chances are that it will end up breaking the game for many users.

I would be more happy if Mojang could fix their launcher and its XDG Directories support that they broke in version 887.

AsciiWolf commented 3 years ago

Also, switching back to non-XDG directory would make some old bugs reappear, for example #2.

flathubbot commented 3 years ago

Started test build 42447

flathubbot commented 3 years ago

Build 42447 successful To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/40837/com.mojang.Minecraft.flatpakref
AsciiWolf commented 3 years ago

Unfortunately, the launcher still crashes when running it with a --workDir=$XDG_DATA_HOME/minecraft switch.

nanonyme commented 3 years ago

@AsciiWolf did you complain upstream about the xdg issues?

AsciiWolf commented 3 years ago

Nope, not yet. I plan to report it as an upstream ticket once I have some time.

AsciiWolf commented 3 years ago

I was able to reproduce the same issue on a non-Flatpak version of Minecraft running on Ubuntu 20.04, by using: ./minecraft-launcher --workDir=$HOME/.local/share/minecraft or, for example: ./minecraft-launcher --workDir=/home/asciiwolf/.minecrafttest

So, this is definitely not a Flatpak issue, but a Minecraft Launcher regression. I will hopefully file the Mojang ticket this week.

AsciiWolf commented 3 years ago

Here is the Mojang ticket: https://bugs.mojang.com/browse/MCL-17614

nanonyme commented 3 years ago

I hope there's still someone maintaining this. Afaik it's now owned by Microsoft.

AsciiWolf commented 3 years ago

As far as I know, it was owned by Microsoft for some time.

vchernin commented 3 years ago

Apparently https://github.com/ericpruitt/homeishome would help according to this comment.

SystemlessDev commented 3 years ago

Funny thing! Using the --workDir argument produces the same results as we've gotten over here. However! Using --workdir with a small d works, as well as -w!

So in other words! Mojang did it again!

SystemlessDev commented 3 years ago

I've updated the launcher in my own pr so it's ready to be merged asap! #83

AsciiWolf commented 3 years ago

@SystemlessDev Thanks! I am closing this PR in favor of the new one.