6.0.0-alpha14
7/3/25

[#12679] Provisioning ActiveSync fails with integrity constraint on database
Summary Provisioning ActiveSync fails with integrity constraint on database
Queue Synchronization
Queue Version Git master
Type Bug
State Not A Bug
Priority 1. Low
Owners mrubinsk (at) horde (dot) org
Requester trunet (at) wsartori (dot) com
Created 09/12/2013 (4312 days ago)
Due
Updated 02/08/2014 (4163 days ago)
Assigned 09/12/2013 (4312 days ago)
Resolved 09/12/2013 (4312 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
02/08/2014 08:01:02 AM roberto (dot) maurizzi (at) gmail (dot) com Comment #6 Reply to this comment
What's hard to figure out about the checkbox? It's turns on or off
the selected permission for the selected user/group?
What about a "Enabled:" text on the side of checkbox? For a first 
timer it's difficult to figure out what it is.
I second the "add a label" proposal.
With the current default colors the checkbox is light grey on white. I 
didn't even SEE it...  :-)

09/12/2013 10:39:34 PM trunet (at) wsartori (dot) com Comment #5 Reply to this comment
What's hard to figure out about the checkbox? It's turns on or off 
the selected permission for the selected user/group?
What about a "Enabled:" text on the side of checkbox? For a first 
timer it's difficult to figure out what it is.
09/12/2013 10:37:44 PM Michael Rubinsky Comment #4
State ⇒ Not A Bug
Reply to this comment
What's hard to figure out about the checkbox? It's turns on or off the 
selected permission for the selected user/group?
09/12/2013 10:24:51 PM trunet (at) wsartori (dot) com Comment #3
New Attachment: activesync_permissions.png Download
Reply to this comment
Hi,

I figured out what happened. On ActiveSync permissions, you have to 
click on the "enable" checkbox and update.

Take a look on the screenshot attached because it does not have 
anything written on the checkbox making very hard to discover what's 
happening.
09/12/2013 10:22:34 PM Michael Rubinsky Comment #2
State ⇒ Feedback
Assigned to Michael Rubinsky
Reply to this comment
I don't see any code path that could lead to an empty username, unless 
the client is not sending the username as required by the EAS 
specifications. What version of Horde_ActiveSync is installed? Does 
the pairing work if you create a new account without provisioning?
09/12/2013 10:21:02 PM Michael Rubinsky Version ⇒ Git master
Queue ⇒ Synchronization
Priority ⇒ 1. Low
 
09/12/2013 09:57:37 PM trunet (at) wsartori (dot) com Comment #1
Priority ⇒ 3. High
State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒
Queue ⇒ Horde Groupware Webmail Edition
Summary ⇒ Provisioning ActiveSync fails with integrity constraint on database
Type ⇒ Bug
Reply to this comment
Hi,

I have enabled provisioning of activesync on my horde. I already had 
an iPhone added and after adding the permissions I got on syslog:
Sep 12 18:52:45 hosting HORDE: [horde] SQL QUERY FAILED: 
SQLSTATE[23000]: Integrity constraint violation: 1048 Column 
'device_user' cannot be null  #012#011INSERT INTO 
horde_activesync_device_users (device_id, device_user,#012#011   
device_policykey) VALUES('MY_IPHONE_ID', NULL, 0) [pid 32303 on line 
553 of "/usr/share/php/Horde/Db/Adapter/Base.php"]
Sep 12 18:52:45 hosting HORDE: [horde] Returning HTTP 500 while 
handling Ping command. [pid 32303 on line 156 of 
"/var/www/vhosts/mywebmail.domain.com/rpc.php"]
Sep 12 18:52:45 hosting HORDE: [horde] Error in communicating with 
ActiveSync server: SQLSTATE[23000]: Integrity constraint violation: 
1048 Column 'device_user' cannot be null [pid 32303 on line 160 of 
"/usr/share/php/Horde/Rpc/ActiveSync.php"]
Sep 12 18:52:45 hosting HORDE: [horde] #0 
/usr/share/php/Horde/ActiveSync/Device.php(219): 
Horde_ActiveSync_State_Sql->setDeviceInfo(Object(Horde_ActiveSync_Device))#012#1 /usr/share/php/Horde/ActiveSync.php(804): Horde_ActiveSync_Device->save()#012#2 /usr/share/php/Horde/Rpc/ActiveSync.php(141): Horde_ActiveSync->handleRequest('Ping', 'Appl82948K9Z3NP')#012#3 /var/www/vhosts/mywebmail.domain.com/rpc.php(156): Horde_Rpc_ActiveSync->getResponse(NULL)#012#4 {main} [pid 32303 on line 160 of 
"/usr/share/php/Horde/Rpc/ActiveSync.php"]
Sep 12 18:52:45 hosting HORDE: [horde] Buffer contents:  [pid 32303 on 
line 160 of "/usr/share/php/Horde/Rpc/ActiveSync.php"]

Saved Queries