Giphy Integration does not work

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 AIO Server version (e.g., 29.x.x):
    • 12.2.1

Basically all containers are all up to date. After I installed Giphy integration and go to connected accounts in settings, I got the internal server error.

Here’s what’s in the log that is related

{"reqId":"A9UYILSs12HX1nTvASc8","level":3,"time":"2025-12-21T04:30:07+00:00","remoteAddr":"***SENSITIVE***","user":"***SENSITIVE***","app":"index","method":"GET","url":"/settings/admin/connected-accounts","message":"hash_hkdf(): Argument #2 ($key) cannot be empty in file '/var/www/html/lib/private/Security/Crypto.php' line 147","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36","version":"32.0.2.2","exception":{"Exception":"Exception","Message":"hash_hkdf(): Argument #2 ($key) cannot be empty in file '/var/www/html/lib/private/Security/Crypto.php' line 147","Code":0,"Trace":[{"file":"/var/www/html/lib/private/AppFramework/App.php","line":153,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Settings\\Controller\\AdminSettingsController"},"index"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":321,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Settings\\Controller\\AdminSettingsController","index",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"settings.adminsettings.index","section":"connected-accounts"}]},{"file":"/var/www/html/lib/base.php","line":1061,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/settings/admin/connected-accounts"]},{"file":"/var/www/html/index.php","line":25,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","Line":150,"Previous":{"Exception":"ValueError","Message":"hash_hkdf(): Argument #2 ($key) cannot be empty","Code":0,"Trace":[{"file":"/var/www/html/lib/private/Security/Crypto.php","line":147,"function":"hash_hkdf","args":["sha512",{"__class__":"SensitiveParameterValue"}]},{"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/html/custom_apps/integration_giphy/lib/Settings/Admin.php","line":31,"function":"decrypt","class":"OC\\Security\\Crypto","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/settings/lib/Controller/CommonSettingsTrait.php","line":129,"function":"getForm","class":"OCA\\Giphy\\Settings\\Admin","type":"->","args":[]},{"file":"/var/www/html/apps/settings/lib/Controller/CommonSettingsTrait.php","line":179,"function":"formatSettings","class":"OCA\\Settings\\Controller\\AdminSettingsController","type":"->","args":[[{"__class__":"OCA\\Giphy\\Settings\\Admin"}],[]]},{"file":"/var/www/html/apps/settings/lib/Controller/AdminSettingsController.php","line":56,"function":"getIndexResponse","class":"OCA\\Settings\\Controller\\AdminSettingsController","type":"->","args":["admin","connected-accounts"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":204,"function":"index","class":"OCA\\Settings\\Controller\\AdminSettingsController","type":"->","args":["connected-accounts"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":118,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Settings\\Controller\\AdminSettingsController"},"index"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":153,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Settings\\Controller\\AdminSettingsController"},"index"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":321,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Settings\\Controller\\AdminSettingsController","index",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"settings.adminsettings.index","section":"connected-accounts"}]},{"file":"/var/www/html/lib/base.php","line":1061,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/settings/admin/connected-accounts"]},{"file":"/var/www/html/index.php","line":25,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/lib/private/Security/Crypto.php","Line":147},"message":"hash_hkdf(): Argument #2 ($key) cannot be empty in file '/var/www/html/lib/private/Security/Crypto.php' line 147","exception":{},"CustomMessage":"hash_hkdf(): Argument #2 ($key) cannot be empty in file '/var/www/html/lib/private/Security/Crypto.php' line 147"}}

Did you by chance have it previously installed and maybe with a different api_key?

From the looks of the code, that’s the main scenario I could see causing that. Well that or migrating to a new instance under some scenarios.

You can check the current config (and delete/modify it as desired) via the command line:

occ config:list integration_giphy

config related sub-commands for occ are covered in the Admin Manual.

AIO specifics for running occ are here.

Thanks! I did reinstalled NC AIO and restoring the database. I could clear out some encrypted contents in the database by using pgAdmin with SQL queries to clear all contents related to an app. For example external share. Is on oc_appconfig table.

I couldn’t find for Giphy.

The output

docker exec -u www-data nextcloud-aio-nextcloud php occ config:list integration_giphy
{
    "apps": {
        "integration_giphy": {
            "types": "",
            "api_key": "***SENSITIVE INFO REMOVED***",
            "installed_version": "2.2.0",
            "enabled": "yes"
        }
    }
}

Thanks! I did reinstalled NC AIO and restoring the database. I could clear out some encrypted contents in the database by using pgAdmin with SQL queries to clear all contents related to an app. For example external share. Is on oc_appconfig table.

I couldn’t find for Giphy.

The output

docker exec -u www-data nextcloud-aio-nextcloud php occ config:list integration_giphy
{
    "apps": {
        "integration_giphy": {
            "types": "",
            "api_key": "***SENSITIVE INFO REMOVED***",
            "installed_version": "2.2.0",
            "enabled": "yes"
        }
    }
}

Well, I did remove the app by clicking the box to remove data upon deletion/removal. It does not help.

Found out that this is the correct SQL query

DELETE
FROM public.oc_appconfig
WHERE appid = 'integration_giphy';

And now, I’m able to configure it