flathub / com.mojang.Minecraft

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

Update launcher to 928 #83

Closed SystemlessDev closed 3 years ago

SystemlessDev commented 3 years ago

This also involves removing java 11 as a dependency since the launcher now handles java itself.

Screenshot of it actually working! :) image

AsciiWolf commented 3 years ago

Anyway, this is just a minor issue and it works fine otherwise. I think this PR is safe to merge now. :-) Thanks @SystemlessDev!

SystemlessDev commented 3 years ago

I have found other small issue: When the launcher is started for a first time, an error is displayed instead of the main page after login and this is printed on stdout:

https://github.com/flathub/com.mojang.Minecraft/pull/83#issuecomment-877624985

Anyway, this is just a minor issue and it works fine otherwise. I think this PR is safe to merge now. :-) Thanks @SystemlessDev!

🥳🥳

flathubbot commented 3 years ago

Started test build 53151

flathubbot commented 3 years ago

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

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

Unfortunately I ran into trouble testing the merged version: This doesn't occur testing the stable current one (with the outdated launcher).

https://launchermeta.mojang.com/v1/products/launcher/6f083b80d5e6fabbc4236f81d0d8f8a350c665a9/linux.json
[0710/123822.717618:WARNING:gpu_process_host.cc(1262)] The GPU process has crashed 1 time(s)
[0710/123822.718290:WARNING:gpu_process_host.cc(1262)] The GPU process has crashed 2 time(s)
[0710/123822.718804:WARNING:gpu_process_host.cc(1262)] The GPU process has crashed 3 time(s)
[0710/123822.719300:WARNING:gpu_process_host.cc(1262)] The GPU process has crashed 4 time(s)
[0710/123822.719759:WARNING:gpu_process_host.cc(1262)] The GPU process has crashed 5 time(s)
[0710/123822.726708:INFO:main_context.cpp(136)] CEF initialized successfully.
[0710/123822.726759:INFO:main_context.cpp(138)] CEF version: 86.0.23+ga2c2edf+chromium-86.0.4240.193
[0710/123822.726939:WARNING:gpu_process_host.cc(1262)] The GPU process has crashed 6 time(s)
[0710/123822.744863:WARNING:gpu_process_host.cc(1262)] The GPU process has crashed 7 time(s)
Gtk-Message: 12:38:22.765: Failed to load module "canberra-gtk-module"
Gtk-Message: 12:38:22.765: Failed to load module "canberra-gtk-module"
sh: line 1: orca: command not found
[0710/123822.771654:ERROR:simple_backend_impl.cc(757)] Simple Cache Backend: wrong file structure on disk: 2 path: /var/home/v/.var/app/com.mojang.Minecraft/data/../.minecraft/webcache2/Code Cache/wasm
[0710/123822.771673:ERROR:simple_backend_impl.cc(757)] Simple Cache Backend: wrong file structure on disk: 2 path: /var/home/v/.var/app/com.mojang.Minecraft/data/../.minecraft/webcache2/Code Cache/js
[0710/123822.777489:WARNING:gpu_process_host.cc(1262)] The GPU process has crashed 8 time(s)
Created browser window for reuse: 0x2000001
[0710/123822.782867:ERROR:browser_main_loop.cc(269)] Gdk: _gdk_frame_clock_freeze: assertion 'GDK_IS_FRAME_CLOCK (clock)' failed
[0710/123822.789951:WARNING:gpu_process_host.cc(1262)] The GPU process has crashed 9 time(s)
[0710/123822.790007:FATAL:gpu_data_manager_impl_private.cc(445)] GPU process isn't usable. Goodbye.
https://launchermeta.mojang.com/v1/products/launcher/6f083b80d5e6fabbc4236f81d0d8f8a350c665a9/linux.json
Gtk-Message: 12:38:23.545: Failed to load module "canberra-gtk-module"
Gtk-Message: 12:38:23.545: Failed to load module "canberra-gtk-module"
OK
https://launchermeta.mojang.com/v1/products/launcher/6f083b80d5e6fabbc4236f81d0d8f8a350c665a9/linux.json
[0710/123825.877921:WARNING:gpu_process_host.cc(1262)] The GPU process has crashed 1 time(s)
[0710/123825.878296:WARNING:gpu_process_host.cc(1262)] The GPU process has crashed 2 time(s)
[0710/123825.878596:WARNING:gpu_process_host.cc(1262)] The GPU process has crashed 3 time(s)
[0710/123825.878883:WARNING:gpu_process_host.cc(1262)] The GPU process has crashed 4 time(s)
[0710/123825.879142:WARNING:gpu_process_host.cc(1262)] The GPU process has crashed 5 time(s)
[0710/123825.879396:WARNING:gpu_process_host.cc(1262)] The GPU process has crashed 6 time(s)
[0710/123825.879696:WARNING:gpu_process_host.cc(1262)] The GPU process has crashed 7 time(s)
[0710/123825.880859:INFO:main_context.cpp(136)] CEF initialized successfully.
[0710/123825.880899:INFO:main_context.cpp(138)] CEF version: 86.0.23+ga2c2edf+chromium-86.0.4240.193
Gtk-Message: 12:38:25.904: Failed to load module "canberra-gtk-module"
Gtk-Message: 12:38:25.904: Failed to load module "canberra-gtk-module"
sh: line 1: orca: command not found
[0710/123825.923768:ERROR:simple_backend_impl.cc(757)] Simple Cache Backend: wrong file structure on disk: 2 path: /var/home/v/.var/app/com.mojang.Minecraft/data/../.minecraft/webcache2/Code Cache/wasm
[0710/123825.923778:ERROR:simple_backend_impl.cc(757)] Simple Cache Backend: wrong file structure on disk: 2 path: /var/home/v/.var/app/com.mojang.Minecraft/data/../.minecraft/webcache2/Code Cache/js
[0710/123825.924751:WARNING:gpu_process_host.cc(1262)] The GPU process has crashed 8 time(s)
Created browser window for reuse: 0x2600001
[0710/123825.928178:ERROR:browser_main_loop.cc(269)] Gdk: _gdk_frame_clock_freeze: assertion 'GDK_IS_FRAME_CLOCK (clock)' failed
[0710/123825.945565:WARNING:gpu_process_host.cc(1262)] The GPU process has crashed 9 time(s)
[0710/123825.945610:FATAL:gpu_data_manager_impl_private.cc(445)] GPU process isn't usable. Goodbye.

