Backendless Support
 
Assigned to Dev

javascript BL file after upload event wasn't working

I experienced weird bug (on shared cloud app), for a few days (not sure exactly) our Business Logic scripts that were set for File after upload (in several folders) Simply didn't worked, like as if there were no such custom events registered (no traces of events in log). After realizing that, I tried rename my events (in local PC file folder) and redeploy - events still didn't triggered. But in "Coding" section of Business Logic in these folders there were old js file and new ones two, so removed all these files, clicked "save all", then re deployed (npm run deploy) same scripts - only after that it started working.

my app id 1B92F985-D9EF-9689-FFAC-C7E5FE5F2A00

Leave a Comment

Comments (8)

photo
1

Hi Yuriy

New ones did not override the old custom events because the original name has changed, for these reason backendless treated them as new ones. Could you please share the names of events that where not triggered so I could investigate it deeper?

I have few questions:

1) name is the only thing you've changed for these events or there were additional changes in code or in deployment model name?

2) Does the problem still blocks you or the scripts are being triggered now?

Best Regards

photo
1

1) yes, I only changed names of events (maybe I added one more console.log in one event, I don't remember exactly)

2) no, as I said, it started working

for uploading I have folders like upload_1 (to upload_6), so in my Custom Events folder I have

handlers\file\upload_1\afterUpload_1.js (to handlers\file\upload_6\afterUpload_6.js)

with code

Backendless.ServerCode.File.afterUpload('upload_1', function(req, res) ...

originally they had same name afterUpload.js with code

Backendless.ServerCode.File.afterUpload('upload', function(req, res) ...

(and it was working fine, until suddenly it stopped)

photo
1

Yuriy,

If a similar issue for some reason will occur again please notify us ASAP. At this stage investigation of what exactly happened at that moment is barely possible.

Best Regards

photo
1

Well, it happened again - my afterUpload scripts seems not being called after actual file upload

photo
1

tested now. Well, now after upload event scripts do being called. So, what was it?

photo
photo
1

have you experience such problem only with apps on Backendless Cloud or Backendless Managed too ?

photo
1

Currently it's run fine in managed too, but we still don't have many users on managed, so, if this thing work/not work/work again - may be it happened on managed but just wasn't detected?

Update:

actually, I just tried now on managed and looks like it's time - after upload event didn't run!

photo
1

Yuriy, we'll track the last created topic. So I'll close this one