Scalable OGo (SOGo)

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004329SOGowith SOGopublic2017-11-01 05:502017-11-10 09:34
Reporterfsoyer 
Assigned Tofrancis 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
Platform[Server] LinuxOSRHEL/CentOSOS Version7
Product Version3.2.10 
Target VersionFixed in Version3.2.11 
Summary0004329: "ERROR(-[NSNull(misc) forwardInvocation:]): called selector stringByTrimmingSpaces on NSNull !" filling sogo.log
DescriptionHi,
I posted some times ago on the mailing list about this error filling my log, and, as I could see here and on the list in part of log posted, all sogo.log... I received no answer or suggest, and found nothing here or on list about a resolution.

This seems just a warning (despite the "ERROR" at the beginning...) but at about 5 to 15 messages / minute, the log grows, and it complicates really all searches and debug with it !!
I believed that it appears only at each web mail refresh :
2017-11-01 10:37:22.538 sogod[19538] ERROR(-[NSNull(misc) forwardInvocation:]): called selector stringByTrimmingSpaces on NSNull !
2017-11-01 10:37:22.538 sogod[19538] ERROR(-[NSNull(misc) forwardInvocation:]): called selector stringByTrimmingSpaces on NSNull !
2017-11-01 10:37:22.543 sogod[19538] ERROR(-[NSNull(misc) forwardInvocation:]): called selector stringByTrimmingSpaces on NSNull !
2017-11-01 10:37:22.543 sogod[19538] ERROR(-[NSNull(misc) forwardInvocation:]): called selector stringByTrimmingSpaces on NSNull !
Nov 01 10:37:22 sogod [19538]: 127.0.0.1 "POST /SOGo/so/xxxxxxxxxx/Mail/0/folderINBOX/view HTTP/1.1" 200 650/119 0.382 - - 0

But I see today that the messages are logged also when no web clients are connected (no "POST..." message), but also when activesync ping :

2017-11-01 10:33:17.358 sogod[27438] ERROR(-[NSNull(misc) forwardInvocation:]): called selector stringByTrimmingSpaces on NSNull !
2017-11-01 10:33:17.358 sogod[27438] ERROR(-[NSNull(misc) forwardInvocation:]): called selector stringByTrimmingSpaces on NSNull !
2017-11-01 10:33:17.358 sogod[27438] ERROR(-[NSNull(misc) forwardInvocation:]): called selector stringByTrimmingSpaces on NSNull !
2017-11-01 10:33:17.358 sogod[27438] ERROR(-[NSNull(misc) forwardInvocation:]): called selector stringByTrimmingSpaces on NSNull !
2017-11-01 10:33:17.358 sogod[27438] ERROR(-[NSNull(misc) forwardInvocation:]): called selector stringByTrimmingSpaces on NSNull !
Nov 01 10:33:17 sogod [27438]: <0x0x7f6bb15eef50[SOGoActiveSyncDispatcher]> Sleeping 10 seconds while detecting changes for user xxxxxxx in Ping...

But, NOT when the devices refresh themselves by activesync (messages "POST /SOGo/Microsoft-Server-ActiveSync?User=xxxxxx&DeviceId=XXXXXXXXXX&DeviceType=iPhone&Cmd=Ping HTTP/1.1" 200 13/0 10.582 - - -8K" generate no "stringByTrimmingSpaces..." error)

What is the reason of this message and what can be done to avoid it ?
Thank you.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0012406)
tfu (reporter)
2017-11-02 02:38

You can try to find a possible cause by enabling verbose logging:

SOGoDebugRequests = YES;
SOGoEASDebugEnabled = YES;
ImapDebugEnabled = YES;

LDAPDebugEnabled = YES;
or
MySQL4DebugEnabled = YES;
or
PGDebugEnabled = YES;

Check sogo.log for the first occurrence of "NSNull(misc) forwardInvocation:" after starting sogod with above parameters.
You say that the message is reported also for EAS-Ping-Requests … all requests or just for a specific user?
(0012407)
fsoyer (reporter)
2017-11-02 05:00

