nextcloud / richdocuments

📑 Collabora Online for Nextcloud
https://nextcloud.com/collaboraonline
356 stars 116 forks source link

Nextcloud Office builtin server: Collabora_Online.AppImage fails to start if libfuse2 is missing. #3190

Closed samvde closed 1 year ago

samvde commented 1 year ago

Describe the bug On Ubuntu systems with nextcloud installed via snap, Collabora_Online.AppImage (/var/snap/nextcloud/current/nextcloud/extra-apps/richdocumentscode/collabora) can't be started if libfuse2 is missing. When trying to edit a document using Nextcloud Office and the builtin richdocumentscode server, it will keep on loading eternally.

The fix is to apt-get install libfuse2.

I also noticed after a reboot, the Appimage needs to be started manually on the server. I am not sure what mechanism is responsible to autostart it when using Nextcloud Office.

To Reproduce Steps to reproduce the behavior:

  1. Install nextcloud on an ubuntu server via the snap package
  2. Make sure libfuse2 is not installed (my instance runs in a container, full ubuntu server might have the libfuse2 package per default)
  3. Configure nextcloud office to make use of the built-in CODE server
  4. Log on to your nextcloud instance and try to edit a document.
  5. See eternal loading issue.

Expected behavior The dependency is taken care of by default, and trying to edit a document loads the Appimage as needed.

Screenshots If applicable, add screenshots to help explain your problem.

Client details:

Server details

Operating system Ubuntu 22.04 in LXD container, minimal image

Web server: via nextcloud snap

Database: via nextcloud snap

PHP version: via nextcloud snap

Nextcloud version: nextcloud 27.0.2snap1 37045 latest/stable nextcloud✓ -

Version of the richdocuments app 8.2.0

Version of Collabora Online 23.5.402

Logs #### Nextcloud log (data/nextcloud.log) ``` Insert your Nextcloud log here ``` #### Browser log ``` Insert your browser log here, this could for example include: a) The javascript console log b) The network log c) ... ```
juliusknorr commented 1 year ago

libfuse2 seems to be listed as optional in https://github.com/CollaboraOnline/richdocumentscode so maybe you can file an issue there.

joshtrichards commented 1 year ago

Also doesn't match the recently updated Snap docs:

https://github.com/nextcloud-snap/nextcloud-snap/wiki/Configure-CODE-and-Nextcloud-office-for-Nextcloud-snap#collabora-online---built-in-code-server-and-nextcloud-office-for-nextcloud-snap

Are you certain that was all you did and that installing libfuse2 was really what fixed it?

Because you'll get the error about fuse in any conventional Docker setup. That's... Normal for richdocumentscode. After fuse fails it automatically falls back to extracting and running.

In any case, what @juliushaertl said stands: probably out of scope here. I'm just responding because I saw your issue while looking at some other ones.

Glad you figured out an approach that works in your situation. :-)

samvde commented 1 year ago

Yes, I am sure it fixed it. Nevertheless just re-tested it:

Start: Online editing working.

root@mynextcloud:~# snap stop nextcloud
2023-11-05T17:49:51Z INFO Waiting for "snap.nextcloud.mysql.service" to stop.
Stopped.
root@mynextcloud:~# apt remove libfuse2
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
  libfuse2
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 330 kB disk space will be freed.
Do you want to continue? [Y/n] 
(Reading database ... 24191 files and directories currently installed.)
Removing libfuse2:amd64 (2.9.9-5ubuntu3) ...
Processing triggers for libc-bin (2.35-0ubuntu3.4) ...
root@mynextcloud:~# snap start nextcloud
Started.
root@mynextcloud:~# snap services nextcloud
Service                    Startup  Current   Notes
nextcloud.apache           enabled  active    -
nextcloud.logrotate        enabled  inactive  timer-activated
nextcloud.mysql            enabled  active    -
nextcloud.nextcloud-cron   enabled  active    -
nextcloud.nextcloud-fixer  enabled  active    -
nextcloud.php-fpm          enabled  active    -
nextcloud.redis-server     enabled  active    -
nextcloud.renew-certs      enabled  active    -
root@mynextcloud:~#

Online editing not possible.

root@mynextcloud:~# /var/snap/nextcloud/current/nextcloud/extra-apps/richdocumentscode/collabora/Collabora_Online.AppImage
dlopen(): error loading libfuse.so.2

AppImages require FUSE to run. 
You might still be able to extract the contents of this AppImage 
if you run it with the --appimage-extract option. 
See https://github.com/AppImage/AppImageKit/wiki/FUSE 
for more information
root@mynextcloud:~#

Online editing not possible.

root@mynextcloud:~# apt install libfuse2
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  libfuse2
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 90.3 kB of archives.
After this operation, 330 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu jammy/universe amd64 libfuse2 amd64 2.9.9-5ubuntu3 [90.3 kB]
Fetched 90.3 kB in 6s (15.9 kB/s)   
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package libfuse2:amd64.
(Reading database ... 24179 files and directories currently installed.)
Preparing to unpack .../libfuse2_2.9.9-5ubuntu3_amd64.deb ...
Unpacking libfuse2:amd64 (2.9.9-5ubuntu3) ...
Setting up libfuse2:amd64 (2.9.9-5ubuntu3) ...
Processing triggers for libc-bin (2.35-0ubuntu3.4) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 78.)
debconf: falling back to frontend: Readline
Scanning processes...                                                                                                                                                                      

