Backendless Version 5.x
I’ve encountered strange error. When calling Business Logic Service function which gets one argument of string type, error is generated: Error: “Backendless encountered an error while handling the request. An internal trouble ticket with ID 9713…”
It happens only with calls from js client browser.
Client side (error):
GameRoomService.oneString(‘s’)
Server side (error):
/**
* @param {String} str
*/
oneString (str) {
return str
}
When calling with stub parameter, it works fine:
Server side (works fine):
/**
* @param {String} str
* @param {String} stub
*/
stubbedString (str, stub) {
return str
}
Client side (works fine):
GameRoomService.stubbedString(‘s’, ‘stub’)
If I understood you correctly - when method with only 1 param is called you are receiving an error?
I’ve just tried calling a method of the similar service:
class test {
/**
* @route POST /
*/
/**
* @param {String} str
*/
hello(str) {
return str
}
}
Backendless.ServerCode.addService(test)
And on method invocation I always get proper result - https://monosnap.com/file/GvzlINAeeWc9MbbxyqwNUjpFKh7Drs
Can you please share your appId and name of the JS service and method which’s not working properly?
Anton
Yes, from Backendless Console it works fine, error occurs when calling from browser.
appId: 3AE22FA5-60AB-5256-FFE1-15D812722900
name of the JS service: GameRoomService
method:
/**
* @param {String} str
*/
oneString (str) {
return str
}
Ah, ok, I thought by saying browser you meant Backendless API service console. Will look into it and will get back to you as soon as I have results
Anton
Yeah, we reproduces the issue and will make a fix in JS SDK ASAP, we’ll notify you as soon as it’s fixed.
For referencing purposes ticket ID is BKNDLSS-19107. We expect to deliver a fix next week
Anton
Issue is fixed and available in 5.2.14 version of JS SDK. Or if you are using the sdk like this: https://api.backendless.com/sdk/js/latest/backendless.min.js - changes are already there
Anton
1 Like