[OP-240] "serverId is required" and weekly event not synchronized with Android 5.1 and 5.0.2 Created: 08/Apr/16  Updated: 11/May/16  Resolved: 12/Apr/16

Status: Closed
Project: Opush
Component/s: None
Affects Version/s: 3.1.1
Fix Version/s: 3.2.0

Type: Bug Priority: Normal
Reporter: Stephane COLSON Assignee: Thomas HILAIRE
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Fairphone 2 version 1.2.8 with Android 5.1


Attachments: PNG File Screenshot_2016-04-11-09-55-15.png    
Story Points: 2
Rank: 6993
Sprint: 2016#01

 Description   

Reproduction steps

  1. As usera with FP2, create a weekly event with or without attendees
  2. Synchronize

Current behavior

  1. the event is not synchronized NOK
  2. See opush.log error "serverId is required" in additional informations NOK

Expected behavior

  1. No error and event synchronized OK

Additional informations

Also reproduce with Alcatel iDol3 (Android 5.0.2)
Not reproduced with iPhone 5 (iOS 9)
Not reproduced with Samsung Galaxy S6 edge (Android 6.0.1)
Not reproduced with Nexus 4 (Android 5.1.1)
Not reproduced with Nexus 7 (Android 5.1.1)
Not reproduced with SGS2 (Android 4.1.2)
No problem with same Fairphone 2 and Daily, monthly or yearly events

16:22:48.335 [ERROR] {org.obm.push.handler.SyncHandler} [t35/cSync/r104/userb@obm40.lyn.lng] serverId is required
java.lang.IllegalArgumentException: serverId is required
    at com.google.common.base.Preconditions.checkArgument(Preconditions.java:125) ~[guava-16.0.jar:na]
    at org.obm.push.bean.change.client.SyncClientCommands$ClientCommand.<init>(SyncClientCommands.java:104) ~[push-bean-3.1.1.jar:na]
    at org.obm.push.bean.change.client.SyncClientCommands$Add.<init>(SyncClientCommands.java:232) ~[push-bean-3.1.1.jar:na]
    at org.obm.push.handler.SyncHandler.addServerItem(SyncHandler.java:378) ~[push-core-3.1.1.jar:na]
    at org.obm.push.handler.SyncHandler.processClientModifications(SyncHandler.java:340) ~[push-core-3.1.1.jar:na]
    at org.obm.push.handler.SyncHandler.doUpdates(SyncHandler.java:270) ~[push-core-3.1.1.jar:na]
    at org.obm.push.handler.SyncHandler.handleDataSync(SyncHandler.java:515) ~[push-core-3.1.1.jar:na]
    at org.obm.push.handler.SyncHandler.computeSyncState(SyncHandler.java:491) ~[push-core-3.1.1.jar:na]
    at org.obm.push.handler.SyncHandler.doTheJob(SyncHandler.java:464) ~[push-core-3.1.1.jar:na]
    at org.obm.push.handler.SyncHandler.process(SyncHandler.java:176) ~[push-core-3.1.1.jar:na]


 Comments   
Comment by Stephane COLSON [ 11/Apr/16 ]

I also tried with Custom Android and Samsung Galaxy S6 emulator with Android 5.1.0 (API 22) using Genymotion emulator and cannot reproduce too.

Comment by Thomas HILAIRE [ 11/Apr/16 ]

Explanations:
The devices are not respecting the spec, a WEEKLY event must have the DayOfWeek defined but it's not.
I think that we can easily find the DayOfWeek by ourself by looking at the event start date.

The given recurrence is:

<Recurrence>
<RecurrenceType>1</RecurrenceType>
</Recurrence>
Comment by Thomas HILAIRE [ 12/Apr/16 ]

Impacts: check that obm-ui created weekly event is well sync on FP or Alcatel iDol3
QA: I have no phone to test (I did such tests with unit tests), but we may try some cases like:

  • UTC device: weekly event and weekly allday event
  • UTC+?? device: weekly event and weekly allday event
  • UTC-?? device: weekly event and weekly allday event

QA NOTE:

  • do not check for DST or complex TZ case: we will have all same bugs than with any other devices
  • Opush is not able to decode all TZs, so if the repeat day on obm-ui is not what you have choosen on your phone. It would come from that.
Comment by Jenkins Continuous Integration Server [ 12/Apr/16 ]

SUCCESS: Integrated in opush-master-3.1 #47
OP-240 Fallback on start date day for DayOfWeek when none (thilaire: 9dbe568e1a8370034db0fb7fcc43a684a9819071)

  • push-core/src/main/java/org/obm/push/handler/SyncHandler.java
  • obm-backend/src/test/java/org/obm/push/calendar/MSEventToObmEventConverterRecurrenceTest.java
  • integration-testing/opush/src/test/java/org/obm/opush/command/sync/SyncHandlerOnCalendarsTest.java
  • obm-backend/src/main/java/org/obm/push/calendar/MSEventToObmEventConverterImpl.java
  • obm-backend/src/main/java/org/obm/push/RecurrenceDayOfWeekConverter.java
  • protocol/src/main/java/org/obm/push/protocol/data/CalendarEncoder.java
  • protocol/src/test/java/org/obm/push/protocol/data/CalendarEncoderTest.java
Comment by Stephane COLSON [ 26/Apr/16 ]

OK, tested with Faiphone 2 and iPhone 5

  • weekly simple event without attendees
  • weekly allday simple event without attendees
  • weekly simple event with attendees
  • weekly allday simple event with attendees
    + personnalized weekly events with and without attendees, allday or not
    + Modified events
    + Deletion of these events
    + Same on another TZ (GMT or GMT+4)
Comment by Jenkins Continuous Integration Server [ 11/May/16 ]

ABORTED: Integrated in opush-master #262
OP-240 Fallback on start date day for DayOfWeek when none (thilaire: 5d265d93dcdd0d5a4bd52eb0c43b95ec55b7f843)

  • obm-backend/src/main/java/org/obm/push/RecurrenceDayOfWeekConverter.java
  • integration-testing/opush/src/test/java/org/obm/opush/command/sync/SyncHandlerOnCalendarsTest.java
  • obm-backend/src/test/java/org/obm/push/calendar/MSEventToObmEventConverterRecurrenceTest.java
  • push-core/src/main/java/org/obm/push/handler/SyncHandler.java
  • protocol/src/main/java/org/obm/push/protocol/data/CalendarEncoder.java
  • protocol/src/test/java/org/obm/push/protocol/data/CalendarEncoderTest.java
  • obm-backend/src/main/java/org/obm/push/calendar/MSEventToObmEventConverterImpl.java
Generated at Sun Aug 18 05:21:58 CEST 2019 using JIRA 6.1.1#6155-sha1:7188aeec9a6b57d61ea04c52f235f15f55c105e2.