Mastodon - Authenticated ciphertext could not be decoded

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 30.0.5
  • Operating system and version (e.g., Ubuntu 24.04):
    • LMDE 6 - docker
  • Web server and version (e.g, Apache 2.4.25):
    • -
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • -
  • PHP version (e.g, 8.3):
    • -
  • Is this the first time you’ve seen this error? (Yes / No):
    • Yes
  • When did this problem seem to first start?
    • after migration from host to docker
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • docker
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • No

Summary of the issue you are facing:

Error when accessing “Connected accounts” page

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

  1. Install Mastodon integration
  2. Administration settings → Connected accounts
  3. Internal Server Error

Log entries

{“reqId”:“xLYs4pf1X8quDTGxZxjv”,“level”:3,“time”:“2025-01-27T16:42:37+01:00”,“remoteAddr”:“45.155.186.78”,“user”:“whoever”,“app”:“index”,“method”:“GET”,“url”:“/index.phpuser/connected-accounts”,“message”:“Authenticated ciphertext could not be decoded.”,“userAgent”:“Mozilla/5.0 (X11; Linux x86_64; rv:134.0) Gecko/20100101 Firefox/134.0”,“version”:“30.0.5.1”,“exception”:{“Exception”:“Exception”,“Message”:“Authenticated ciphertext could not be decoded.”,“Code”:0,“Trace”:[{“file”:“/var/www/html/lib/private/Security/Crypto.php”,“line”:102,“function”:“decryptWithoutSecret”,“class”:“OC\Security\Crypto”,“type”:“->”,“args”:[“*** sensitive parameters replaced “]},{“file”:”/var/www/custom_apps/integration_mastodon/lib/Settings/Personal.php",“line”:27,“function”:“decrypt”,“class”:“OC\Security\Crypto”,“type”:“->”,“args”:[" sensitive parameters replaced ***”]},{“file”:“/var/www/html/apps/settings/lib/Controller/CommonSettingsTrait.php”,“line”:117,“function”:“getForm”,“class”:“OCA\Mastodon\Settings\Personal”,“type”:“->”,“args”:},{“file”:“/var/www/html/apps/settings/lib/Controller/PersonalSettingsController.php”,“line”:63,“function”:“formatSettings”,“class”:“OCA\Settings\Controller\PersonalSettingsController”,“type”:“->”,“args”:[{“10”:[{“class”:“OCA\Github\Settings\Personal”}],“15”:[{“class”:“OCA\Mastodon\Settings\Personal”}]}]},{“file”:“/var/www/html/apps/settings/lib/Controller/CommonSettingsTrait.php”,“line”:142,“function”:“getSettings”,“class”:“OCA\Settings\Controller\PersonalSettingsController”,“type”:“->”,“args”:[“connected-accounts”]},{“file”:“/var/www/html/apps/settings/lib/Controller/PersonalSettingsController.php”,“line”:54,“function”:“getIndexResponse”,“class”:“OCA\Settings\Controller\PersonalSettingsController”,“type”:“->”,“args”:[“personal”,“connected-accounts”]},{“file”:“/var/www/html/lib/private/AppFramework/Http/Dispatcher.php”,“line”:208,“function”:“index”,“class”:“OCA\Settings\Controller\PersonalSettingsController”,“type”:“->”,“args”:[“connected-accounts”]},{“file”:“/var/www/html/lib/private/AppFramework/Http/Dispatcher.php”,“line”:114,“function”:“executeController”,“class”:“OC\AppFramework\Http\Dispatcher”,“type”:“->”,“args”:[{“class”:“OCA\Settings\Controller\PersonalSettingsController”},“index”]},{“file”:“/var/www/html/lib/private/AppFramework/App.php”,“line”:161,“function”:“dispatch”,“class”:“OC\AppFramework\Http\Dispatcher”,“type”:“->”,“args”:[{“class”:“OCA\Settings\Controller\PersonalSettingsController”},“index”]},{“file”:“/var/www/html/lib/private/Route/Router.php”,“line”:302,“function”:“main”,“class”:“OC\AppFramework\App”,“type”:“::”,“args”:[“OCA\Settings\Controller\PersonalSettingsController”,“index”,{“class”:“OC\AppFramework\DependencyInjection\DIContainer”},{“section”:“connected-accounts”,“_route”:“settings.personalsettings.index”}]},{“file”:“/var/www/html/lib/base.php”,“line”:1003,“function”:“match”,“class”:“OC\Route\Router”,“type”:“->”,“args”:[“/settings/user/connected-accounts”]},{“file”:“/var/www/html/index.php”,“line”:24,“function”:“handleRequest”,“class”:“OC”,“type”:“::”,“args”:}],“File”:“/var/www/html/lib/private/Security/Crypto.php”,“Line”:114,“message”:“Authenticated ciphertext could not be decoded.”,“exception”:{},“CustomMessage”:“Authenticated ciphertext could not be decoded.”}}

Thank you for any help!
kr,
Martin

This can lead you to solve the issue.
Steps:

  1. add debug => true in config.php
  2. ./occ migrations:status <app_name>
  3. ./occ migrations:execute <app_name> <version>
  4. remove debug => true in config.php

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