because anydesk does not finish updating correctly? Topic is solved

Having issues with your DietPi installation or found a bug? Post it here.
User avatar
MichaIng
Site Admin
Posts: 3023
Joined: Sat Nov 18, 2017 6:21 pm

Re: because anydesk does not finish updating correctly?

Post by MichaIng »

Can you check the exit code:

Code: Select all

/var/lib/dpkg/info/anydesk.postinst configure
echo $?
Actually I think I know where the issue is:

Code: Select all

        command_exists update-menus && update-menus
        command_exists update-desktop-database && update-desktop-database
        command_exists xdg-desktop-menu && xdg-desktop-menu forceupdate
This means, if any of those commands does not exist, the scripts exits with an error code, as the last check returned a "false". It's a bug in the postinst script.

To verify:

Code: Select all

command -v update-menus
command -v update-desktop-database
command -v xdg-desktop-menu
If any of those does not print a command path back, that's the reason why the script fails (silently).

I cannot find a package source repository of AnyDesk, otherwise we could fix that for them by changing the lines into this:

Code: Select all

        ! command_exists update-menus || update-menus
        ! command_exists update-desktop-database || update-desktop-database
        ! command_exists xdg-desktop-menu || xdg-desktop-menu forceupdate
By this, the last returned check is "true", if the command does not exist, so the script only fails if running the actual command fails, which is intended.
valdragas
Posts: 35
Joined: Sat Oct 03, 2020 1:14 pm

Re: because anydesk does not finish updating correctly?

Post by valdragas »

Hello, I have carried out the steps you indicate and this is the result:

Without modifying the script

Code: Select all

root@DietPi:~# /var/lib/dpkg/info/anydesk.postinst configure
Synchronizing state of anydesk.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable anydesk
root@DietPi:~# echo $?
1
root@DietPi:~# command -v update-menus
root@DietPi:~# command -v update-desktop-database
root@DietPi:~# command -v xdg-desktop-menu
root@DietPi:~# 

After modifying the script with the three lines that you indicate changing $$ by ||

Code: Select all

root@DietPi:~# /var/lib/dpkg/info/anydesk.postinst configure
Synchronizing state of anydesk.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable anydesk
/var/lib/dpkg/info/anydesk.postinst: line 32: update-menus: command not found
Line 32 is:

32 command_exists update-menus || update-menus
valdragas
Posts: 35
Joined: Sat Oct 03, 2020 1:14 pm

Re: because anydesk does not finish updating correctly?

Post by valdragas »

Good,

any help with this?

Greetings
User avatar
Joulinar
Posts: 4823
Joined: Sat Nov 16, 2019 12:49 am

Re: because anydesk does not finish updating correctly?

Post by Joulinar »

it might be good to have it reported to anydesk, if this is a bug within the apt package
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
MichaIng
Site Admin
Posts: 3023
Joined: Sat Nov 18, 2017 6:21 pm

Re: because anydesk does not finish updating correctly?

Post by MichaIng »

@valdragas
Sorry for the late reply. Please add the leading "! " to the front of the three lines. You can copy paste the copy block:

Code: Select all

        ! command_exists update-menus || update-menus
        ! command_exists update-desktop-database || update-desktop-database
        ! command_exists xdg-desktop-menu || xdg-desktop-menu forceupdate
valdragas
Posts: 35
Joined: Sat Oct 03, 2020 1:14 pm

Re: because anydesk does not finish updating correctly?

Post by valdragas »

Hello,

It seems that after executing it with the MichaIng indications, the error no longer appears.

A greeting
User avatar
MichaIng
Site Admin
Posts: 3023
Joined: Sat Nov 18, 2017 6:21 pm

Re: because anydesk does not finish updating correctly?

Post by MichaIng »

Great. I'll report this the AnyDesk.
valdragas
Posts: 35
Joined: Sat Oct 03, 2020 1:14 pm

Re: because anydesk does not finish updating correctly?

Post by valdragas »

Hello,

We know if it is better to open a new topic although it is related to the same thing, but today anydesk has stopped working again throwing this error:

Code: Select all

root@DietPi:~# systemctl status anydesk
● anydesk.service - AnyDesk
   Loaded: loaded (/etc/systemd/system/anydesk.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Mon 2021-05-17 08:35:34 BST; 17min ago
  Process: 7920 ExecStart=/usr/bin/anydesk --service (code=exited, status=127)
 Main PID: 7920 (code=exited, status=127)

May 17 08:35:34 DietPi systemd[1]: Started AnyDesk.
May 17 08:35:34 DietPi anydesk[7920]: /usr/bin/anydesk: symbol lookup error: /lib/arm-linux-gnueabihf/libgdk_pixbuf-2.0.so.0: undefined symbol: g_direcp_equal
May 17 08:35:34 DietPi systemd[1]: anydesk.service: Main process exited, code=exited, status=127/n/a
May 17 08:35:34 DietPi systemd[1]: anydesk.service: Failed with result 'exit-code'.

Code: Select all

root@DietPi:~# dpkg -l |grep libgdk
ii  libgdk-pixbuf2.0-0:armhf       2.38.1+dfsg-1                       armhf        GDK Pixbuf library
ii  libgdk-pixbuf2.0-common        2.38.1+dfsg-1                       all          GDK Pixbuf library - data files

What is the problem now?
User avatar
Joulinar
Posts: 4823
Joined: Sat Nov 16, 2019 12:49 am

Re: because anydesk does not finish updating correctly?

Post by Joulinar »

probably as well something that might need to be reported to anydesk?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
valdragas
Posts: 35
Joined: Sat Oct 03, 2020 1:14 pm

Re: because anydesk does not finish updating correctly?

Post by valdragas »

But it has been working correctly and after a reset of the PI this error has started to appear
Post Reply