Ubuntu 18.04 netease cloud music(网易云) debug

It looks like there are some conflictions between gnome and neaease GUI.
I tried sudo tail -f /var/log/syslog, but I failed to find something useful.

The first bug

Failed to load module "canberra-gtk-module"
simply fix with sudo apt install libcanberra-gtk-module

Ubuntu 18 04 netease(网易云) only launches with sudo

Ubuntu 18 04 netease(网易云) only launches after psudo-shutdown


Do not have sqlite permission without sudo

After Removing some duplicated logs

1
2
3
4
5
6
7
8
9
[0803/224138.520338:ERROR:connection.cc(1963)] Cookie sqlite error 8, errno 0: attempt to write a readonly database, sql: UPDATE cookies SET last_access_utc=? WHERE creation_utc=?
[0803/224138.523661:ERROR:connection.cc(1963)] Cookie sqlite error 8, errno 0: attempt to write a readonly database, sql: DELETE FROM cookies WHERE creation_utc=?
[0803/224138.579256:ERROR:connection.cc(1963)] Cookie sqlite error 8, errno 0: attempt to write a readonly database, sql: INSERT INTO cookies (creation_utc, host_key, name, value, encrypted_value, path, expires_utc, secure, httponly, firstpartyonly, last_access_utc, has_expires, persistent, priority) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?)
[0803/224138.626916:ERROR:connection.cc(1963)] DOMStorageDatabase sqlite error 14, errno -2: unable to open database file, sql: -- sqlite3_open()
[0803/224138.627013:ERROR:dom_storage_database.cc(180)] Unable to open DOM storage database at /home/akb/.cache/netease-cloud-music/Cef/Cache/Local Storage/orpheus_orpheus_0.localstorage error: sql::Connection has no connection.
[0803/224139.176441:ERROR:connection.cc(1963)] Cookie sqlite error 8, errno 0: attempt to write a readonly database, sql: UPDATE cookies SET last_access_utc=? WHERE creation_utc=?
[0803/224139.176637:ERROR:connection.cc(1963)] Cookie sqlite error 8, errno 0: attempt to write a readonly database, sql: INSERT INTO cookies (creation_utc, host_key, name, value, encrypted_value, path, expires_utc, secure, httponly, firstpartyonly, last_access_utc, has_expires, persistent, priority) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?)
08-03, 22:41:40 [Error ] [ 0] [base]::WriteTestFile() failed! , path: "/home/akb/.cache/netease-cloud-music/StorageCache/webdata/file/disc_data"
08-03, 22:41:40 [Error ] [ 0] [base]::WriteTestFile() failed! , path: "/home/akb/.cache/netease-cloud-music/StorageCache/webdata/file/disc_data"

And then I found that those files, which are unable to open, belong to root:root(akb is my user name)

1
2
drwxr-xr-x  3 akb akb 4096 ago  3 22:40 StorageCache
drwxr-xr-x 3 root root 4096 ago 3 22:40 webdata

1
2
3
4
5
6
7
8
akb@ubuntu18:~/.cache/netease-cloud-music/Cef/Cache$ ls -l
total 168
drwx------ 2 akb akb 4096 ago 3 22:41 Cache
-rw-r--r-- 1 root root 28672 ago 3 22:45 Cookies
-rw-r--r-- 1 root root 0 ago 3 22:45 Cookies-journal
drwx------ 2 root root 4096 ago 3 22:40 'Local Storage'
drwx------ 2 root root 4096 ago 3 22:40 old_Cache_000
-rw-r--r-- 1 root root 131072 ago 3 22:45 'Visited Links'

Solution:

  1. chmod

    1
    2
    3
    4
    cd ~/.cache/
    sudo chmod -R 777 netease-cloud-music
    cd ~/.config/
    sudo chmod -R 777 netease-cloud-music
  2. chown

    1
    2
    3
    4
    cd ~/.cache/
    sudo chown -R akb:akb netease-cloud-music/
    cd ~/.config/
    sudo chown -R akb:akb netease-cloud-music/

netease in /usr/lib and /usr/bin belong to akb:akb rather than root:root as others

1
2
3
4
5
-rwxr-xr-x 1 root root       10104 abr 23  2016  neotoppm
-rwxr-xr-x 1 root root 908 feb 10 03:09 neqn
-rwxr-xr-x 1 akb akb 14222664 nov 17 2017 netease-cloud-music
-rwxr-xr-x 1 root root 101064 dic 6 2016 netkit-ftp
-rwxr-xr-x 1 root root 17595 jun 19 12:03 networkd-dispatcher

Reference

[1] https://www.jianshu.com/p/116bf1a1a36d
[2] https://blog.csdn.net/Pr0phet_chn/article/details/80023198
[3] https://blog.fliaping.com/analysis-of-the-problem-that-netease-music-linux-client-cant-show-gui/
[4] https://github.com/MajeurAndroid/Adb-Remote-Screen/issues/14