Talk-app not working, 401 error

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 30.0.6
  • Operating system and version (e.g., Ubuntu 24.04):
    • Ubuntu 20.04
  • Web server and version (e.g, Apache 2.4.25):
    • Apache 2.4.63
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • Apache
  • PHP version (e.g, 8.3):
    • 8.2.27
  • Is this the first time you’ve seen this error? (Yes / No):
    • yes
  • When did this problem seem to first start?
    • not sure, only noticed now
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • Apt (long time ago upgraded several times
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • no, local install, behind NAT and firewall

Summary of the issue you are facing:

For this server I hadn’t used the talk-app before. Testing it just now I see 401 error is thrown in the app and no chat history is shown, starting a new conversation is also not possible. The app does still have my account.

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

  1. Open app
  2. Select account for this server
  3. Look at empty screen

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.

None appear when trying to connect with the nextcloud-talk app.

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.

n/a

Web server / Reverse Proxy

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

82.132.235.5 - - [18/Feb/2025:22:32:30 +0000] "GET /ocs/v2.php/apps/spreed/api/v1/federation/invitation HTTP/1.1" 401 5256 "-" "Mozilla/5.0 (Android) Nextcloud-Talk v20.1.1"
82.132.235.5 - - [18/Feb/2025:22:32:30 +0000] "GET /ocs/v2.php/apps/spreed/api/v4/room?includeStatus=false HTTP/1.1" 401 5244 "-" "Mozilla/5.0 (Android) Nextcloud-Talk v20.1.1"
82.132.235.5 - - [18/Feb/2025:22:32:30 +0000] "POST /ocs/v2.php/apps/notifications/api/v2/push?devicePublicKey=-----BEGIN%20PUBLIC%20KEY-----******-----END%20PUBLIC%20KEY-----&proxyServer=https%3A%2F%2Fpush-notifications.nextcloud.com&format=json&pushTokenHash=******** HTTP/1.1" 401 5250 "-" "Mozilla/5.0 (Android) Nextcloud-Talk v20.1.1"
82.132.235.5 - - [18/Feb/2025:22:32:31 +0000] "GET /ocs/v2.php/cloud/capabilities HTTP/1.1" 200 3186 "-" "Mozilla/5.0 (Android) Nextcloud-Talk v20.1.1"
82.132.235.5 - - [18/Feb/2025:22:32:31 +0000] "GET /ocs/v2.php/cloud/capabilities HTTP/1.1" 200 3188 "-" "Mozilla/5.0 (Android) Nextcloud-Talk v20.1.1"
82.132.235.5 - - [18/Feb/2025:22:32:32 +0000] "GET /ocs/v2.php/apps/spreed/api/v3/signaling/settings HTTP/1.1" 200 1432 "-" "Mozilla/5.0 (Android) Nextcloud-Talk v20.1.1"
82.132.235.5 - - [18/Feb/2025:22:32:35 +0000] "GET /ocs/v2.php/apps/spreed/api/v1/federation/invitation HTTP/1.1" 401 1478 "-" "Mozilla/5.0 (Android) Nextcloud-Talk v20.1.1"
82.132.235.5 - - [18/Feb/2025:22:32:36 +0000] "GET /ocs/v2.php/apps/spreed/api/v1/federation/invitation HTTP/1.1" 401 1486 "-" "Mozilla/5.0 (Android) Nextcloud-Talk v20.1.1"
82.132.235.5 - - [18/Feb/2025:22:32:37 +0000] "GET /ocs/v2.php/apps/spreed/api/v4/room?includeStatus=false HTTP/1.1" 401 2063 "-" "Mozilla/5.0 (Android) Nextcloud-Talk v20.1.1"
82.132.235.5 - - [18/Feb/2025:22:32:40 +0000] "GET /ocs/v2.php/core/autocomplete/get?shareTypes%5B%5D=0&format=json&limit=50&itemId=new&search=&itemType=call&shareTypes%5B%5D=%5B0%5D HTTP/1.1" 401 922 "-" "Mozilla/5.0 (Android) Nextcloud-Talk v20.1.1"

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!):

Likely Apache config issue?

Apache vhost config

<IfModule mod_ssl.c>
<VirtualHost *:443>
    DocumentRoot /var/www/nextcloud
    Protocols h2 h2c http/1.1
    ServerName team.bethanycc.uk

    #Alias /nextcloud "/var/www/nextcloud/"

    <Directory /var/www/nextcloud>
        Options FollowSymlinks MultiViews
        AllowOverride All
        Require all granted
        <IfModule mod_dav.c>
            Dav off
        </IfModule>
        SetEnv HOME /var/www/nextcloud
        SetEnv HTTP_HOME /var/www/nextcloud
    </Directory>

    <FilesMatch \.php$>
        # 2.4.10+ can proxy to unix socket
        SetHandler "proxy:unix:/var/run/php/php8.2-fpm.sock|fcgi://localhost"
    </FilesMatch>

    ErrorLog ${APACHE_LOG_DIR}/bcc-nc_error.log
    CustomLog ${APACHE_LOG_DIR}/bcc-nc_access.log combined

    SSLCertificateFile /etc/letsencrypt/live/team.bethanycc.uk/fullchain.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/team.bethanycc.uk/privkey.pem
    Include /etc/letsencrypt/options-ssl-apache.conf

    <IfModule mod_headers.c>
        Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"
    </IfModule>

    Timeout 3600
    ProxyTimeout 3600
</VirtualHost>
</IfModule>

Apps

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

Hey, which „app“?

Missed the user agent:
Mozilla/5.0 (Android) Nextcloud-Talk v20.1.1

This sounds like the token is not valid anymore, what happens if you remove and add the account again?

Now, why did I not think of this…! Thank you, problem solved.

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.