View Issue Details

IDProjectCategoryView StatusLast Update
0005905SOGoBackend Calendarpublic2023-12-20 18:55
Reporterneil Assigned Toqhivert  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionno change required 
PlatformServerOSDebianOS Version12
Product Version5.9.0 
Summary0005905: NSDataMalloc(instance) does not recognize stringByTrimmingSpaces
Description

When I attempt to sync a calendar appointment, or run sogo-tool (e.g. sogo-tool checkup my_account), I get an error:

<0x0x556f05e09480[SOGoCache]> Using host(s) '127.0.0.1' as server(s)
2023-12-05 14:53:58.230 sogo-tool[20884:20884] Checking folders of user my_account
2023-12-05 14:53:58.237 sogo-tool[20884:20884] MySQL4 connection established 0x0x556f05e0d060
2023-12-05 14:53:58.238 sogo-tool[20884:20884] ---------- -[MySQL4Channel openChannel]: <MySQL4Channel[0x0x556f05e9c430] connection=0x0x556f05e0d060> opens channel count[0]
2023-12-05 14:53:58.238 sogo-tool[20884:20884] MySQL4 channel 0x0x556f05e9c430 opened (connection=0x0x556f05e0d060,sogo)
2023-12-05 14:53:58.238 sogo-tool[20884:20884] <MySQL4Channel[0x0x556f05e9c430] connection=0x0x556f05e0d060> SQL: SELECT c_path FROM sogo_folder_info WHERE c_path1 = 'Users' AND c_path2 = 'my_account';
2023-12-05 14:53:58.239 sogo-tool[20884:20884] <MySQL4Channel[0x0x556f05e9c430] connection=0x0x556f05e0d060>   query has results, entering fetch-mode.
2023-12-05 14:53:58.239 sogo-tool[20884:20884] <MySQL4Channel[0x0x556f05e9c430] connection=0x0x556f05e0d060> SQL: SELECT c_folder_id, c_path, c_location, c_quick_location, c_acl_location, c_folder_type FROM sogo_folder_info WHERE c_path1 = 'Users' AND c_path2 = 'my_account' AND c_path3 = 'Calendar' AND c_path4 = 'personal';
2023-12-05 14:53:58.240 sogo-tool[20884:20884] <MySQL4Channel[0x0x556f05e9c430] connection=0x0x556f05e0d060>   query has results, entering fetch-mode.
2023-12-05 14:53:58.240 sogo-tool[20884:20884] <MySQL4Channel[0x0x556f05e9c430] connection=0x0x556f05e0d060> SQL: SELECT c_name, c_content FROM sogo_store WHERE c_folder_id = 4 AND (c_deleted != 1 OR c_deleted IS NULL);
2023-12-05 14:53:58.245 sogo-tool[20884:20884] <MySQL4Channel[0x0x556f05e9c430] connection=0x0x556f05e0d060>   query has results, entering fetch-mode.
sogo-tool: Uncaught exception NSInvalidArgumentException, reason: NSDataMalloc(instance) does not recognize stringByTrimmingSpaces

(I looked at the debugging information; I found it a bit complicated to understand/follow, I'm afraid.)

Steps To Reproduce

Run sogo-tool or attempt to sync a calendar.

TagsNo tags attached.

Activities

qhivert

qhivert

2023-12-05 15:32

administrator   ~0017482

Hello,
What is the collation of c_content from sogo_store ?

neil

neil

2023-12-05 16:42

reporter   ~0017483

What is the collation of c_content from sogo_store ?

Does this give the information you need?

 sogo_store | CREATE TABLE `sogo_store` (
  `c_folder_id` int(11) NOT NULL,
  `c_name` varchar(255) NOT NULL,
  `c_content` mediumtext DEFAULT NULL,
  `c_creationdate` int(11) NOT NULL,
  `c_lastmodified` int(11) NOT NULL,
  `c_version` int(11) NOT NULL,
  `c_deleted` int(11) DEFAULT NULL,
  PRIMARY KEY (`c_folder_id`,`c_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC |
qhivert

qhivert

2023-12-05 17:09

administrator   ~0017484

Yes the problem is that the data are stored in binary utf8mb4_bin. Could you try to change it? Mine is utf8mb4_0900_ai_ci but I think it can be any utf8 format as long as this is not binary

neil

neil

2023-12-05 17:13

reporter   ~0017485

Ah; interesting.

I think I set that collation a while back, following Sebastian's advice here:

ALTER TABLE sogo_store MODIFY c_content MEDIUMTEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;

I will try setting it to:

ALTER TABLE sogo_store MODIFY c_content MEDIUMTEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci ;

Thank you!

neil

neil

2023-12-05 17:14

reporter   ~0017486

(Sorry: here, specifically.)

neil

neil

2023-12-05 17:52

reporter   ~0017487

Thank you.

I did not have utf8mb4_0900_ai_ci, so I used:

ALTER TABLE sogo_store MODIFY c_content MEDIUMTEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;

instead.

I also unsubscribed and resubscribed my calendars, and it is working again.

Thank you so much!

sebastien

sebastien

2023-12-05 19:00

administrator   ~0017488

Fix of previous message

Issue History

Date Modified Username Field Change
2023-12-05 15:03 neil New Issue
2023-12-05 15:32 qhivert Note Added: 0017482
2023-12-05 15:32 qhivert Assigned To => qhivert
2023-12-05 15:32 qhivert Status new => feedback
2023-12-05 16:42 neil Note Added: 0017483
2023-12-05 16:42 neil Status feedback => assigned
2023-12-05 17:09 qhivert Note Added: 0017484
2023-12-05 17:10 qhivert Status assigned => feedback
2023-12-05 17:13 neil Note Added: 0017485
2023-12-05 17:13 neil Status feedback => assigned
2023-12-05 17:14 neil Note Added: 0017486
2023-12-05 17:52 neil Note Added: 0017487
2023-12-05 19:00 sebastien Status assigned => resolved
2023-12-05 19:00 sebastien Resolution open => no change required
2023-12-05 19:00 sebastien Note Added: 0017488
2023-12-20 18:55 qhivert Status resolved => closed