SOGo | BTS

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004659SOGoGUIpublic2019-01-27 07:502019-02-14 14:18
Reporterwally 
Assigned Toludovic 
PriorityurgentSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformServer (x86_64)OSLinuxOS VersionDebian 10 Buster
Product Version4.0.5 
Target VersionFixed in Version4.0.6 
Summary0004659: Cannot view emails in the GUI (server side exception is thrown)
DescriptionUsing the latest testing 4.0.5 packages from the official Debian repository against a Debian old-stable Dovecot IMAP server, the following exception is thrown in the SOGo server logs:


Jan 24 22:41:11 sogod [2864]: <0x0x560efac4c220[NGImap4Client]> TLS started successfully.
Jan 24 22:41:11 sogod [2864]: 10.0.90.34, 10.0.20.10, 10.0.20.11 "GET /SOGo/so/matthewhall/Mail/0/folderINBOX/64252/viewsource HTTP/1.1" 200 1584/0 0.549 4041 60% 0

(request for "viewsource" work and returns the source... but...)


Jan 24 22:41:11 sogod [2864]: <0x0x560efac4cae0[NGImap4Client]> TLS started successfully.
2019-01-24 22:41:12.503 sogod[2864:2864] EXCEPTION: <NSException: 0x560efb64a450> NAME:NSInvalidArgumentException REASON:[NSString+stringWithString:]: NULL string INFO:(null)
Jan 24 22:41:12 sogod [2864]: 10.0.90.34, 10.0.20.10, 10.0.20.11 "GET /SOGo/so/matthewhall/Mail/0/folderINBOX/64252/view HTTP/1.1" 501 0/0 0.550 - - 0

(all requests for "/view" fail)


Happens for all emails, for all accounts, etc. Worked on version 3.2.6 (Debian stable).

