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

unable to load some mails: "not found" #4127

Closed
Benance opened this issue Nov 26, 2020 · 15 comments
Closed

unable to load some mails: "not found" #4127

Benance opened this issue Nov 26, 2020 · 15 comments

Comments

@Benance
Copy link

Benance commented Nov 26, 2020

Expected behavior

when I click on the mail, it should open

Actual behavior

When I click on the mail, I have an error "not found" "unable to load message"

Mail app

Mail app version: 1.4.1

Mailserver or service: Postfix + Dovecot

Server configuration

Operating system: Raspbian 10

Web server: Nginx

Database: MariaDB

PHP version: 7.3

Nextcloud Version: 19.0.3

Client configuration

Browser: Firefox 78.5 ESR

Operating system: Windows 10 1909

When I want to open some mails, I have an error "not found". Note that it happens only with certain mails (not all, fortunately). I can open these problematic mails without problem from thunderbird on another pc or from fairemail on my phone.
I have attached the logfile from the nextcloud admin panel. Thanks for your help.
log nextcloud mail.txt

@ChristophWurst
Copy link
Member

Log indicates a possible problem on an IMAP level. Please provide us with the horde logs for that specific request.

The Nextcloud mail app offers an extensive logging system to make it easier identifying and tracking down bugs. Please enable debug mode and set the log level to debug in your admin settings. Then, try to reproduce your issue and take another look at data/horde_imap.log.

@Benance
Copy link
Author

Benance commented Nov 26, 2020

Sorry but I haven't got any "debug" line in my config.php file... Just a "loglevel" line...

@no-response no-response bot removed the needs info label Nov 26, 2020
@ChristophWurst
Copy link
Member

Add it ;)

@Benance
Copy link
Author

Benance commented Nov 26, 2020

all right. I've added the line
Here is the horde_imap.log file
horde_imap.log
I can't see what's wrong on this log...

@ChristophWurst
Copy link
Member

There actually is. UID 15955 of INBOX is causing the issue, and this is the IMAP communication that confirms the message can't be fetched

C: 4 UID FETCH 15955 (BODY.PEEK[1.1.1] BINARY.SIZE[1.1.1] BODY.PEEK[1.1.1.MIME])
S: * 107 FETCH (UID 15955 BODY[1.1.1] {2457}
S: [LITERAL DATA: 2457 bytes]
S: )
S: 4 NO [PARSE] Invalid data in MIME part (0.114 + 0.000 + 0.113 secs).
>> Command 4 took 0.116 seconds.

@ChristophWurst
Copy link
Member

If I understand this correctly then that message can't be parsed by the server.

@Benance
Copy link
Author

Benance commented Nov 26, 2020

ok but I can open this mail on my phone and from a mail client...
I have forgetten to mention that this mail contains a pdf attachment.
Thanks for the diag.

@ChristophWurst
Copy link
Member

I think it's the way we look into the body of the message. Possibly relevant ticket of another email client is roundcube/roundcubemail#6383.

I don't have the time to look into this right now as it seems to be a rather specific issue. We should fix it, but there is more important work for me right now. If you are a developer please let us know and we can tell you how to debug this further.

@ChristophWurst
Copy link
Member

If the email that can't be parsed doesn't contain any sensitive information you may try to export it with another email client, share it here and others can the import and try to reproduce with their email servers. Without access to an account that allows reproduction it's really hard to fix such problems.

@Benance
Copy link
Author

Benance commented Nov 26, 2020

the mail contains a link to a google form about scolar rhythms in my childrens' school... I prefer not to share it.

@ChristophWurst
Copy link
Member

Sure, no worries.

@stale
Copy link

stale bot commented Jul 13, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jul 13, 2021
@stale stale bot closed this as completed Jan 9, 2022
@Aveyron-RetD
Copy link

Aveyron-RetD commented Jan 10, 2024

i am on 28 and this issue seems happening
Weird is i can see the message in the source code menu and can download the message
There is a lot of garbage in this mail.. if you want i can send it to you. I do not want to post it here on gitlab as it contains sensitive information

@alexhell
Copy link

having the same issue.
All other clients (even snappymail on NC) can show the text.
And even sometimes the mail app shows a "preview" but if you click on the email, it disappear.

@joopdo
Copy link

joopdo commented May 15, 2024

I'm having the same issue with one particular e-mail. (from my bank, so not sharing, I'll share full redacted source if I get it with a less important email)

"method":"GET","url":"/apps/mail/api/messages/100983/body","message":"mb_convert_encoding(): Argument #3 ($from_encoding) contains invalid encoding \"text/plain\" in file '/var/www/owncloud/apps/mail/lib/IMAP/ImapMessageFetcher.php' line 477","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:126.0) Gecko/20100101 Firefox/126.0","version":"28.0.4.1","exception":{"Exception":"Exception","Message":"mb_convert_encoding(): Argument #3 ($from_encoding) contains invalid encoding \"text/plain\" in file '/var/www/owncloud/apps/mail/lib/IMAP/ImapMessageFetcher.php' line 477","Code":0,"Trace":[{"file":"/var/www/owncloud/lib/private/AppFramework/App.php","line":184,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Mail\\Controller\\MessagesController"],"getBody"]},{"file":"/var/www/owncloud/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Mail\\Controller\\MessagesController","getBody",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["100983","mail.messages.getBody"]]},{"file":"/var/www/owncloud/lib/base.php","line":1069,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/mail/api/messages/100983/body"]},{"file":"/var/www/owncloud/index.php","line":39,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/owncloud/lib/private/AppFramework/Http/Dispatcher.php","Line":169,"Previous":{"Exception":"ValueError","Message":"mb_convert_encoding(): Argument #3 ($from_encoding) contains invalid encoding \"text/plain\"","Code":0,"Trace":[{"file":"/var/www/owncloud/apps/mail/lib/IMAP/ImapMessageFetcher.php","line":477,"function":"mb_convert_encoding","args":

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

No branches or pull requests

5 participants