A blank window pops up, then a window with a "updating" loading bar pops up, and then a blank window pops up again. Then nothing happens.

This is on Fedora Silverblue 34, it occurs on Wayland and on x11. The only notable thing about my installation is that I had tested #85 before, but that shouldn't affect the launcher itself as far as I know. Using both flatpak remove and flatpak uninstall then installing doesn't help.

Edit: this doesn't occur on a fresh ubuntu 21.04 install in a VM.

AsciiWolf commented 3 years ago

Try removing ~/.var/app/com.mojang.Minecraft. If it doesn't help, maybe this is another Silverblue-related case. I've had such problem with one of my Flatpaks some time ago and had to workaround it.

edit: This looks to be a GPU-related issue:

[0710/123825.928178:ERROR:browser_main_loop.cc(269)] Gdk: _gdk_frame_clock_freeze: assertion 'GDK_IS_FRAME_CLOCK (clock)' failed
[0710/123825.945565:WARNING:gpu_process_host.cc(1262)] The GPU process has crashed 9 time(s)
[0710/123825.945610:FATAL:gpu_data_manager_impl_private.cc(445)] GPU process isn't usable. Goodbye.
AsciiWolf commented 3 years ago

It works fine here on a regular Fedora 34 (with Wayland GNOME session).

vchernin commented 3 years ago

Removing ~/.var/app/com.mojang.Minecraft seems to change it but not fix it. The first and third blank window are gone, just the "updating" window is there now.

But I stil get:

Migrating back to /var/home/v/.var/app/com.mojang.Minecraft/data/../.minecraft
/var/home/v/.var/app/com.mojang.Minecraft/data/../.minecraft not empty. Moving away files so that we don't overwrite anything...
mv: cannot stat '/var/home/v/.var/app/com.mojang.Minecraft/data/minecraft/*': No such file or directory
https://launchermeta.mojang.com/v1/products/launcher/6f083b80d5e6fabbc4236f81d0d8f8a350c665a9/linux.json
Gtk-Message: 12:52:04.377: Failed to load module "canberra-gtk-module"
Gtk-Message: 12:52:04.378: Failed to load module "canberra-gtk-module"
OK
https://launchermeta.mojang.com/v1/products/launcher/6f083b80d5e6fabbc4236f81d0d8f8a350c665a9/linux.json
[0710/125213.099796:WARNING:gpu_process_host.cc(1262)] The GPU process has crashed 1 time(s)
[0710/125213.100311:WARNING:gpu_process_host.cc(1262)] The GPU process has crashed 2 time(s)
[0710/125213.100721:WARNING:gpu_process_host.cc(1262)] The GPU process has crashed 3 time(s)
[0710/125213.101166:WARNING:gpu_process_host.cc(1262)] The GPU process has crashed 4 time(s)
[0710/125213.101761:WARNING:gpu_process_host.cc(1262)] The GPU process has crashed 5 time(s)
[0710/125213.102136:WARNING:gpu_process_host.cc(1262)] The GPU process has crashed 6 time(s)
[0710/125213.102549:WARNING:gpu_process_host.cc(1262)] The GPU process has crashed 7 time(s)
[0710/125213.104422:INFO:main_context.cpp(136)] CEF initialized successfully.
[0710/125213.104460:INFO:main_context.cpp(138)] CEF version: 86.0.23+ga2c2edf+chromium-86.0.4240.193
Gtk-Message: 12:52:13.130: Failed to load module "canberra-gtk-module"
Gtk-Message: 12:52:13.130: Failed to load module "canberra-gtk-module"
sh: line 1: orca: command not found
[0710/125213.137099:ERROR:simple_backend_impl.cc(757)] Simple Cache Backend: wrong file structure on disk: 2 path: /var/home/v/.var/app/com.mojang.Minecraft/data/../.minecraft/webcache2/Code Cache/wasm
[0710/125213.137148:ERROR:simple_backend_impl.cc(757)] Simple Cache Backend: wrong file structure on disk: 2 path: /var/home/v/.var/app/com.mojang.Minecraft/data/../.minecraft/webcache2/Code Cache/js
[0710/125213.151046:WARNING:gpu_process_host.cc(1262)] The GPU process has crashed 8 time(s)
Created browser window for reuse: 0x1e00001
[0710/125213.154929:ERROR:browser_main_loop.cc(269)] Gdk: _gdk_frame_clock_freeze: assertion 'GDK_IS_FRAME_CLOCK (clock)' failed
[0710/125213.162144:WARNING:gpu_process_host.cc(1262)] The GPU process has crashed 9 time(s)
[0710/125213.162185:FATAL:gpu_data_manager_impl_private.cc(445)] GPU process isn't usable. Goodbye.

Could mv: cannot stat '/var/home/v/.var/app/com.mojang.Minecraft/data/minecraft/*': No such file or directory be the problem?

AsciiWolf commented 3 years ago

So it is a Silverblue-related issue. sigh

Maybe a similar or the same workaround as here could be used. I will set up a Silverblue vm and test it...

SystemlessDev commented 3 years ago

Works fine for me on fedora 34 gnome xorg. What is in /var/home/v/.var/app/com.mojang.Minecraft/ ? Could you try to rename the folder com.mojang.Minecraft just to see if it's an issue with some files that are persisting?

Try removing ~/.var/app/com.mojang.Minecraft. If it doesn't help, maybe this is another Silverblue-related case. I've had such problem with one of my Flatpaks some time ago and had to workaround it.

edit: This looks to be a GPU-related issue:

That issue also comes up when CEF fails to init properly

AsciiWolf commented 3 years ago

@vchernin Did you try the latest test build that was built after this commit?

vchernin commented 3 years ago

I tried this build: https://github.com/flathub/com.mojang.Minecraft/pull/83#issuecomment-877692116

I'm currently trying to build it locally with that workaround, I'll report back.

vchernin commented 3 years ago

I tried various ways of applying that workaround, but nothing seemed to help. I tried:


                {
                    "type": "script",
                    "dest-filename": "minecraft",
                    "commands": [
                        "'[ -d /var/home ] && unlink /home && mv /var/home /home'",
                        "'exec /app/extra/minecraft $@'"
                    ]
                },

I tried giving different names and messing with the install commands, nothing seemed to help.

I wonder if there's more in bluejeans flatpak that might help...

vchernin commented 3 years ago

@AsciiWolf it seems you changed the workaround for bluejeans here: https://github.com/flathub/com.bluejeans.BlueJeans/pull/10/commits/e643e44f87a19b48072eb44f4dc8b2c694d19eb8. What exactly does the newer version do?

It looks like the workaround was changed even more here: https://github.com/flathub/com.bluejeans.BlueJeans/commit/f83d3388f0e11048190002aad5dc2e2cc6766b44

Maybe I should try out bluejeans... (edit: current bluejeans stable works fine)

AsciiWolf commented 3 years ago

The changed parts are unrelated to the Silverblue bug. Anyway, I will setup a Silverblue vm and try playing with this tomorrow.

AsciiWolf commented 3 years ago

I tried various ways of applying that workaround, but nothing seemed to help. I tried:


                {
                    "type": "script",
                    "dest-filename": "minecraft",
                    "commands": [
                        "'[ -d /var/home ] && unlink /home && mv /var/home /home'",
                        "'exec /app/extra/minecraft $@'"
                    ]
                },

