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

Mail app cannot find users o Groups #2668

Closed
rollanders opened this issue Feb 20, 2020 · 13 comments
Closed

Mail app cannot find users o Groups #2668

rollanders opened this issue Feb 20, 2020 · 13 comments

Comments

@rollanders
Copy link

rollanders commented Feb 20, 2020

Expected behavior

When I start writing the name or group of recipient the app should propose the Group o user.

Actual behavior

The app does not propose a name o Group

I I write the name of the Group the message is not sent
I get an error in the log - see further down

Mail app

Mail app version: (see apps admin page, e.g. 0.5.3)
Mail 1.1.2
Mailserver or service: (e.g. Outlook, Yahoo, Gmail, Exchange,...)
IMAP SMTP

Server configuration

Operating system: (e.g. Debian 8)
Ubuntu 18.0.4
Web server: (e.g. Apache, Nginx,...)
Nginx
Database: (e.g. MariaDB, SQLite or PostgreSQL)
MariadB
PHP version: (e.g. 7.0)
7.3.11
Nextcloud Version: (see admin page, e.g. 13.0.2)
17.0.3

Client configuration

Browser: (e.g. Firefox 48)
Chrome
Operating system: (e.g. Arch Linux)
Windows 10


Error log

[mail] Error: OCA\Mail\Exception\ServiceException: Could not sync messages at <>

  1. /var/www/nextcloud/apps/mail/lib/Controller/FoldersController.php line 102
    OCA\Mail\Service\MailManager->syncMessages(OCA\Mail\Account {}, OCA\Mail\IMAP\Sync\Request {})
  2. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 170
    OCA\Mail\Controller\FoldersController->sync(6, "SU5CT1g=", "VTY0MyxWMTUxNzg0MzMwNCxIMTkxNw==", ["642","641","64 ... "])
  3. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 99
    OC\AppFramework\Http\Dispatcher->executeController(OCA\Mail\Controller\FoldersController {}, "sync")
  4. /var/www/nextcloud/lib/private/AppFramework/App.php line 126
    OC\AppFramework\Http\Dispatcher->dispatch(OCA\Mail\Controller\FoldersController {}, "sync")
  5. /var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php line 47
    OC\AppFramework\App::main("OCA\Mail\Cont ... r", "sync", OC\AppFramework\ ... {}, {accountId: "6", ... "})
  6. <>
    OC\AppFramework\Routing\RouteActionHandler->__invoke({accountId: "6", ... "})
  7. /var/www/nextcloud/lib/private/Route/Router.php line 297
    undefinedundefinedcall_user_func(OC\AppFramework\ ... {}, {accountId: "6", ... "})
  8. /var/www/nextcloud/lib/base.php line 997
    OC\Route\Router->match("/apps/mail/api/ ... c")
  9. /var/www/nextcloud/index.php line 42
    OC::handleRequest()

GET /apps/mail/api/accounts/6/folders/SU5CT1g%3D/sync?syncToken=VTY0MyxWMTUxNzg0MzMwNCxIMTkxNw%3D%3D&uids[]=642&uids[]=641&uids[]=640&uids[]=639&uids[]=638&uids[]=637&uids[]=636&uids[]=635&uids[]=634&uids[]=633&uids[]=632&uids[]=631&uids[]=630&uids[]=629&uids[]=628&uids[]=627&uids[]=626&uids[]=625&uids[]=624&uids[]=623
from at 2020-02-20T08:36:36+01:00


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@ChristophWurst
Copy link
Member

That error has nothing to do with the problem described. Anything else in the logs? Does the autocomplete reqeust show up in the network tab? Does it return any results?

@rollanders
Copy link
Author

rollanders commented Feb 21, 2020

I do not understand what is "the network tab"?
Autocomplete only works for individual adresses. But not for Groups - as it used to.
I created a Group "Test". Added one user to that group. Tried to send a mail to Test and also to Test(Group). Normally autocomplete should recognise and propose the group but it does not. And when I send a message to Test or to Test(Group) I get an error.

[mail] Error: OCA\Mail\Exception\ServiceException: Could not send message at <>

  1. /var/www/nextcloud/apps/mail/lib/Controller/AccountsController.php line 332
    OCA\Mail\Service\MailTransmission->sendMessage("NCadmin", OCA\Mail\Model\NewMessageData {}, null, null, 3095)
  2. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 170
    OCA\Mail\Controller\AccountsController->send(1, "Test", "Test", "Test(Group)", "", "", false, 3095, null, null, [], null)
  3. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 99
    OC\AppFramework\Http\Dispatcher->executeController(OCA\Mail\Controller\AccountsController {}, "send")
  4. /var/www/nextcloud/lib/private/AppFramework/App.php line 126
    OC\AppFramework\Http\Dispatcher->dispatch(OCA\Mail\Controller\AccountsController {}, "send")
  5. /var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php line 47
    OC\AppFramework\App::main("OCA\Mail\Cont ... r", "send", OC\AppFramework\ ... {}, {accountId: "1", ... "})
  6. <>
    OC\AppFramework\Routing\RouteActionHandler->__invoke({accountId: "1", ... "})
  7. /var/www/nextcloud/lib/private/Route/Router.php line 297
    undefinedundefinedcall_user_func(OC\AppFramework\ ... {}, {accountId: "1", ... "})
  8. /var/www/nextcloud/lib/base.php line 997
    OC\Route\Router->match("/apps/mail/api/accounts/1/send")
  9. /var/www/nextcloud/index.php line 42
    OC::handleRequest()

POST /apps/mail/api/accounts/1/send
from 94.254.30.246 by NCadmin at 2020-02-21T17:56:04+01:00

@no-response no-response bot removed the needs info label Feb 21, 2020
@doc75
Copy link
Contributor

doc75 commented Mar 15, 2020

This is a regression I saw on my side when migrating from 16.0.8 to 17.0.4.
It was working fine with NC16 and right after the upgrade it is not working anymore (I am sure as I am using a group to send mail just before upgrade starts and right after upgrade is done).

Indeed, the group are not shown anymore during the autocomplete.
I cannot also use Nextcloud user names anymore in the autocomplete.

Probably a regression between v0.17 (NC16 compatible) and current v1.1.3.

@ChristophWurst
Copy link
Member

Probably a regression between v0.17 (NC16 compatible) and current v1.1.3.

That or a change in logic for the code that provides the suggestions. Someone has to investigate. Are you familiar with xdebug?

@doc75
Copy link
Contributor

doc75 commented Mar 20, 2020

@ChristophWurst I have never used xdebug, but I am ready to try.
I installed it in the php-fpm container and added the line mentionned at the end of pecl install xdebug in a .conf file located in /usr/local/etc/php-fpm.d/` directory.

But after I do not know where to find the information from XDebug.
I'll try to learn how to use it to see if I can help on debugging this.

@ChristophWurst
Copy link
Member

The idea is to step through the code to inspect the values. So you'll need an IDE like VSCode, Netbeans or PhpStorm. Then configure the xdebug to send debugging requests to the IDEs port.

@rollanders
Copy link
Author

rollanders commented Mar 23, 2020

@ChristophWurst The autocomplete seems to works differently in Talk and för sharing things. Do you use different algorithms?

@ChristophWurst
Copy link
Member

Yes, it's different because we also use contacts data and similar.

@doc75
Copy link
Contributor

doc75 commented Mar 28, 2020

@ChristophWurst I finally succeeded in setting up Xdebug with Codium.

I can notice that the group integration seems to query only the Contact groups. It seems that no code is looking for the groups created by the admin in the page containing all the NC users.

I have no clue on how we can search for groups created by the admin in the user panel. Any idea on where I can find such information ?

I might be wrong as this is my first debug ever in PHP and XDebug, sorry if this is the case.

@ChristophWurst
Copy link
Member

Nextcloud groups should be resovled by \OCA\Mail\Service\Group\NextcloudGroupService. Was that class ever contacted?

@ChristophWurst
Copy link
Member

Found it!

@ChristophWurst
Copy link
Member

#2972

@ChristophWurst ChristophWurst self-assigned this Apr 23, 2020
@ChristophWurst ChristophWurst added this to SELECTED in Christoph's Tasks via automation Apr 23, 2020
@ChristophWurst ChristophWurst modified the milestones: 1.3.4, 1.4.0 Apr 23, 2020
@ChristophWurst ChristophWurst moved this from SELECTED to TO REVIEW (max 4 PRs) in Christoph's Tasks Apr 23, 2020
Christoph's Tasks automation moved this from TO REVIEW (max 4 PRs) to DONE May 5, 2020
@doc75
Copy link
Contributor

doc75 commented Sep 27, 2020

I just tested this on NC18 + Mail 1.4.1 and it is working fine again. I am not sure on which version it has been solved. Good news.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

No branches or pull requests

3 participants