[Urgent] Recurring errors on event handlers

Suddenly we are getting lots of errors with our event handlers and our app is not functioning.

The event handler is fetching an item from our database weekly_slots.

App ID 4A47197B-AE30-FA84-FF56-0071F4010900

As you can see, we are first prining the response item, and then we are printing the property we need alter.

2022-07-19 19:28:04,329 | SERVER_CODE |  INFO | [3612387] {
  ___jsonclass: 'com.backendless.commons.persistence.EntityDescription',
  ___class: 'com.backendless.commons.persistence.EntityDescription',
  name: 'weekly_slots',
  fields: {
    ___jsonclass: 'weekly_slots',
    ___class: 'weekly_slots',
    sdr: 'AlexMarino',
    parent_name: 'Test-Claudia',
    timezone: 'GMT+1',
    subject: 'CodingScratch',
    rubric: null,
    ownerId: null,
    contact_id: 'cont_aZhY34mOW26gEYhQZY4MAnos4B4lHsvQNULPG9aCRPa',
    lastReschedule: null,
    email2: null,
    student_name: 'Bob',
    noReschedules: null,
    school: 'Brilliant Grades',
    slots_sort: '/Sat...16.30',
    state: null,
    lead_id: 'lead_nDk64VfTkYrF2bsdGVjqDn0uIA4Hnew9Uo0pAZCqn0K',
    email: 'mariaclitsas@gmail.com',
    objectId: 'D38FDE5B-BC17-4052-9710-0949E8DC743B',
    chargebee: '169lZzSh2uDXk3e2o',
    group: 'MAX1',
    timestamp: 2021-01-09T15:30:00.000Z,
    smsCount: null,
    created: 2022-04-12T20:38:52.000Z,
    churn_reason: null,
    lastHmwrk: '2022-05-10',
    url: 'https://www.brilliantgrades.com/',
    tutor: 'NicolasTutor Live',
    sms_id: null,
    phone: '+447418341725',
    service: 'Tutoring',
    grade: 'Grade 6',
    tagline: 'World-Class Online Learning',
    region: 'EU',
    updated: 2022-07-19T19:28:03.628Z,
    uniqueId: 'cont_aZhY34mOW26gEYhQZY4MAnos4B4lHsvQNULPG9aCRPa | MAX1-GRADE 6-CODINGSCRATCH-SAT15:30-GMT-NICOLASTUTOR LIVE',
    startDate: 2022-04-12T20:38:52.000Z,
    lastSession: '2022-05-10',
    status: 'enrolled',
    slot_slug: 'MAX1-GRADE 6-CODINGSCRATCH-SAT15:30-GMT-NICOLASTUTOR LIVE'
  }
}

2022-07-19 19:28:04,329 | SERVER_CODE |  INFO | [3612387] undefined

2022-07-19 19:28:04,455 | SERVER_CODE |  INFO | [3612387] TypeError: Cannot read property 'replace' of undefined
    at Object

As you can see, the slot_slug property exists in the Response Item but is not captured at the next step.

This is a repeat of an issue we faced when you were doing the virtualization project, see this ticket for all the detail: Event handler not recognizing response item property

Hello @Andreas_Marinopoulos,

from your logs and code I see the Response Item has the following structure:

{
  ...
  name: '...',
  fields: {
    slot_slug: '...',
    ...
  }
}

But then you’re trying to get the slot_slug property of the Response Item, while the actual slot_slug is under the fields object in the Response Item.
So you need to make a block Get property `slot_slug` of Get property `fields` of Response Item.

Please let me know if it helps.

Regards,
Stanislaw

@stanislaw.grin I can try this but this code has not been changed in months! And it has worked all this time. I suspect the fields are just the properties of the object. Have you changed anything in how event handlers work? Again this code has been stable for ages so there must be another issue here.

Let me few minutes to check it in my own app please, I’ll get back soon

1 Like

@Andreas_Marinopoulos I was able to reproduce the issue. We will try to fix it as soon as possible.
I apologize for such inconvenience.

Thank you very much @stanislaw.grin, do you also believe you found the root cause?

Unfortunately not yet, it will take a little longer and unfortunately we are already at midnight local time, however I am hoping for a temporary fix until tomorrow morning. We are in the process and I will let you know the results as soon as possible.

Thank you

Thank you for your patience!

@Andreas_Marinopoulos, we made a fix. Could you please check and let us know the results?

I have reenabled all event handlers and am waiting to see that they work, will inform you in a few minutes.

checking

The event handlers seem to be solved!

I do have another error that is occuring, probably related, but we can solve it tomorrow, it is not very important. I have a timer, updating a DB, And it is erroring Cannot read property 'slot_slug' of undefined.

I will give you more information on this tomorrow. It is 12am where I am also (Europe).

THe important thing is that the event handlers work and my app is operational. Thank you :pray:

Great! Thanks again for your patience and we apologize for the inconvenience.
The problem will be investigated in more depth and fixed in the next release.
Regarding the problem with the timer, please create a new topic tomorrow, and I will try to figure out what the problem might be.

Regards,
Stanislaw

Opening this ticket again

fixed

Reopening, having the issue a 3rd time @stanislaw.grin .

Hi @Andreas_Marinopoulos ,

Sorry for the long delay with response. We made several fixes since your last report.
Did you have any more issues since 4th of September?

Regards, Andriy

Yes issue solved!