I tried giving different names and messing with the install commands, nothing seemed to help.

I wonder if there's more in bluejeans flatpak that might help...

Wait... You removed our migration script and replaced it with your script? I thought that the problem you had on Silverblue was that our migration script started and failed (mv: cannot stat '/var/home/v/.var/app/com.mojang.Minecraft/data/minecraft/*': No such file or directory). Or is the problem the black window?

vchernin commented 3 years ago

I did not remove any parts of the exisiting script called minecraft, just tried to add on to another part in the manifest without altering the script. I realize now that might not even make sense, so maybe I'll give it another shot later editing the script.

I think solving the migration script problem would probably fix the broken gpu errors, since this all seems to only occur on silverblue (and thus is due to silverblue directory weirdness).

Maybe I'll also try out workstation on a live usb and install the flatpak to rule out device-specific gpu/driver issues.

SystemlessDev commented 3 years ago

I'm currently running silverblue in a vm and I can't reproduce this issue at all.

SystemlessDev commented 3 years ago

@vchernin do you have any clues on how I would reproduce this issue myself? Because no matter the situation I create I cannot reproduce this.

vchernin commented 3 years ago

So I managed to accidentally workaround the issue by commenting out the script and then building and running, off of master. Now it runs without issue, the gpu problems are gone. The script not being commenting out doesn't cause an issue.

So it's defintely an issue specific to the script running on silverblue. By commenting out the script any stuff I had wouldn't have been moved properly. But since the migration doesn't need to run anymore the problem was workarounded.

To reproduce

  1. Build the master as of https://github.com/flathub/com.mojang.Minecraft/commit/aa868f1586df70ab7bf8bed32bc7a78bca32f9cb, and make some singleplayer saves.
  2. Then remove the old master flatpak
  3. Build and run current master as of https://github.com/flathub/com.mojang.Minecraft/commit/80dc534a12ec919e35165c8eda5776ec200c5574.
  4. Try running and you should see the GPU and mv errors.
  5. To try the "workaround" comment out the script in minecraft and then build again and run.
  6. The "workaround" should cause you to lose any saves you have (since the script isn't working), but it should run without GPU and mv errors.
  7. You might need to reset it by removing /var/home/v/.var/app/com.mojang.Minecraft/.

Things to experiment with:

I think that should be the right steps, I'll try to test it myself later.

vchernin commented 3 years ago

So those steps didn't work for me, I'm not sure why. Sigh I wonder what is missing, I really don't know why that would have changed.

The files even moved correctly, I didn't lose saves.

Maybe I'll try in a VM.

SystemlessDev commented 3 years ago
1. Build the master as of [aa868f1](https://github.com/flathub/com.mojang.Minecraft/commit/aa868f1586df70ab7bf8bed32bc7a78bca32f9cb), and make some singleplayer saves.

2. Then remove the old master flatpak

3. Build and run current master as of [80dc534](https://github.com/flathub/com.mojang.Minecraft/commit/80dc534a12ec919e35165c8eda5776ec200c5574).

4. Try running and you should see the GPU and mv errors.

So I did exactly this and I still can't reproduce what you're seeing. It migrated the folder fine for me and the launcher starts like normal.

So unless @AsciiWolf manages to get another result I think this is a issue on your side...

vchernin commented 3 years ago

Yeah, I'm really a bit unsure here. I'll try and think why those steps didn't work, maybe somehow #85 caused it, and that PR needs to be used in step 1... but that seems unlikely.

AsciiWolf commented 3 years ago

So, I have tried both new installation of Minecraft and migration from xdg dir to non-xdg and everything worked fine on Silverblue. The cache-related GPU errors in log were already discussed and are harmless. The GPU crash did not happen in my case and launcher started fine every time I tried running it.

vchernin commented 3 years ago

I haven't made any progress trying to reproduce the issue.

If anyone ever runs into this issue again I'd recommend trying the following:

  1. Backup every last bit of important save data. Do not skip this step as it is very likely your data won't be kept during this process.
  2. Git clone this repo.
  3. Comment out everything in the minecraft file, it is the script that tries to migrate data. If it changes name you might need to do some detective work. You might want to also try keeping the first half of the last line that actually tried to run the app (but still comment out the --workDir argument).
  4. Build the repo with flatpak-builder --user --install com.mojang.Minecraft.json build-dir. You might need to install some runtimes, also make sure you have flatpak and flatpak-builder installed.
  5. Try running your new build (make sure you're not running the incorrect one).
  6. It should run successfully now.
  7. Remove your custom build, and install the stable one. Then copy over all you user data.