Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Nextcloud 26.0.2 email notification error #38957

Closed
5 of 8 tasks
cycu85 opened this issue Jun 23, 2023 · 8 comments · Fixed by #38958
Closed
5 of 8 tasks

[Bug]: Nextcloud 26.0.2 email notification error #38957

cycu85 opened this issue Jun 23, 2023 · 8 comments · Fixed by #38958
Labels

Comments

@cycu85
Copy link

cycu85 commented Jun 23, 2023

⚠️ This issue respects the following points: ⚠️

Bug description

hello

there is a bug in mail notification setting.

in log i have:

Exception: Symfony\Component\Mailer\Transport\Smtp\Stream\SocketStream::setTimeout(): Argument #1 ($timeout) must be of type float, string given, called in /var/www/nextcloud/lib/private/Mail/Mailer.php on line 305 in file '/var/www/nextcloud/3rdparty/symfony/mailer/Transport/Smtp/Stream/SocketStream.php' line 37

Steps to reproduce

in config.php i try change
"mail_smtptimeout" => '30', to "mail_smtptimeout" => 30,
but no efect.

so i delete "mail_smtptimeout" => '30' from config.php
still nothing.

chnge setting from web admin panel restore "mail_smtptimeout" => '30', to config.php

only delete "mail_smtptimeout" => '30', from config.php
and
change
/var/www/nextcloud/3rdparty/symfony/mailer/Transport/Smtp/Stream/SocketStream.php in line 47
from
return $this->timeout ?? (float) \ini_get('default_socket_timeout');
to:
return $this->timeout ?? (float) \ini_get(30);

help me to workaround problem

Expected behavior

can you fix it?

Installation method

None

Nextcloud Server version

26

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.1

Web server

Apache (supported)

Database engine version

PostgreSQL

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

No response

List of activated Apps

No response

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

No response

@cycu85 cycu85 added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Jun 23, 2023
@szaimen szaimen added 2. developing Work in progress 26-feedback and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Jun 23, 2023
@kesselb
Copy link
Contributor

kesselb commented Jun 23, 2023

If you run into the situation that a configuration value is “unchangeable”, a frequent explanation is another file in the configuration directory ending with .config.php (e.g. my.config.php).

@cycu85
Copy link
Author

cycu85 commented Jun 23, 2023

I understand, but in this case it is an incorrectly defined variable type or incorrectly fetched from the config.

a float is required and a string is fetched.

Argument #1 ($timeout) must be of type float, string given

@kesselb
Copy link
Contributor

kesselb commented Jun 23, 2023

Do you have another file, in your config directory, ending with .config.php?

I understand, but in this case it is an incorrectly defined variable type or incorrectly fetched from the config.

Our default is 10 (without quotes) which is, in php, a valid float.

"mail_smtptimeout" => '30',

string, wont work.

"mail_smtptimeout" => 30,

int, should work.

so i delete "mail_smtptimeout" => '30' from config.php
chnge setting from web admin panel restore "mail_smtptimeout" => '30', to config.php

  • You deleted the config option.
  • Pressed save in web client.
  • "mail_smtptimeout" => '30' reappeared

Correct?

If mail_smtptimeout => '30' reappears it's defined somewhere else.
Check your configuration directroy for another configuration file.

@cycu85
Copy link
Author

cycu85 commented Jun 23, 2023

I don't have another *.config.php file

there is only:
config.php
config.sample.php
.htaccess
mimetypealiases.json
mimetypemapping.json

You deleted the config option.
Pressed save in web client.
"mail_smtptimeout"  => '30' reappeared

Correct?`

Exactly

@kesselb
Copy link
Contributor

kesselb commented Jun 23, 2023

Then "mail_smtptimeout" => 30, will work.

@cycu85
Copy link
Author

cycu85 commented Jun 23, 2023

Unfortunately it does not work

@buzter
Copy link

buzter commented Jul 4, 2023

change /var/www/nextcloud/3rdparty/symfony/mailer/Transport/Smtp/Stream/SocketStream.php in line 47 from return $this->timeout ?? (float) \ini_get('default_socket_timeout'); to: return $this->timeout ?? (float) \ini_get(30);

help me to workaround problem

Same problem here on Synology DSM 7.2 with php8.1 and Apache2.4. Many Thanks for the tipp with the workaround - "solved" my problem for now. Best regards

@daveatpinellas
Copy link

Just documenting, RHEL 8 with PHP 8.0.27, this setting is a gotcha during upgrade. Prior to version 26, this setting allowed quotes, now that causes email to fail. I had to make the change documented in this ticket:

33c33
< 'mail_smtptimeout' => '60',

'mail_smtptimeout' => 60,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants