Support Topics Documentation Slack YouTube Blog

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