No services need to be restarted.

No containers need to be restarted.

No user sessions are running outdated binaries.

No VM guests are running outdated hypervisor (qemu) binaries on this host.
root@mynextcloud:~#  /var/snap/nextcloud/current/nextcloud/extra-apps/richdocumentscode/collabora/Collabora_Online.AppImage

Logging at warning level to file: /tmp/coolwsd.npgkjwOUpw/coolwsd.log
Security: coolforkit incorrect user-name, other than 'cool'
coolforkit version details: 23.05.5.3 - 5093121
Init vcl
preload: xsec_xmlsec merged ucpchelp1 wpftwriter wpftcalc wpftimpress wpftdraw writerfilter msforms ucppkg1 ucpcmis1 cached1 vbaswobj swd sw ucpdav1 smd sm pdfimport PresentationMinimizer sd scriptframe protocolhandler dlgprov date analysis vbaobj scfilt scd xmlsecurity sc expwrap oox LanguageTool ldapbe2 pcr storagefd log chartcore pdffilter migrationoo3 deploymentgui scn cui sdbt mozbootstrap bootstrap flat io animcore svgfilter embobj t602filter dbaxml stocservices chartcontroller namingservice cairocanvas invocadapt introspection migrationoo2 dbpool2 binaryurp mysql_jdbc pricing proxyfac calc invocation dba uuresolver solver reflection writer textconversiondlgs hwp msword graphicfilter emboleobj sdd slideshow dbase bib
Disabled: ucpftp1 rptxml rptui rpt dbp abp sdbc2 cmdmail PresenterScreen dbu odbc 
Allowlisted languages: de_DE el en_GB en_US es_ES fr_FR hu it nl pt_BR pt_PT ru 
Preloading dictionaries: de-DE en-US fr-FR it-IT nl-NL pt-BR ru-RU en-GB nl-BE pt-PT es-ES 
Preloading thesauri: de-DE en-US fr-FR it-IT nl-NL pt-BR ru-RU en-GB nl-BE pt-PT es-ES 
Preload icons
Preload short cut accelerators
Preload languages
Preload fonts
Fontconfig error: Cannot load default config file: No such file: (null)
Preload config
office version details: { "ProductName": "Collabora Office", "ProductVersion": "23.05", "ProductExtension": ".5.3", "BuildId": "e7921fedb8b5615b0dc7cd3ec8b91c9b4e06d002", "BuildConfig": "'--enable-mpl-subset' '--with-vendor=Collabora' '--disable-community-flavor' '--with-branding=icon-themes/galaxy/brand_cp' '--with-system-dicts' '--with-myspell-dicts' '--with-system-zlib' '--disable-poppler' '--enable-cairo-rgba' '--without-system-cairo' '--without-system-fontconfig' '--without-system-freetype' '--without-system-graphite' '--without-system-harfbuzz' '--without-system-openssl' '--without-system-libpng' '--without-system-libxml' '--without-system-jpeg' '--without-system-expat' '--without-system-curl' '--without-system-icu' '--without-system-nss' '--without-system-jars' '--without-system-postgresql' '--without-java' '--without-junit' '--without-help' '--with-linker-hash-style=both' '--with-fonts' '--enable-noto-font' '--with-galleries=no' '--with-theme=colibre colibre_svg' '--with-external-thes-dir=/usr/share/mythes' '--with-external-hyph-dir=/usr/share/hyphen' '--with-external-dict-dir=/usr/share/hunspell' '--disable-dbus' '--enable-extension-integration' '--disable-odk' '--disable-kf5' '--disable-gtk3' '--disable-qt5' '--disable-gstreamer-1-0' '--disable-evolution2' '--disable-gio' '--disable-gui' '--disable-scripting-beanshell' '--disable-scripting-javascript' '--disable-ext-wiki-publisher' '--disable-report-builder' '--disable-ext-nlpsolver' '--disable-sdremote' '--disable-sdremote-bluetooth' '--disable-postgresql-sdbc' '--disable-firebird-sdbc' '--disable-randr' '--disable-ext-numbertext' '--enable-epm' '--enable-python=internal' '--disable-online-update' '--disable-dconf' '--enable-mergelibs' '--with-package-format=deb rpm' '--enable-release-build' '--with-lang=ar bg ca cs da de el en-US en-GB eo es eu fi fr gl he hr hu id is it ja ko lo nb nl oc pl pt pt-BR sq ru sk sl sv tr uk vi zh-CN zh-TW' '--disable-lotuswordpro' '--disable-lpsolve' '--enable-symbols' '--enable-sal-log' '--without-templates' '--srcdir=/opt/collaboraoffice/debugsource' '--enable-option-checking=fatal' 'PKG_CONFIG_PATH=/opt/rh/devtoolset-10/root/usr/lib64/pkgconfig:/opt/rh/devtoolset-10/root/usr/lib64/pkgconfig'" }
Ready to accept connections on port 9983.

Online editing works again.

This is the error about AppImages needing libfuse:

root@mynextcloud:~# /var/snap/nextcloud/current/nextcloud/extra-apps/richdocumentscode/collabora/Collabora_Online.AppImage
dlopen(): error loading libfuse.so.2

AppImages require FUSE to run.

I added a systemd unit to start the appimage automatically at start. Without libfuse2, it will not run.