App Store endpoint for onlyoffice integration app unreachable

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

The community help forum (help.nextcloud.com) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are volunteering their time to help you.

If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via portal.nextcloud.com where Nextcloud engineers can help ensure your business keeps running smoothly.

Getting help

In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.

Before clicking submit: Please check if your query is already addressed via the following resources:

(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).

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:

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • replace me
  • Operating system and version (e.g., Ubuntu 24.04):
    • replace me
  • Web server and version (e.g, Apache 2.4.25):
    • replace me
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • replace me
  • PHP version (e.g, 8.3):
    • 8.3
  • Is this the first time you’ve seen this error? (Yes / No):
    • yes
  • When did this problem seem to first start?
    • around 5pm pacific standard time
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • bare metal
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • cloudflare

Summary of the issue you are facing:

We have a script driven install that has worked without a hitch multiple time. Yesterday, the onlyoffice integration app was not installed. It as not visible anywhere in the gui: not in browing apps, not in my apps, not in disabled apps.

Eventualliy, we installed it from its tarball, but that is not a method we want to use.

We wrote a little script to see if onlyoffice is reachable on the appstore. It is not as shown in these results:

```
bash -lc ‘bash diagnostics/appstore_health_check.sh’

== DNS and TLS ==
2a01:4f9:6a:1de8::2 STREAM apps.nextcloud.com
2a01:4f9:6a:1de8::2 DGRAM

== HEAD https://apps.nextcloud.com/api/v1/apps/onlyoffice ==
status: 500
NOT OK

== GET first bytes https://apps.nextcloud.com/api/v1/apps/onlyoffice ==

Server Error (500)

== Catalog listing (unauth) https://apps.nextcloud.com/api/v1/apps?page=1 ==
status: 401 (401 is expected without token)

== Latency sample ==
elapsed=0:00.10s

== Summary ==
See status codes above; 200 on app endpoint means available.
root@test-collab:/srv/collab#
root@test-collab:/srv/collab# bash -lc “sudo -u www-data php /var/www/nextcloud/occ config:list onlyoffice | sed -n ‘1,200p’”
{
“apps”: {
“onlyoffice”: {
“DocumentServerInternalUrl”: “http://127.0.0.1:8080/”,
“DocumentServerUrl”: “https://docs.test-collab-site.com/onlyoffice/”,
“StorageUrl”: “https://docs.test-collab-site.com/”,
“enabled”: “yes”,
“installed_version”: “9.11.0”,
“jwt_enabled”: “true”,
“jwt_header”: “Authorization”,
“jwt_secret”: “REMOVED SENSITIVE VALUE”,
“sameTab”: “true”,
“settings_error”: “”,
“types”: “prevent_group_restriction”,
“verify_peer_off”: “false”
}
}
}

Steps to replicate it (hint: details matter!):

  1. using the occ command to install it (the right way) fails

Log entries

Nextcloud

Please provide the log entries from your Nextcloud log that are generated during the time of problem (via the Copy raw option from Administration settings->Logging screen or from your nextcloud.log located in your data directory). Feel free to use a pastebin/gist service if necessary.

PASTE HERE

Web Browser

If the problem is related to the Web interface, open your browser inspector Console and Network tabs while refreshing (reloading) and reproducing the problem. Provide any relevant output/errors here that appear.

since we fixed it manually, can't do that any more,

Web server / Reverse Proxy

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

server {
    listen 80;
    listen [::]:80;
    server_name docs.test-collab-site.com;

    # Allow Let's Encrypt challenge without redirect loops
    location ^~ /.well-known/acme-challenge/ {
        root /var/www/nextcloud;
        default_type "text/plain";
    }

    return 301 https://$host$request_uri;
}

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    server_name docs.test-collab-site.com;

    ssl_certificate     /etc/letsencrypt/live/docs.test-collab-site.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/docs.test-collab-site.com/privkey.pem;
    ssl_protocols TLSv1.2 TLSv1.3;
    ssl_prefer_server_ciphers off;
    ssl_session_timeout 1d;
    ssl_session_cache shared:SSL:50m;
    ssl_session_tickets off;
    ssl_stapling on;
    ssl_stapling_verify on;

    root   /var/www/nextcloud;
    index  index.php index.html;

    client_max_body_size 512M;
    client_body_timeout  300s;
    send_timeout         300s;
    keepalive_timeout    75s;

    add_header Strict-Transport-Security "max-age=15552000; includeSubDomains; preload" always;
    add_header X-Content-Type-Options "nosniff" always;
    add_header X-Frame-Options "SAMEORIGIN" always;
    add_header X-XSS-Protection "1; mode=block" always;
    add_header Referrer-Policy "no-referrer" always;
    add_header Permissions-Policy "accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=()" always;
    add_header X-Robots-Tag "noindex,nofollow" always;
    add_header X-Permitted-Cross-Domain-Policies "none" always;

    location = /.well-known/carddav { return 301 /remote.php/dav; }
    location = /.well-known/caldav  { return 301 /remote.php/dav; }
    location = /.well-known/webfinger { return 301 /index.php/.well-known/webfinger; }
    location = /.well-known/nodeinfo  { return 301 /index.php/.well-known/nodeinfo; }
    location = /.well-known/host-meta { return 301 /public.php?service=host-meta; }
    location = /.well-known/host-meta.json { return 301 /public.php?service=host-meta-json; }
    location ^~ /.well-known/acme-challenge/ {
        root /var/www/nextcloud;
        default_type "text/plain";
    }

    location ^~ /onlyoffice/ {
        proxy_pass         http://127.0.0.1:8080/;
        proxy_http_version 1.1;
        proxy_set_header   Host               $host;
        proxy_set_header   X-Real-IP          $remote_addr;
        proxy_set_header   X-Forwarded-For    $proxy_add_x_forwarded_for;
        proxy_set_header   X-Forwarded-Proto  https;
        proxy_set_header   X-Forwarded-Host   $host;
        proxy_set_header   X-Forwarded-Port   443;
        proxy_set_header   X-Forwarded-Prefix /onlyoffice;
        proxy_set_header   Authorization      $http_authorization;
        proxy_set_header   Upgrade            $http_upgrade;
        proxy_set_header   Connection         $connection_upgrade;
        client_max_body_size 200m;
        proxy_read_timeout    3600s;
        proxy_send_timeout    3600s;
        proxy_buffering       off;
        proxy_redirect        off;
    }

    location / {
        try_files $uri $uri/ /index.php$request_uri;
    }

    location ^~ /index.php {
        fastcgi_split_path_info ^(.+?\.php)(/.*)$;
        try_files $fastcgi_script_name =404;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param PATH_INFO       $fastcgi_path_info;
        fastcgi_param modHeadersAvailable true;
        fastcgi_param front_controller_active true;
        fastcgi_pass unix:/run/php/php8.3-fpm.sock;
        fastcgi_intercept_errors on;
        fastcgi_request_buffering off;
    }

    location ^~ /remote.php {
        fastcgi_split_path_info ^(.+?\.php)(/.*)$;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param PATH_INFO       $fastcgi_path_info;
        fastcgi_param modHeadersAvailable true;
        fastcgi_param front_controller_active true;
        fastcgi_pass unix:/run/php/php8.3-fpm.sock;
        fastcgi_intercept_errors on;
        fastcgi_request_buffering off;
    }

    # Static assets (hashed bundles, modules, wasm)
    location ~ ^/(?!index\.php/).*(?:css|js|mjs|wasm|woff2?|svg|gif|map)$ {
        try_files $uri /index.php$request_uri;
        expires 6M;
        add_header Cache-Control "public, max-age=15552000, immutable";
        access_log off;
    }

    location ~ ^/(?!index\.php/).*(?:png|html|ttf|ico|jpg|jpeg|webp|avif)$ {
        try_files $uri /index.php$request_uri;
        expires 6M;
        add_header Cache-Control "public, max-age=15552000, immutable";
        access_log off;
    }

    # Force app directories through front controller but allow direct asset hits
    location ~ ^/apps/(?!.*/api/)(?!.*\.[^/]+$).*/?$ {
        rewrite ^(.*)$ /index.php$1 last;
    }

    location = /robots.txt  { allow all; log_not_found off; access_log off; }
    location = /favicon.ico { log_not_found off; access_log off; }
    location ^~ /public.php { try_files $uri $uri/ /index.php$request_uri; }

    location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)(?:$|/) { return 404; }
    location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) { return 404; }

    location ~ \.php(?:$|/) {
        fastcgi_split_path_info ^(.+?\.php)(/.*)$;
        try_files $fastcgi_script_name =404;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param PATH_INFO       $fastcgi_path_info;
        fastcgi_param modHeadersAvailable true;
        fastcgi_param front_controller_active true;
        fastcgi_pass unix:/run/php/php8.3-fpm.sock;
        fastcgi_intercept_errors on;
        fastcgi_request_buffering off;
    }

    location ~ \.php$ { return 404; }

    access_log /var/log/nginx/nextcloud_access.log;
    error_log  /var/log/nginx/nextcloud_error.log warn;
}

Configuration

Nextcloud

The output of occ config:list system or similar is best, but, if not possible, the contents of your config.php file from /path/to/nextcloud is fine (make sure to remove any identifiable information!):

<?php
$CONFIG = array (
  'passwordsalt' => '<redacted>',
  'secret' => '/<redacted>',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => 'docs.test-collab-site.com',
  ),
  'datadirectory' => '/srv/nextcloud-data',
  'dbtype' => 'mysql',
  'version' => '31.0.9.1',
  'overwrite.cli.url' => 'https://docs.test-collab-site.com',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'ncuser',
  'dbpassword' => '<redacted>',
  'installed' => true,
  'instanceid' => 'oc22olsc14fr',
  'default_phone_region' => 'US',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '/run/redis/redis-server.sock',
    'port' => 0,
    'timeout' => 0.0,
  ),
  'maintenance_window_start' => 2,
  'maintenance' => false,
  'overwriteprotocol' => 'https',
  'appstoreenabled' => 'true',
  'appstoreurl' => 'https://apps.nextcloud.com/api/v1',
);
```
{
    "system": {
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "docs.test-collab-site.com"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "31.0.9.1",
        "overwrite.cli.url": "https:\/\/docs.test-collab-site.com",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "default_phone_region": "US",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 0
        },
        "maintenance_window_start": 2,
        "maintenance": false,
        "overwriteprotocol": "https",
        "appstoreenabled": "true",
        "appstoreurl": "https:\/\/apps.nextcloud.com\/api\/v1"
    }
}

Apps

The output of occ app:list (if possible).

Tips for increasing the likelihood of a response

  • Use the preformatted text formatting option in the editor for all log entries and configuration output.
  • If screenshots are useful, feel free to include them.
    • If possible, also include key error output in text form so it can be searched for.
  • Try to edit log output only minimally (if at all) so that it can be ran through analyzers / formatters by those trying to help you.