Could not post message: Request failed with status code 500

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

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:

Some useful links to gather information about your Nextcloud Talk installation:
Information about Signaling server: /index.php/index.php/settings/admin/talk#signaling_server
Information about TURN server: /index.php/settings/admin/talk#turn_server
Information about STUN server: /index.php/settings/admin/talk#stun_server

Nextcloud version (eg, 24.0.1): 33.0.4
Talk Server version (eg, 14.0.2): 23.0.5
Custom Signaling server configured: no
Custom TURN server configured: yes
Custom STUN server configured: yes

In case the web version of Nextcloud Talk is involved:
Operating system (eg, Windows/Ubuntu/…): Ubuntu 24.04.4 LTS
Browser name and version (eg, Chrome v101): Firefox latest

The issue you are facing:

When I sent any messages from talk i got the error:
Could not post message: Request failed with status code 500

My messages were still sent but no push notifications were working. This was right afetr a 33.0.4 update.

I ended up modifying :

sudo vim /var/www/nextcloud/apps/notifications/lib/Push.php

$appConfig = $this->appConfig;
                $paddingSetting = ($appConfig !== null) ? $appConfig->getAppValueString('push_encryption_padding', 'PKCS1') : 'PKCS1';
                $padding = $paddingSetting === 'OAEP' ? OPENSSL_PKCS1_OAEP_PADDING : OPENSSL_PKCS1_PADDING;
                // $padding = $this->appConfig->getAppValueString('push_encryption_padding', 'PKCS1') === 'OAEP' ? OPENSSL_PKCS1_OAEP_PADDING : OPENSSL_PKCS1_PADDING;
                if (!openssl_public_encrypt(json_encode($data), $encryptedSubject, $device['devicepublickey'], $padding)) {

And restarted php-fpm and I am good.

This is just a heads up for anyone with this issue. I am not sure I am putting the issue in the right place.

Happy Friday.

Thanks for the report, we are aware, fix in [stable33] fix: Add missing DI for IAppConfig to Push.php by SystemKeeper · Pull Request #3039 · nextcloud/notifications · GitHub.