Date Parsing Exception

{
"___jsonclass": "com.example.Boost",
"created": "1609182528000",
"___class": "com.example.Boost",
"startTime": "1609182529000",
"endTime": "1609343473000",
"ownerId": "7D9E8E96-227F-C0A6-FFC9-7446F67E0300",
"updated": "1609339873000",
"objectId": "40A3672E-DFFB-426D-BDA5-3ABF3AF16D2F",
"___dates___": [
    "1609343473000",
    "1609182528000",
    "1609182529000",
    "1609339873000"
]

}

When parsing this object I receive the following exception:
[__NSCFString timeIntervalSinceReferenceDate]

The object class in Backendless tables is DateTime.

I have set the mapping for the class:
Backendless.shared.data.of(Boost.self).mapToTable(tableName: “com.example.Boost”)

This happends when invoking custome APIs.

Any help with this is appreaciated.

Thank you,
Adrian

Hello @Adrian_Ispas

I’ve created an internal ticket BKNDLSS-23662 to investigate the issue.

Regards, Vlad

Hi Vlad,
When do you think you will be able to investigate this, its quite frustrating.

Work around suggestions?

Thanks
Reece

Hello @Reece_Smith

We are working on this issue, as soon as there is some result we will inform you additionally in this topic.

Hello @Adrian_Ispas, @Reece_Smith,

Issue is fixed in Swift-SDK v6.2.0. Could you please check and verify whether it works now?

Regards,
Olha

@olhadanylova
Dates are working fine with the new sdk update.
Thank you

1 Like

@olhadanylova it seems this bug has returned :frowning:

Hello @Adrian_Ispas,

I’ll check as soon as possible.

Regards,
Olha

Thanks Olha, this is causing our app to suddenly crash, bad timing as it’s currently being tested by clients. Something server side must have happened.

I’ve reopened the internal ticket BKNDLSS-21294 for this issue. The problem is on the server side and our backend developer will look into it as soon as possible.

Regards,
Olha

UPD:
I’ve checked with Swift-SDK v6.3.1 and everything works fine.
Please make sure you have the latest version of SDK.

Regards,
Olha

Olha,

We’re on this version, the app was working fine up until yesterday evening, something has been pushed out server side that is causing this.

This is one of the objects that fail to map to Date. All types of Dates, even the detault upate/created dates are strings

â–ż 10 elements
 â–ż 0 : 2 elements
  - key : “___dates___”
  â–ż value : 1 element
   - 0 : “-62135596800000"
 â–ż 1 : 2 elements
  - key : “name”
  - value : “Chile”
 â–ż 2 : 2 elements
  - key : “updated”
  - value : “-62135596800000"
 â–ż 3 : 2 elements
  - key : “objectId”
  - value : “ECC2BDEE-0365-1748-FF84-626F9A56B400"
 â–ż 4 : 2 elements
  - key : “priority”
  - value : 0
 â–ż 5 : 2 elements
  - key : “ownerId”
  - value : “97E980F0-7A1D-3930-FFCF-C3DD45CF9900”
 â–ż 6 : 2 elements
  - key : “___jsonclass”
  - value : “Country”
 â–ż 7 : 2 elements
  - key : “created”
  - value : “-62135596800000”
 â–ż 8 : 2 elements
  - key : “timeZone”
  - value : <null>
 â–ż 9 : 2 elements
  - key : “___class”
  - value : “Country” (edited)

Could you please provide your APP ID, I assume the reason is in the minus symbol and therefore it is really the server issue.

Regards,
Olha

Here is the app id:
08B538C0-0E98-1827-FF98-7DF8AFF96600

Its not the minus sign. These dates also crash

â–ż 8 elements
  â–ż 0 : 2 elements
    - key : "___dates___"
    â–ż value : 1 element
      - 0 : "1617953935679"
  â–ż 1 : 2 elements
    - key : "created"
    - value : "1617953935679"
  â–ż 2 : 2 elements
    - key : "___jsonclass"
    - value : "Team"
  â–ż 3 : 2 elements
    - key : "bar"
    â–ż value : 14 elements
      â–ż 0 : 2 elements
        - key : "address"
        - value : "Poldo House, Enderby Wharf"
      â–ż 1 : 2 elements
        - key : "blurFace"
        - value : 1
      â–ż 2 : 2 elements
        - key : "___class"
        - value : "Bar"
      â–ż 3 : 2 elements
        - key : "updated"
        - value : "1617987044265"
      â–ż 4 : 2 elements
        - key : "___jsonclass"
        - value : "Bar"
      â–ż 5 : 2 elements
        - key : "name"
        - value : "Tipple Demo Bar"
      â–ż 6 : 2 elements
        - key : "location"
        â–ż value : 5 elements
          â–ż 0 : 2 elements
            - key : "___jsonclass"
            - value : "com.backendless.persistence.GeometryDTO"
          â–ż 1 : 2 elements
            - key : "geomClass"
            - value : "com.backendless.persistence.Point"
          â–ż 2 : 2 elements
            - key : "___class"
            - value : "com.backendless.persistence.GeometryDTO"
          â–ż 3 : 2 elements
            - key : "geoJson"
            - value : "{\"type\":\"Point\",\"coordinates\":[0.0038008545730430074,51.48982970337973]}"
          â–ż 4 : 2 elements
            - key : "srsId"
            - value : 4326
      â–ż 7 : 2 elements
        - key : "activeBoost"
        - value : 0
      â–ż 8 : 2 elements
        - key : "___dates___"
        â–ż value : 2 elements
          - 0 : "1617892389223"
          - 1 : "1617987044265"
      â–ż 9 : 2 elements
        - key : "created"
        - value : "1617892389223"
      â–ż 10 : 2 elements
        - key : "ownerId"
        - value : <null>
      â–ż 11 : 2 elements
        - key : "tippleBar"
        - value : 1
      â–ż 12 : 2 elements
        - key : "objectId"
        - value : "F4E980D2-A448-4752-ADB4-D6495AED1846"
      â–ż 13 : 2 elements
        - key : "details"
        - value : "Hello world"
  â–ż 4 : 2 elements
    - key : "ownerId"
    - value : <null>
  â–ż 5 : 2 elements
    - key : "objectId"
    - value : "9629E232-710F-46CD-87E5-BB33BF71C74B"
  â–ż 6 : 2 elements
    - key : "updated"
    - value : <null>
  â–ż 7 : 2 elements
    - key : "___class"
    - value : "Team"

I’ve created the internal ticket BKNDLSS-24821. Our developers are already looking into this problem.

Regards,
Olha

Hello @Adrian_Ispas

Negative values are because you have created/updated with values 01/01/0001 02:02:04 in the table Backendless. Have you imported those records?

I think they are imported, but my guess is it shouldn’t affect the way a Date is created, its still a time interval.

There are other dates, like in the example above that dont map corectly.
They worked until two days ago.

@Adrian_Ispas could you please clarify how the problem is manifested? Is it a date parsing exception? or something else? I went through the conversation in this thread, but I do not see the exact symptom of the problem.

Thanks,
Mark