nextcloud / mail

💌 Mail app for Nextcloud
https://apps.nextcloud.com/apps/mail
GNU Affero General Public License v3.0
830 stars 257 forks source link

Class "IPLib\Factory" not found in file '/var/www/html/apps/mail/lib/Net/IpAddressClassifier.php' line 53 #7816

Closed Alt791350 closed 1 year ago

Alt791350 commented 1 year ago

Steps to reproduce

  1. Install Mail 1.15.0 through the built-in app store on Nextcloud 24.0.8
  2. Try to setup a mail account (I'm using a paid mailfence account)
  3. Get an error: There was an error while setting up your account
  4. Check the logs to see Class "IPLib\Factory" not found in file '/var/www/html/apps/mail/lib/Net/IpAddressClassifier.php' line 53

Expected behavior

After filling in the form to setup an mail account on Nextcloud it should connect to the mail server to try and authenticate.

Actual behavior

It throws an error that points towards a missing class/library.

Mail app version

1.15.0

Mailserver or service

Mailfence

Operating system

Ubuntu 20, Docker Image: nextcloud:24.0.2-apache

PHP engine version

PHP 8.0

Web server

Apache (supported)

Database

MySQL

Additional info

I've checked the mail app path for signs of IPLib but it doesn't seems to be installed.

Alt791350 commented 1 year ago

Update: Issue is with any email server details I fill in.

ChristophWurst commented 1 year ago

The class should be shipped with Nextcloud.

Alt791350 commented 1 year ago

I'll look into that and keep you updated, thanks!

Alt791350 commented 1 year ago

Upgrading to the new 25.0.2 seems to have fixed it. I did move my server this week so maybe something got lost or I never installed correctly. Working now thanks for your tip!

ChristophWurst commented 1 year ago

Reported at https://help.nextcloud.com/t/mail-there-was-an-error-while-setting-up-your-account/153861/5 as well

ChristophWurst commented 1 year ago

This is only a problem with Nextcloud 24.0.7 and older. 24.0.8 comes with the class.

https://github.com/nextcloud/server/tree/v24.0.8 -> https://github.com/nextcloud/3rdparty/tree/ffeb7436c50cea31bd589047d02242e8dfab659b -> https://github.com/nextcloud/3rdparty/tree/ffeb7436c50cea31bd589047d02242e8dfab659b/mlocati/ip-lib the lib is there

This is why our tests didn't catch the error. we test against the latest releases.

https://github.com/nextcloud/3rdparty/pull/1221 is what added the lib to server's 3rdparty repo.