Well : I can't for now restart sogo on prod server, but I activate debug on a test server.
The error seems always linked to this mysql query, when we refresh the UI (= imap fetch) :
2017-11-02 09:45:09.635 sogod[29521] <MySQL4Channel[0x0x560c39ef83f0] connection=0x0x560c3a080d68> SQL: SELECT * FROM sogo_users_domainfr WHERE (c_uid = 'myuser') OR (mail = 'myuser') OR (mail1 = 'myuser') OR (mail2 = 'myuser') OR (mail3 = 'myuser') OR (mail4 = 'myuser') OR (mail5 = 'myuser');
2017-11-02 09:45:09.637 sogod[29521] <MySQL4Channel[0x0x560c39ef83f0] connection=0x0x560c3a080d68> query has results, entering fetch-mode.
2017-11-02 09:45:09.637 sogod[29521] ERROR(-[NSNull(misc) forwardInvocation:]): called selector stringByTrimmingSpaces on NSNull !
2017-11-02 09:45:09.637 sogod[29521] ERROR(-[NSNull(misc) forwardInvocation:]): called selector stringByTrimmingSpaces on NSNull !

which result is:
| c_uid | c_name | c_password | c_cn | mail | mail1 | mail2 | mail3 | mail4 | mail5 | domain |
+--------+------------------+------------------------------------+--------+------------------+----------------+-------------------+----------------+-------+-------+-----------+
| myuser | myuser@domain.fr | $1$oeytwCCw$3qjtf7GPCNRgM6gEt5Yv6/ | myuser | myuser@domain.fr | myuser1@domain.fr | myuser2@domain.fr | myuser3@domain.fr | NULL | NULL | domain.fr |

the "NULL" results are mail4 and mail5 (the user as only 3 aliases), I guess this is the problem : here the ERROR appears 2 times, when on the prod server, the users have no aliases, and it appears 5 times. I suppose you must test the field before pass it to stringByTrimmingSpaces ?

Unfortunatly, I couldn't reproduce the problem with EAS. Connecting a device with activesync on the test server does not produce errors as on the prod server. To be confirmed later if the error is fixed for the imap fetch.
User avatar (0012420)
francis (administrator)
2017-11-09 18:19

Please try the latest nightly build and let me know if it solves the issue.
(0012421)
fsoyer (reporter)
2017-11-10 08:54

Hi,
as I want to only install builds via rpm to keep a compatibility between test server and prod server, can you confirm that I can just apply manually the modifications in this two files to test it, or not ?

And can you tell us when the version 3.2.11 will be available in the repos ?
thank you
User avatar (0012422)
francis (administrator)
2017-11-10 08:57

You can install the latest nightly RPM builds.

See https://sogo.nu/download.html#helper [^]
(0012423)
fsoyer (reporter)
2017-11-10 09:04

Oh sorry, I forgot to make a difference between "last version" and "last nightly build" :) so I was waiting for 3.2.11.
OK I test it.
(0012424)
fsoyer (reporter)
2017-11-10 09:30

Well, it seems good ! I continue to check the log for some days.

Just, the log being more clear now, I noticed a message "parseTimeZone: cannot parse time notation 'GMT'", I think that it is not in relation with this last built but since last update (3.2.9 -> 3.2.10) but had not seen it before (message hidden into all this stringByTrimmingSpaces...) May I open a new ticket, as I didn't found reference of this error in bug reports since v1.3.xx ? Or would you have a (quick) solution ?
User avatar (0012425)
francis (administrator)
2017-11-10 09:34

If you isolate the event that causes the error, than please open an ticket and attached the event source (vCalendar).

- Related Changesets
sogo: master 38d4a268
Timestamp: 2017-11-08 16:24:26
Author: francis
Details ] Diff ]
Avoid calls on null objects

Fixes 0004329
mod - SoObjects/Contacts/NGVCard+SOGo.m Diff ] File ]
mod - SoObjects/SOGo/SQLSource.m Diff ] File ]

- Issue History
Date Modified Username Field Change
2017-11-01 05:50 fsoyer New Issue
2017-11-02 02:38 tfu Note Added: 0012406
2017-11-02 05:00 fsoyer Note Added: 0012407
2017-11-08 21:41 francis Changeset attached => sogo master 38d4a268
2017-11-08 21:41 francis Assigned To => francis
2017-11-08 21:41 francis Resolution open => fixed
2017-11-09 18:19 francis Note Added: 0012420
2017-11-10 08:54 fsoyer Note Added: 0012421
2017-11-10 08:57 francis Note Added: 0012422
2017-11-10 09:04 fsoyer Note Added: 0012423
2017-11-10 09:30 fsoyer Note Added: 0012424
2017-11-10 09:34 francis Note Added: 0012425
2017-11-10 09:34 francis Status new => resolved
2017-11-10 09:34 francis Fixed in Version => 3.2.11


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker