Cannot open Office files via the android app after Nextcloud 27.1 upgrade

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 27.1.1
Operating system and version (eg, Ubuntu 20.04): Ubuntu 22.04.3 LTS
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.52
PHP version (eg, 7.4): '8.1.2-1ubuntu2.14`

The issue you are facing: I have updated two of my Nextcloud servers from 27.0 to 27.1 and in both cases I can no longer open an Office file using the official Android app. I get an error saying ‘No app set up to handle this file type’.
I can still do so through a browser or from the official iOS Nextcloud app. Identical servers still running 27.0 continue to work with the Android app. All servers are using the same external Collabora instance as the Office back end.

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Use the Android Nextcloud client to open an Office file residing on a NC 27.0 server, such as an odt or ods file.View and edit it as desired.
  2. Update the server to 27.1
  3. Attempt to repeat step 1 and observe the error message in place of a successful operation.

The output of your Nextcloud log in Admin > Logging:

Nothing is logged either when attempting to open a file from the Android app, or when successfully opening the same file from the iOS app.

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'passwordsalt' => 'hidden',
  'secret' => 'hidden',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => 'hidden',
  ),
  'datadirectory' => '/usr/local/ncdata',
  'dbtype' => 'mysql',
  'version' => '27.1.1.0',
  'overwrite.cli.url' => 'hidden',
  'dbname' => 'nextcloudDB',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'hidden',
  'dbpassword' => 'hidden',
  'installed' => true,
  'instanceid' => 'hidden',
  'htaccess.RewriteBase' => '/',
  'overwriteprotocol' => 'https',
  'force_language' => 'en',
  'force_locale' => 'en_US',
  'default_phone_region' => 'US',
  'auth.bruteforce.protection.enabled' => true,
  'filelocking.enabled' => true,
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '127.0.0.1',
    'port' => 6379,
    'timeout' => 0,
  ),
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'hidden',
  'mail_smtpsecure' => 'tls',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtpport' => '587',
  'mail_smtphost' => 'hidden',
  'mail_smtpname' => 'hidden',
  'mail_smtppassword' => 'hidden',
  'mail_from_address' => 'device',
  'remember_login_cookie_lifetime' => 259200,
  'session_lifetime' => 43200,
  'auto_logout' => true,
  'token_auth_enforced' => true,
  'skeletondirectory' => '',
  'trusted_proxies' => 
  array (
    0 => 'hidden',
  ),
  'twofactor_enforced' => 'true',
  'twofactor_enforced_groups' => 
  array (
  ),
  'twofactor_enforced_excluded_groups' => 
  array (
  ),
  'preview_max_memory' => 4096,
  'preview_max_filesize_image' => 256,
  'maintenance' => false,
  'preview_max_x' => 100,
  'preview_max_y' => 100,
  'preview_max_scale_factor' => 1,
  'allow_local_remote_servers' => true,
  'loglevel' => 1,
  'theme' => '',
  'updater.release.channel' => 'stable',
  'session_keepalive' => false,
  'memories.exiftool' => '/var/www/nextcloud/apps/memories/exiftool-bin/exiftool-amd64-glibc',
  'memories.vod.path' => '/var/www/nextcloud/apps/memories/exiftool-bin/go-vod-amd64',
);

The output of your Apache/nginx/system log in /var/log/____:

[Tue Sep 26 00:00:01.392448 2023] [mpm_prefork:notice] [pid 352] AH00163: Apache/2.4.52 (Ubuntu) OpenSSL/3.0.2 configured -- resuming normal operations
[Tue Sep 26 00:00:01.392497 2023] [core:notice] [pid 352] AH00094: Command line: '/usr/sbin/apache2'

PASTE HERE


Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

PASTE HERE

Looks like the same bug:

I have found an apparent workaround thanks to the link Mornsgrans provided.

Following the breadcrumb trail brought me to this link: https://github.com/nextcloud/richdocuments/pull/3184

I can confirm that running the suggested occ command allows me to access my Office files on Android again.

Path to ‘occ’ will vary depending on system configuration. In my particular setup this was the complete required command: sudo -u www-data php /var/www/nextcloud/occ config:app:set richdocuments mobile_editing --value=“no”

However, I did notice that I cannot see when someone else has the file open. I do not know that this is related, because it has been months since I had multiple logins to a single file, but I remember when I first set Collabora up and for at least a few months afterwards when I would collaboratively edit spreadsheets with others I could see that they were also in the file, and what Cell they were currently on, and vice-versa.

At the moment this is no longer the case. Since I do not know exactly what setting ‘richdocuments mobile_editing --value=“no”’ is supposed to accomplish, I cannot say if that is the cause of this. However, it does seem more than a little odd that a setting that appears to disable editing via mobile actually allows it.