Nextcloud 25.0.2 with Built In CODE, clicking documents downloads but will not edit online?

Nextcloud version: 25.0.2
Operating system and version: Ubuntu 22.04 LTS
Apache or nginx version: 2.4.54
PHP version: 8.1.3

The issue you are facing:

I have a Nextcloud instance with the Built In CODE server installed. It used to work, but I didn’t use it for a while, and now when I click a document to edit, it downloads instead of edits. If I select a file and click the “…” to look for options, there is no edit option or anything to indicate opening in CODE. It’s like Nextcloud doesn’t see the built in CODE server and functions normally as if it doesn’t exist.

If I go to Administration and find the “Nextcloud Office” pane, I can see the radio button for “Use the built-in CODE - Collabora Online Development Edition” is checked, and above that I have a green check for “Collabora Online server is reachable”.

There is nothing in the logs, neither a warning nor error. I’ve also checked the apache error and access logs, nothing there either. I’m not sure where else to look.

Is this the first time you’ve seen this error? : Yes

Steps to replicate it:

  1. Go to Files, find a document
  2. Click it.
  3. A download dialog from the browser pops up

The output of your Nextcloud log in Admin > Logging:

Absolutely no log entries at any severity including Debug show up for this action.  There are previous warnings in the logs not related to this issue.

The output of your config.php file in /path/to/nextcloud:

<?php
$CONFIG = array (
  'instanceid' => '------------------',
  'passwordsalt' => '--------------',
  'secret' => '-------------------',
  'trusted_domains' =>
  array (
    0 => 'subdomain.domain.com',
    1 => 'domain.com',
    2 => 'nextcloud.domain.com',
  ),
  'datadirectory' => '/var/www/nextcloud/data',
  'dbtype' => 'mysql',
  'defaultapp' => 'files',
  'version' => '25.0.2.3',
  'overwritehost' => 'nextcloud.domain.com',
  'overwritewebroot' => '',
  'overwriteprotocol' => 'https',
  'overwrite.cli.url' => 'https://nextcloud.domain.com',
  'htaccess.RewriteBase' => '/',
  'dbname' => 'hda_nextcloud',
  'dbhost' => 'localhost:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'usr_servername_nextcloud',
  'dbpassword' => '--------',
  'installed' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'maintenance' => false,
  'theme' => '',
  'log_type' => 'file',
  'logfile' => '/var/log/nextcloud/nextcloud.log',
  'loglevel' => 2,
  'mail_from_address' => 'nextcloud',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'subdomain.domain.com',
  'mail_smtphost' => '127.0.0.1',
  'mail_smtpport' => '25',
  'default_phone_region' => 'US',
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'app_install_overwrite' =>
  array (
    0 => 'files_3d',
    1 => 'files_texteditor',
    2 => 'printer',
    3 => 'epubreader',
  ),
  'trashbin_retention_obligation' => 'auto,15',
  'allow_local_remote_servers' => true,
);
?>

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

There is basically nothing, this is the output of multitail -f --mergeall /var/log/apache2/error.nextcloud.log /var/log/apache2/access.nextcloud.log during a click of a document

*.93.213.50 - - [16/Dec/2022:12:52:29 -0800] "PUT /ocs/v2.php/apps/user_status/api/v1/heartbeat?format=json HTTP/1.1" 200 1645 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:107.0) Gecko/20100101 Fire
fox/107.0"
174.34.209.194 - username [16/Dec/2022:12:52:34 -0800] "PROPFIND /remote.php/dav/files/0c904fda-590e-103b-8ab3-8f73b30b6c02/Mike HTTP/1.1" 207 5466 "-" "Mozilla/5.0 (Windows) mirall/3.4.0stable-Win64 (b
uild 20211129) (Nextcloud, windows-10.0.22621 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
*.93.213.50 - - [16/Dec/2022:12:52:35 -0800] "PUT /ocs/v2.php/apps/user_status/api/v1/heartbeat?format=json HTTP/1.1" 200 1645 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:107.0) Gecko/20100101 Fire
fox/107.0"
*.93.213.50 - - [16/Dec/2022:12:52:35 -0800] "PUT /ocs/v2.php/apps/user_status/api/v1/heartbeat?format=json HTTP/1.1" 200 1039 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:107.0) Gecko/20100101 Fire
fox/107.0"
*.93.213.50 - - [16/Dec/2022:12:52:36 -0800] "GET /remote.php/webdav/Home/Documents/Philosophy.doc HTTP/1.1" 200 26212 "-" "Mozilla/5.0 (Windows NT
10.0; Win64; x64; rv:107.0) Gecko/20100101 Firefox/107.0"
*.93.213.50 - - [16/Dec/2022:12:52:18 -0800] "GET /apps/logreader/poll?lastReqId=5OEiTeYJMUgAQcMsN6xY HTTP/1.1" 200 918 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:107.0) Gecko/20100101 Firefox/107
.0"

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.

No errors in nextcloud.log

Had the same issue and fiddled for a while to get things working. This is what I did:

  1. Validated NC is on 25.0.2
  2. Went to apps and validated Nextcloud Office version 7.0.2 was enabled
  3. Went to ‘Administration settings’ and under ‘Administration’ section, selected ‘Nextcloud Office’
  4. Selected ‘Use a demo server’ and then with the next popup box option, I selected ‘I will setup my own server’.
  5. After selecting that option, it took me the option to choose ‘Use your own server’ with the URL (and Port) of Collabora Online-server’ and my actual URL for the live site - https://subdomain.domain.com/apps/richdocumentscode/proxy.php?req=
  6. I clicked ‘Save’ and NC then selected ‘Use the built-in CODE - Collabora Online Development Edition’ option.
  7. Went back to ‘Files’ and could then edit documents once again.

NOTE: I noticed that under ‘Administration’ section of ‘Administration settings’, instead of it saying ‘Nextcloud Office’, it now says ‘Office’ and not ‘Nextcloud Office’. Nextcloud Office version 7.0.2 was still enabled. Don’t know what the deal is or why this fixed the issue for me, but it surely did.

Hope this helps,

Andy

1 Like