How can I achieve a clean reinstall of the stock browser

In the course of the last update (4.4.0.68 to 4.4.0.72) on my XA2 Ultra I managed to destroy the proper functionality of the stock browser, probably by deleting files in .cache.
At the moment I only see Desktop versions of web sites and cannot switch.
I tried to uninstall and reinstall the browser with
devel-su
pkcon remove sailfish-browser
but it was not possible, because “it would break the system”.
Is there a way to repair the browser?

pkcon install --allow-reinstall sailfish-browser

1 Like

Thank you for your answer. This indeed triggered a reinstall of the browser. Unfortunately I’m still stuck with Desktop web sites. Does someone have an idea how this could be fixed?

Unless you removed things as root it’s unlikely reinstalling will fix it.

Try renaming .local/share/org.sailfishos/browser/.mozilla instead.

I did not delete as root.
When I rename the indicated folder and start the browser the folder is newly generated and nothing changes.
I also experience freezes of the browser.

Did you restart lipstick?

No. So the right order would be
-rename .local/share/org.sailfishos/browser/.mozilla
-restart lipstick (e.g. with sailfish utils)
-start browser
?

Yes, i think the booster preloads stuff and needs to be restarted, which i think, happens when you restart lipstick

Here are a few more tips:

I think I tried all proposed measures, to no avail.
Would it help if this prefs.js file referred to at Browser crashing on launch since yesterday - together.jolla.com was replaced manually with one from a different device?
Or is it technically impossible?

Make a backup or just rename the file and test it. I would backup(and delete) or rename everything that is browser related uninstall the browser. Restart and check for remaining browser files. Then reinstall sailfish-browser and sailfish-browser-settings.

I will try that, but how can I uninstall the browser?

Pkcon remove sailfish-browser sailfish-browser-settings

I recently did this and it works just fine. I just backed up the .local/share/org.sailfishos/browser/history.jscon and bookmarks.json files.

when I do that I get “severe error, this request will cause the system to crash” (my translation from german)

My problem is fixed by following this advice from a different topic:>

Thanks for reporting this. It would be helpful if you could test with a fully clean profile.

Since all the browser profile data is stored in /home/defaultuser/.local/share/org.sailfishos/browser/, you can do this by moving this folder to a different location and then rebooting your device.

cd /home/defaultuser/.local/share/org.sailfishos/
mv browser browser.bak
devel-su reboot

All of your browser data will be lost, but you can restore it once you’ve finished testing like this:

cd /home/defaultuser/.local/share/org.sailfishos/
mv browser browser.bak.bak
mv browser.bak browser
devel-su reboot

Note that this isn’t without risk: you may end up losing all your browser-related data. So if this concerns you then best not to try these steps. Also note that the rebooting is a necessary step.

However, if you are in a position to try it, it would be helpful just to rule this out.

Thanks to everybody who contributed to the solution of my problem!

3 Likes