change-gdm-background icon indicating copy to clipboard operation
change-gdm-background copied to clipboard

"Oh no! Something went wrong"

Open teplydat opened this issue 3 years ago • 10 comments

So actually I came from Ubuntu 21.04 and upgraded to 21.10. I got a strange issue after running this script here but I forgot the error message. However, after rebooting I got: "Oh no! Something went wrong"

It took me some hours to fix it and I was close to reinstall my whole system.

How to fix it? In the end it is all about gnome-shell-theme.gresource e.g. under /usr/share/gnome-shell/theme/Yaru. Unfortunately I could not recover the backup (gnome-shell-theme.gresource~) beause it was actually from 21.04 that is incompatible with 21.10. So I needed a fresh gnome-shell-theme.gresource from Ubuntu 21.10.

  1. Create a bootable Ubuntu live USB stick and boot into it and use "Try ubuntu" (if your real system is 21.10 then use 21.10 for the USB stick as well)
  2. Encrypt/mount (depends on what you have) your SSD/HDD
  3. Go into the right folder within your SSD/HDD cd /mount/yourSSDHDD.../usr/share/gnome-shell/theme/Yaru
  4. Copy the fresh gnome-shell-theme.gresource: cp /usr/share/gnome-shell/theme/Yaru/gnome-shell-theme.gresource ./
  5. sudo reboot and unplug your USB stick when it asks for.

@thiggy01 its up to you to add this worst case recovery in your README.md You can also close this issue. Maybe it just helps someone and saves some time.

teplydat avatar Nov 12 '21 08:11 teplydat

The problem must be the script using the old backup. I'll add some logic to check the os version & gresource content to make sure it have the right backup version. Aside from that, how did you get into the "Oh no!"? Did you run the script after the upgrade or it just show up after the upgrade?

duckimann avatar Nov 15 '21 00:11 duckimann

The error is not from the script. Its after rebooting the system. Here you can find a picture how it looks like: https://357558-1266171-raikfcquaxqncofqfm.stackpathdns.com/wp-content/uploads/2020/05/Kali-Linux_Something-has-gone-wrong.png

teplydat avatar Nov 16 '21 13:11 teplydat

You reboot after WHAT? The Upgrade or Running the script?

P/s: I already know how the error looks like while upgrade the script to compatiple with impish. P/s 2: My theory about the backup is right. Confirmed after try upgrade the ubuntu 20.04.3 to 21.10.

duckimann avatar Nov 17 '21 02:11 duckimann

Oh sorry. I thought it was clear though my initial post.

  1. use Ubuntu 21.04
  2. run change-gdm-background script (here it creates the backup gnome-shell-theme.gresource~)
  3. upgrade to Ubuntu 21.10
  4. (though upgrade, changes in gnome-shell-theme.gresource are reverted)
  5. run change-gdm-background script (I guess it does not create backup file gnome-shell-theme.gresource~ because it already exist from 21.04) ==> some error, that it cannot find the file unter /tmp/.... (but I dont remember anymore)
  6. reboot
  7. error: "Oh no! Something went wrong"
  8. even restoring (mv gnome-shell-theme.gresource~ gnome-shell-theme.gresource) does not fix it because gnome-shell-theme.gresource~ was created in Ubuntu 21.04 and is not compatible with Ubuntu 21.10.

I am not sure whether there is a good way to cover this situation within the script. Because it makes sense not doing a fresh backup everytime (let's assume the script already broke gnome-shell-theme.gresource and then it would backup a broken file...). Actually it should only do a fresh backup, if a new Ubuntu dist-upgrade (e.g. 21.04->21.10) was done AND gnome-shell-theme.gresource was not touched yet (by the script) ==> in other words: do a backup from a fresh gnome-shell-theme.gresource.

I saw your hashtable approach. It assumes the checksum of gnome-shell-theme.gresource stays equal in each ubuntu version. It may not cover 21.10.1 or 22.04.

I guess its just not a problem that can be solved completely dynamic. That's why I just vote to include a short manual how to recover it in worst case scenario via linux-live-usb-stick.

teplydat avatar Nov 18 '21 08:11 teplydat

Maybe we write the release number to a file in /etc and check for it?

duckimann avatar Nov 18 '21 09:11 duckimann

@teplydat @duckimann I'm going to try to simulate this error in a virtual machine before coming with any solution.

thiggy01 avatar Nov 18 '21 14:11 thiggy01

I have reverted support for impish until I resolve this issue.

thiggy01 avatar Nov 18 '21 19:11 thiggy01

So actually I came from Ubuntu 21.04 and upgraded to 21.10. I got a strange issue after running this script here but I forgot the error message. However, after rebooting I got: "Oh no! Something went wrong"

It took me some hours to fix it and I was close to reinstall my whole system.

How to fix it? In the end it is all about gnome-shell-theme.gresource e.g. under /usr/share/gnome-shell/theme/Yaru. Unfortunately I could not recover the backup (gnome-shell-theme.gresource~) beause it was actually from 21.04 that is incompatible with 21.10. So I needed a fresh gnome-shell-theme.gresource from Ubuntu 21.10.

  1. Create a bootable Ubuntu live USB stick and boot into it and use "Try ubuntu" (if your real system is 21.10 then use 21.10 for the USB stick as well)
  2. Encrypt/mount (depends on what you have) your SSD/HDD
  3. Go into the right folder within your SSD/HDD cd /mount/yourSSDHDD.../usr/share/gnome-shell/theme/Yaru
  4. Copy the fresh gnome-shell-theme.gresource: cp /usr/share/gnome-shell/theme/Yaru/gnome-shell-theme.gresource ./
  5. sudo reboot and unplug your USB stick when it asks for.

@thiggy01 its up to you to add this worst case recovery in your README.md You can also close this issue. Maybe it just helps someone and saves some time.

@teplydat Thank you so so much for opening this issue and posting the steps you followed to fix this issue. I was experiencing the same problem after upgrading to Pop_OS 21.10. But I was saved by following your instructions. :tada:

The only difference for me was that my gnome-shell-theme.gresource file was located at /usr/share/gnome-shell/theme/Pop/gnome-shell-theme.gresource.

EdRW avatar Dec 18 '21 08:12 EdRW

@teplydat Thanks a lot. It worked for me. But i ran the script after upgrading to pop 21.10. I expected the script to create a backup (filename ending with ~ ). No idea why restoring this didnt work. May be the script failed even before it can create the backup.

shabin5785 avatar Dec 26 '21 05:12 shabin5785

@teplydat Thank you so much. I am glad that I landed up here. I was on the verge of reinstalling everything. In my case, my build was Ubuntu 22.04 on which I encountered this error.

I was not using this script or any other script for that matter, rather I was tweaking the Yaru-dark/gnome-shell.css. And after changing that css, I restarted my system, I got that error.

As per your suggestion, I used a bootable USB which had Ubuntu 21.04 and it worked on my 22.04 as well.

I "tried out" the 21.04 and went into the /media folder to access my SSD where I had my original 22.04 setup. From there, fired up a terminal, undid the changes I had done in gnome-shell.css (had to use sudo), and restarted my PC. It worked!

Thanks a ton 😇🙏

anindya-dey avatar Aug 11 '22 07:08 anindya-dey