Support Topics Documentation Slack YouTube Blog

Java script start to fall


(zeev mindali) #1

I understand that you did an upgrade to js.
since then I have a customer with no working system.
the problem is when I try to get length of column that is a relation column but with no object.
instead of get 0 I getting null.

therefor the system run the .catch method and not letting me move forward


(Vladimir Upirov) #2

you asked a link for previous version of JS-SDK, and here is the link https://unpkg.com/backendless@5.2.0/dist/backendless.min.js
did you add it into your app?


(zeev mindali) #3

getting error Failed to load resource: the server responded with a status of 500 ()


(Vladimir Upirov) #4

can you see content of the file in your browser if you just click on the link?


(zeev mindali) #5

yes
I see the code inside


(Vladimir Upirov) #6

alright, let’s figure out why you get 500 Error in your app


(zeev mindali) #7

[Error] Refused to execute https://unpkg.com/backendless@5.2.0/dist/backendless.min.js?_=1549275039632 as script because “X-Content-Type: nosniff” was given and its Content-Type is not a script MIME type.


(Vladimir Upirov) #8

yeah looks like it’s because of ?_=1549275039632 query


(zeev mindali) #9

just replaces the link, how can I avoid it?


(Vladimir Upirov) #10

it’s somewhere in jQuery in $.getScript method, so I think the best/faster way it is copy content of the file and put it into your files in Backendless app


(zeev mindali) #11

it will be simpler if it will return zero value if there is no relationship instead of searching and patching.
it worked before, why you changed it?
the problem is in Backendless.js


(Vladimir Upirov) #12

we’ve changed GET to POST method for Data.find for avoiding url limit, and it works except “autoload” relations, and our engineer is already working on it, and it will be fixed as soon as possible, ticket number is: BKNDLSS-18085


(Vladimir Upirov) #13

I’ll revert the changes in JS-SDK and release a new version, so you can revert https://api.backendless.com/sdk/js/latest/backendless.min.js in your code and the new version will be available in a few minutes


(zeev mindali) #14

fixed the version that you have by myself.
now it’s return 0 value and not null.
i will keep my version, and check new version before uploading them.
can not allow myself another problem of several days client can not use the system.
check your QA dep. something are not working good when going to production