IMAP debug shows no issues, and I *can* download the email source and .eml via SOGo - which seems to demonstrate the IMAP connectivity is working properly.
Steps To ReproduceInstall 4.0.5 (I've tried a fresh install with a fresh database) and connect to a Dovecot IMAP server from Debian oldstable.

Login and attempt to view an email in the GUI.
TagsNo tags attached.
Attached Filestxt file icon sogocrash.txt [^] (3,741 bytes) 2019-01-28 06:16 [Show Content]
txt file icon backtrace-sogod-tom.sawyer.txt [^] (4,267 bytes) 2019-01-30 16:01 [Show Content]
txt file icon backtrace-sogod-tom.sawyer-with-sope-dbg.txt [^] (4,266 bytes) 2019-01-30 17:00 [Show Content]
eml file icon 64379.eml [^] (4,052 bytes) 2019-01-31 15:10
eml file icon 64395.eml [^] (1,870 bytes) 2019-01-31 15:10
zip file icon email-reproduce-examples.zip [^] (3,598 bytes) 2019-01-31 15:13
txt file icon reproducable-deb-packages.txt [^] (132,063 bytes) 2019-01-31 15:28 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
has duplicate 0004673closedludovic NAME:NSInvalidArgumentException when trying to view a message after update from 4.0.0 

-  Notes
(0013284)
wally (reporter)
2019-01-27 07:51

Can provide a GDB dump or whatever if required - if someone can give me the commands to run!
Have successfully reproduced on a completely fresh Debian Buster VirtualBox test VM.
User avatar (0013285)
ludovic (administrator)
2019-01-27 08:02

Produce a stack trace:

https://sogo.nu/support/faq/how-do-i-debug-sogo.html [^]
(0013286)
wally (reporter)
2019-01-27 13:14

I'm afraid I can't find the dbg packages in the Debian repos, and I think that's blocking gdb from understanding the breakpoint instruction?

(gdb) b [NSException raise]
Function "[NSException raise]" not defined.

(It doesn't break when the exception raises either.)

Is there an alternative set of instructions I can use (or some dpkgs I can grab from elsewhere for the debug info), or can I capture the backtrace without them?

It looks like another user has also had the issue in 4.0.5 separately on the users@ mailing list too (FYI).
(0013287)
chetwisniewski (reporter)
2019-01-28 00:17

I have the same issue related to these two mailing list posts:

https://lists.inverse.ca/sogo/arc/users/2019-01/msg00099.html [^]
https://lists.inverse.ca/sogo/arc/users/2019-01/msg00100.html [^]
User avatar (0013289)
Christian Mack (developer)
2019-01-28 05:16

In Debian testing/buster you have to add the debug repo http://debug.mirrors.debian.org/debian-debug/ [^] to your sources list in order to get debug packages.
See
https://wiki.debian.org/DebugPackage [^]
(0013290)
wally (reporter)
2019-01-28 06:16

Thank-you - sorry feeling a bit stupid - I did google and didn't find that information myself!

FYI for anyone on Debian Buster - the following (slightly different) instructions for SOGo debugging worked a charm (provided, as per Christian M - you have the Debian debug mirror setup):

`
sudo apt-get install sogo-dbgsym libgnustep-base*-dbgsym sogo-dbgsym
sudo su -s /bin/bash - sogo
gdb --args /usr/sbin/sogod -WOUseWatchDog NO -WONoDetach YES -WOPort 20000 -WOWorkersCount 1 -WOLogFile - -WOPidFile /tmp/sogo.pid
`
 
I've attached the backtrace to this ticket (uploaded file).
(0013291)
tom.sawyer (reporter)
2019-01-30 16:01

Exactly identical problem on Archlinux:
- "Request Failed" Notification when trying to open Email Body in SOGo Webfrontend, although complete list of emails including subject is shown.
 
- Retrieving Mail Body with SOGo ActiveSync and Android Client works perfectly, seems only to be a problem with SOGo Webfrontend.

Daemon log output:
------------------
sogod[7500:7500] EXCEPTION: <NSException: 0x555555ed94a0> NAME:NSInvalidArgumentException REASON:[NSString+stringWithString:]: NULL string INFO:(null)


- My Environment
---------------
Arch Linux
- SOGo 4.0.5 ( problem also existent on 4.0.4 )
- mariadb 10.3.12
- dovecot 2.3.4
- postfix 3.3.2
- samba 4.9.4
- followed exactly this guide for configuring SOGo with Samba/LDAP:
  https://wiki.archlinux.org/index.php/SOGo [^]

Also created a GDB backtrace ( see attachment ), seems to be quite identical to the one provided by walle
User avatar (0013292)
ludovic (administrator)
2019-01-30 16:02

Install the SOPE debugging symbols before producing your stack trace.
(0013293)
tom.sawyer (reporter)
2019-01-30 17:00

@ludovic: attached a new backtrace with SOPE debug symbols installed, but trace is identical to my previous backtrace.
All call addresses were resolved already in previous trace, what additional information did you expect from SOPE debug symbols installed?
User avatar (0013294)
ludovic (administrator)
2019-01-31 08:29

Attach the EML version (zip it first) to this ticket that generates that exception. If it's a relatively private message, send it to me privately.
(0013296)
wally (reporter)
2019-01-31 15:10

All emails do it for me, I've attached two smaller examples (which both cause it).
(0013297)
wally (reporter)
2019-01-31 15:13

Sorry - noticed MacOS extracted the .zip :-(
Re-attached with both in a zip.
User avatar (0013298)
ludovic (administrator)
2019-01-31 15:16

Both emails display well here.

Have you compiled SOGo / SOPE yourself?

If you have installed everything from packages, show us the FULL LIST of SOPE and SOGo packages.
(0013299)
wally (reporter)
2019-01-31 15:27

tom.sawyer is seeing the issue on Arch Linux, I can't comment on whether his install is from packages or not.

Mine is on Debian Buster, using official Debian repo packages - I've attached a .txt with a full dpkg -l output.
User avatar (0013300)
ludovic (administrator)
2019-01-31 15:29

Try our packages, especially the nightly builds for both SOGo and SOPE.
(0013301)
chetwisniewski (reporter)
2019-01-31 15:34

This is happening to me for all users and all emails. I am also on Arch Linux using the AUR packages supplied by DJ_L.

pacman -Qs sogo

local/sogo 4.0.5-1
    groupware server built around OpenGroupware.org (OGo) and the SOPE application server
local/sope 4.0.5-1
    application server used by SOGo
User avatar (0013302)
ludovic (administrator)
2019-01-31 15:36

@chetwisniewski - show a relevant stack trace too.
(0013309)
chetwisniewski (reporter)
2019-02-01 15:28

I can't seem to get the breakpoint set. I tried recompiling with --enable-debug but that doesn't seem to have helped:

gdb) r
Starting program: /usr/bin/sogod -WOUseWatchDog NO -WONoDetach YES -WOPort 20000 -WOWorkersCount 1 -WOLogFile - -WOPidFile /tmp/sogo.pid
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Feb 01 12:26:57 sogod [5676]: version 4.0.5 (build chetwisniewski@ivan 201902011224) -- starting
Feb 01 12:26:57 sogod [5676]: vmem size check enabled: shutting down app when vmem > 384 MB. Currently at 84 MB
Feb 01 12:26:57 sogod [5676]: <0x0x5555558c8a00[SOGoProductLoader]> SOGo products loaded from '/usr/lib/GNUstep/SOGo':
Feb 01 12:26:57 sogod [5676]: <0x0x5555558c8a00[SOGoProductLoader]> SchedulerUI.SOGo, MailerUI.SOGo, ActiveSync.SOGo, MainUI.SOGo, CommonUI.SOGo, ContactsUI.SOGo, PreferencesUI.SOGo, MailPartViewers.SOGo, Appointments.SOGo, AdministrationUI.SOGo, Mailer.SOGo, Contacts.SOGo
Feb 01 12:26:57 sogod [5676]: All products loaded - current memory usage at 104 MB
Feb 01 12:26:57 sogod [5676]: |SOGo| WOHttpAdaptor listening on address *:20000
^C
Program received signal SIGINT, Interrupt.
0x00007ffff71ef174 in poll () from /usr/lib/libc.so.6
(gdb) b [NSException raise]
Function "[NSException raise]" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
(0013310)
chetwisniewski (reporter)
2019-02-02 18:39

This error on Arch is because of the upgrade from gnustep-base from 1.25 to 1.26. I downgraded to gnustep-base-1.25.1-4 and it started working again.
(0013322)
wally (reporter)
2019-02-09 04:57

Debian Buster ships gnustep 1.26 as well. Maybe that’s the issue? I guess SOGo is currently completely incompatible with that library version.

I’ll have to wait for the bug fix to reach the Debian repo for my install.
(0013326)
HighFIVE (reporter)
2019-02-10 17:33

Bug confirmed, I also use buster and use gnustep-base 1.26.0-4. Unable to open/load emails when selected, but when opened from source complete email can be read.
(0013328)
bero (reporter)
2019-02-11 01:11

Same problem here on OpenMandriva Lx 4 (which also ships gnustep-base 1.26.0).
(0013334)
onursehitoglu (reporter)
2019-02-11 10:16

I figured out the problem. The shouldAskReceipt function in UIxMailView.m
sends a nil email parameter to NGMailAddressParser which calls
[NSString stringWithString] with this parameter. Prior versions of gnustep
tolerated this but not 1.26.

A quick fix is below:

diff -u -r b/SOGo-4.0.5/UI/MailerUI/UIxMailView.m a/SOGo-4.0.5/UI/MailerUI/UIxMailView.m
--- b/SOGo-4.0.5/UI/MailerUI/UIxMailView.m 2019-01-09 18:03:12.000000000 +0300
+++ a/SOGo-4.0.5/UI/MailerUI/UIxMailView.m 2019-02-11 15:25:44.870164041 +0300
@@ -716,14 +716,17 @@
             email = [mailHeaders objectForKey: @"return-receipt-to"];
         }
 
- // email here can be "foo@bar.com" or "Foo Bar <foo@bar.com>"
- // we must extract the actual email address
- mailAddress = [[NGMailAddressParser mailAddressParserWithString: email] parse];
       
- if ([mailAddress isKindOfClass: [NGMailAddress class]])
- email = [mailAddress address];
- else
- email = nil;
+ if (email)
+ {
+ // email here can be "foo@bar.com" or "Foo Bar <foo@bar.com>"
+ // we must extract the actual email address
+ mailAddress = [[NGMailAddressParser mailAddressParserWithString: email] parse];
+ if ([mailAddress isKindOfClass: [NGMailAddress class]])
+ email = [mailAddress address];
+ else
+ email = nil;
+ }
       
       if (email)
         {
User avatar (0013358)
ludovic (administrator)
2019-02-14 14:18

Fixed in SOPE instead:

https://github.com/inverse-inc/sope/commit/2ca5842d863fd9f25593c6b608f5a1954f79d345 [^]

- Issue History
Date Modified Username Field Change
2019-01-27 07:50 wally New Issue
2019-01-27 07:51 wally Note Added: 0013284
2019-01-27 08:02 ludovic Note Added: 0013285
2019-01-27 13:14 wally Note Added: 0013286
2019-01-28 00:17 chetwisniewski Note Added: 0013287
2019-01-28 05:16 Christian Mack Note Added: 0013289
2019-01-28 06:16 wally Note Added: 0013290
2019-01-28 06:16 wally File Added: sogocrash.txt
2019-01-30 16:01 tom.sawyer Note Added: 0013291
2019-01-30 16:01 tom.sawyer File Added: backtrace-sogod-tom.sawyer.txt
2019-01-30 16:02 ludovic Note Added: 0013292
2019-01-30 17:00 tom.sawyer File Added: backtrace-sogod-tom.sawyer-with-sope-dbg.txt
2019-01-30 17:00 tom.sawyer Note Added: 0013293
2019-01-31 08:29 ludovic Note Added: 0013294
2019-01-31 15:10 wally Note Added: 0013296
2019-01-31 15:10 wally File Added: 64379.eml
2019-01-31 15:10 wally File Added: 64395.eml
2019-01-31 15:13 wally Note Added: 0013297
2019-01-31 15:13 wally File Added: email-reproduce-examples.zip
2019-01-31 15:16 ludovic Note Added: 0013298
2019-01-31 15:27 wally Note Added: 0013299
2019-01-31 15:28 wally File Added: reproducable-deb-packages.txt
2019-01-31 15:29 ludovic Note Added: 0013300
2019-01-31 15:34 chetwisniewski Note Added: 0013301
2019-01-31 15:36 ludovic Note Added: 0013302
2019-02-01 15:28 chetwisniewski Note Added: 0013309
2019-02-02 18:39 chetwisniewski Note Added: 0013310
2019-02-09 04:57 wally Note Added: 0013322
2019-02-10 17:33 HighFIVE Note Added: 0013326
2019-02-11 01:11 bero Note Added: 0013328
2019-02-11 06:31 francis Relationship added has duplicate 0004673
2019-02-11 10:16 onursehitoglu Note Added: 0013334
2019-02-14 14:18 ludovic Note Added: 0013358
2019-02-14 14:18 ludovic Status new => closed
2019-02-14 14:18 ludovic Assigned To => ludovic
2019-02-14 14:18 ludovic Resolution open => fixed
2019-02-14 14:18 ludovic Fixed in Version => 4.0.6


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker