Xperia X hangs on boot after upgrade to [4.3.0.12]

Hi everyone,

after reading about more than usual issues with the 4.3 version, I decided to wait for a new update (currently no time to spend on a broken device, this is my daily driver). With 4.4 now around, things looked much better, so I decided to go for it:
I made the standard backup via settings app, downloaded the upgrade and got a list of packages that possibly may cause issues, so I decided to uninstall them via terminal (including i think getiplay, some android related packages, some other - will add, when I remember). Then I started the update. If I remember correctly, it went all the way through, then rebooted to the white Sony screen, then rebooted again after about 3-5 seconds and then got stuck at the Sony screen (let it there over night, no changes!).
I have tried to find a solution in the forums, but since I have no clue yet, as what is missing / broken, I am a bit lost. I went into recovery mode, mounted /root and /home and checked for the version → 4.3 is installed.
Would be happy for any indication how to find out what is causing the issues and hopefully fix it without reflashing (already busy saving 3rd party harbour and android files).

Cheers!

Hint

Thanks, I’ve stumbled over this topic as well, but so far I could not work with it - have not yet added internet connection to recovery mode. Seemed a bit more advanced, but looks like I will have to try this later.
But also, I have not found the mentioned library, as the directory /usr/share/GetiPlay does not exist on my phone (probably because I deinstalled it prior to the update, if it ever was installed).
I am also having issues getting a proper log to look for the problems. When running the command from the post, I do not get any results:

/ # journalctl -xa
No journal files were found.
– No entries –

Would be happy about any hints what I am doing wrong here.

So I followed this instruction to get internet:
Internet in recovery
which seemed to work (first, i used a classic local IP, forgot that I am in telnet):

/ # echo “nameserver 8.8.8.8” >> /etc/resolv.conf
/ # route add default gw 192.168.xxx.xxx
SIOCADDRT: Network is unreachable
/ # route add default gw 10.42.66.67

and when trying to update / get new packages this was my output after roughly 20 minutes:

/ # version --dup
REFRESHING CACHE AND DOWNLOADING PACKAGES

So it does not seem that there is anything happening. Am I still making any mistakes?

Edit
I found my mistake:

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

should be for my case

iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE

So now I can reach the internet and get ping replies. Nonetheless I still have the problem, that the update process hangs at

version --dup
REFRESHING CACHE AND DOWNLOADING PACKAGES

So I tried to get a clue following this post:

zypper ref
Repository ‘adaptation-common’ is up to date.
Problem retrieving files from ‘adaptation0’.
Store credentials not received. Not connected to D-Bus server
Please see the above error message for a hint.
Skipping repository ‘adaptation0’ because of the above error.
Problem retrieving files from ‘aliendalvik’.
Store credentials not received. Not connected to D-Bus server
Please see the above error message for a hint.
Skipping repository ‘aliendalvik’ because of the above error.
Repository ‘apps’ is up to date.
Repository ‘compat-f5321’ is up to date.
Repository ‘customer-jolla’ is up to date.
Repository ‘hotfixes’ is up to date.
Repository ‘jolla’ is up to date.
Repository ‘openrepos-JulienBlanc’ is up to date.
Repository ‘openrepos-ade’ is up to date.
Repository ‘openrepos-birdzhang’ is up to date.
Repository ‘openrepos-direc85’ is up to date.
Repository ‘openrepos-osetr’ is up to date.
Repository ‘openrepos-planetos’ is up to date.
Repository ‘openrepos-planetos_store’ is up to date.
Repository ‘openrepos-rinigus’ is up to date.
Repository ‘openrepos-rubdos’ is up to date.
Repository ‘openrepos-tpLabs’ is up to date.
Problem retrieving files from ‘sailfish-eas’.
Store credentials not received. Not connected to D-Bus server
Please see the above error message for a hint.
Skipping repository ‘sailfish-eas’ because of the above error.
Retrieving repository ‘store’ metadata …[error]
Repository ‘store’ is invalid.
[store|plugin:ssu?repo=store] Valid metadata not found at specified URL
History:
– Unknown error reading from ‘plugin:ssu?repo=store’
– Store credentials not received. Not connected to D-Bus server
Please check if the URIs defined for this repository are pointing to a valid repository.
Skipping repository ‘store’ because of the above error.
Problem retrieving files from ‘xt9’.
Store credentials not received. Not connected to D-Bus server
Please see the above error message for a hint.
Skipping repository ‘xt9’ because of the above error.
Some of the repositories have not been refreshed because of an error.

So there seems to be a general problem with the store (authentification)? How do I fix this?

Perhaps related, but openrepos.net is down perhaps blocked. So removing all openrepos-* can’t be a bad idea.

zypper removerepo <repoName>

So Openrepos.net is back on, but I still get some errors. I am mainly worried about this part:

Please see the above error message for a hint.
Skipping repository ‘sailfish-eas’ because of the above error.
Retrieving repository ‘store’ metadata …[error]
Repository ‘store’ is invalid.
[store|plugin:ssu?repo=store] Valid metadata not found at specified URL
History:
– Unknown error reading from ‘plugin:ssu?repo=store’
– Store credentials not received. Not connected to D-Bus server

Anyone have an idea what this is and / or how to solve it?

This is a pretty bad idea™!
Restoring these entries is tedious (even with a backup) and error prone.

At most one may disable these repos per
for open_repo in $(ssu lr | fgrep 'openrepo' | cut -s -f 3 -d ' '); do ssu dr "$open_repo"; done

Mind that one cannot enable them again in one go, this has to be done manually one by one, because there usually are already disabled repositories.

It seems like this problem Xperia X hangs on boot after upgrade to [4.3.0.12]

So I managed to get persistent logs and tried to figure out, what is causing the problems. Not easy to find the critical stuff in that load of messages. But what kept showing up was an error with lipstick UI (which would explain, why I am stuck at Sony logo):

Apr 08 20:09:04 Sailfish systemd[1010]: Starting The lipstick UI…
Apr 08 20:09:04 Sailfish lipstick[1092]: [W] unknown:0 - Could not open /sys/fs/cgroup/memory/noswapping/tasks for disabling caching
Apr 08 20:09:04 Sailfish systemd[1010]: lipstick.service: Main process exited, code=killed, status=6/ABRT
Apr 08 20:09:04 Sailfish systemd[1010]: lipstick.service: Failed with result ‘signal’.
Apr 08 20:09:04 Sailfish systemd[1010]: Failed to start The lipstick UI.
Apr 08 20:09:04 Sailfish systemd[1010]: Dependency failed for The lipstick security prompt UI.
Apr 08 20:09:04 Sailfish systemd[1010]: lipstick-security-ui.service: Job lipstick-security-ui.service/start failed with result ‘dependency’.
Apr 08 20:09:05 Sailfish systemd[1010]: lipstick.service: Service hold-off time over, scheduling restart.
Apr 08 20:09:05 Sailfish systemd[1010]: lipstick.service: Scheduled restart job, restart counter is at 1.
Apr 08 20:09:05 Sailfish systemd[1010]: Stopped The lipstick UI.

Does this mean I would have to reinstall lipstick?
Also, I am still worried about the error I get with zypper ref and the “store” repository. Is it possible that my phone is logged out of the jolla account and does not update?

Yes.

If you have a paid license I would inquire the Jolla support.

Well, I did switch my sim card into my old jolla 1 and had to log into my account again there possibly that logged me out on my Xperia :thinking:
I will try to contact the Jolla support parallel.

I was going to open a bug report but I found this thread.

Every time I re-flash the X10 II, I need to repeat a set of operations and among them

pkcon refresh && pkcon update

Therefore, I started to execute them by a remote SSH script and surprisingly I found that these two commands running by a non interactive shell are going to take infinite time to be executed. The zypper alternative does not make a difference.

You can say that this is normal because they should run with -yp options, in particular -y. Well, it is normal because a sane software would have detected the issue (stdin not available as tty) and stop before run or run with -py (one or another) while fail to work and mess-up the repos is not the way to go.

However, being back to the problem. When this happen, the suggestion accepted as solution is to re-flash the smartphone:

Let me say: once upon a time, rebooting a GNU/Linux system was considered something to avoid (cfr. the uptime challenge) therefore the need to re-flash a smartphone because the packages repositories have been corrupted (or messed-up) by an application that cannot deal properly with a non-TTY redirected stdin is something that sounds quite outrageous to me.

Which alternatives?


UPDATE

Waiting for ages, then the system seems back to its track again. This is the solution to not avoid the problem altogether:

ssu status | tee /tmp/ssu.status
repo_list='disablerepo adaptation0 aliendalvik sailfish-eas xt9'
if grep -q 'status: not registered' /tmp/ssu.status; then
	for i in $repo_list; do ssu disablerepo $i; done
else
	for i in $repo_list; do ssu enablerepo $i; done
fi
rm -f  /tmp/ssu.status
ssu repos

UPDATE #2

The root cause is: the unregistered users are not going to receive credentials from some repositories which are enabled by default (instead of being enabled at registration time) and moreover, those repository simple do not send any answer leaving the client {zypper, pkcon, ssu) waiting for ages before their internal timeouts will expire (instead of sending a denial of access that the client can immediately receive and elaborate).