Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Oh no! Something went wrong" #30

Open
teplydat opened this issue Nov 12, 2021 · 10 comments
Open

"Oh no! Something went wrong" #30

teplydat opened this issue Nov 12, 2021 · 10 comments

Comments

@teplydat
Copy link

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.

@duckimann
Copy link
Contributor

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?

@teplydat
Copy link
Author

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

@duckimann
Copy link
Contributor

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.

@teplydat
Copy link
Author

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.

@duckimann
Copy link
Contributor

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

@thiggy01
Copy link
Owner

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

@thiggy01
Copy link
Owner

thiggy01 commented Nov 18, 2021

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

@EdRW
Copy link

EdRW commented Dec 18, 2021

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. 🎉

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.

@shabin5785
Copy link

@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.

@anindya-dey
Copy link

anindya-dey commented Aug 11, 2022

@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 😇🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants