As of April 12th, you must go to Progress SupportLink to create new support cases or to access existing cases. Please, bookmark the SupportLink URL and use the new portal to contact the support team.
I'm having an issue with one of my Kinvey App projects, all my endpoint calls are receiving the same error since this morning:
{ "error": "BLSyntaxError", "description": "The Business Logic script has a syntax error(s). See debug message for details.", "debug": "SyntaxError: Unexpected token >" }
Note that there were no changes in the business logic, it just stopped working for that app in specific.
Best Answer
P
Pranav J
said
about 6 years ago
Andres,
Yes, You are right. I am glad you are able to solve this issue. I would like to share response from our engineering with you.
Response from engineering is as follows:
"For Business Logic, we compile the common code
first, followed by the specific endpoint or hook that is being invoked.
In this case, the user's common code had a bug, so every Business Logic function
would be subject to this error. The error was in the GCM common code
file, with the following line:
f (Webdevices.findIndex(Webdevice => Webdevice.mac == SDKdevice.mac) === -1) WebregIDs.push(Wdevice.registrationID);
The => is a language feature of ES6, which Business Logic does not currently support. So this threw a syntax error.
The common code Business Logic was changed several times over the last few days"
Yes, You are right. I am glad you are able to solve this issue. I would like to share response from our engineering with you.
Response from engineering is as follows:
"For Business Logic, we compile the common code
first, followed by the specific endpoint or hook that is being invoked.
In this case, the user's common code had a bug, so every Business Logic function
would be subject to this error. The error was in the GCM common code
file, with the following line:
f (Webdevices.findIndex(Webdevice => Webdevice.mac == SDKdevice.mac) === -1) WebregIDs.push(Wdevice.registrationID);
The => is a language feature of ES6, which Business Logic does not currently support. So this threw a syntax error.
The common code Business Logic was changed several times over the last few days"
Thanks, Pranav Kinvey
A
Andres Hidalgo
said
about 6 years ago
Hi Pranav,
I solved the issue, I had a lambda expression in a common code function:
Webdevice => Webdevice.mac == SDKdevice.mac
The thing is that the editor didn't throw an error or even a warning in the line where the expression was so I didn't know where was the issue or that the compiler couldn't work with this type of code.
P
Pranav J
said
about 6 years ago
Andres,
This is really a weird issue. I have escalated it to engineering for further investigation and will keep you posted on the progress.
Thanks, Pranav BACK-2747
A
Andres Hidalgo
said
about 6 years ago
Hi Pranav,
1. The only one that seems to have the issue is GeoPush. 2. Through API console:
{"error":"BLSyntaxError","description":"The Business Logic script has a syntax error(s). See debug message for details.","debug":"SyntaxError: Unexpected token >"}
3. I'm calling the endpoint through HTTP request mainly using node.js request module
Thanks, Andres
P
Pranav J
said
about 6 years ago
Andres,
That's weird. I am not able to reproduce this issue in my environment.
I noticed you have multiple apps on Kinvey platform. Can you tell me for which app you are seeing this issue?
Can you try calling your custom endpoints through Kinvey API console and see if you get the same issue?
If you are calling custom endpoint through SDK then can you please let me know the name and version of the SDK that you are using?
Thanks, Pranav Kinvey
A
Andres Hidalgo
said
about 6 years ago
Thanks Pranav, All my endpoints give the same error, endpoints that were working fine starting giving the error without any change. I created a new endpoint for testing purpose:
function onRequest(request, response, modules) { response.complete(200); }
And this one gives out the same error.
P
Pranav J
said
about 6 years ago
Andres,
As per the debug message, there is a syntax error in your business logic code. There is an unexpected token ">" which is causing this issue. Can you please review your code again for ">"?
Andres Hidalgo
I'm having an issue with one of my Kinvey App projects, all my endpoint calls are receiving the same error since this morning:
{
"error": "BLSyntaxError",
"description": "The Business Logic script has a syntax error(s). See debug message for details.",
"debug": "SyntaxError: Unexpected token >"
}
Note that there were no changes in the business logic, it just stopped working for that app in specific.
Yes, You are right. I am glad you are able to solve this issue. I would like to share response from our engineering with you.
Response from engineering is as follows:
"For Business Logic, we compile the common code first, followed by the specific endpoint or hook that is being invoked. In this case, the user's common code had a bug, so every Business Logic function would be subject to this error. The error was in the GCM common code file, with the following line:
f (Webdevices.findIndex(Webdevice => Webdevice.mac == SDKdevice.mac) === -1) WebregIDs.push(Wdevice.registrationID);
The => is a language feature of ES6, which Business Logic does not currently support. So this threw a syntax error.
The common code Business Logic was changed several times over the last few days"
Thanks,Pranav
Kinvey
- Oldest First
- Popular
- Newest First
Sorted by Newest FirstPranav J
Yes, You are right. I am glad you are able to solve this issue. I would like to share response from our engineering with you.
Response from engineering is as follows:
"For Business Logic, we compile the common code first, followed by the specific endpoint or hook that is being invoked. In this case, the user's common code had a bug, so every Business Logic function would be subject to this error. The error was in the GCM common code file, with the following line:
f (Webdevices.findIndex(Webdevice => Webdevice.mac == SDKdevice.mac) === -1) WebregIDs.push(Wdevice.registrationID);
The => is a language feature of ES6, which Business Logic does not currently support. So this threw a syntax error.
The common code Business Logic was changed several times over the last few days"
Thanks,Pranav
Kinvey
Andres Hidalgo
I solved the issue, I had a lambda expression in a common code function:
The thing is that the editor didn't throw an error or even a warning in the line where the expression was so I didn't know where was the issue or that the compiler couldn't work with this type of code.
Pranav J
This is really a weird issue. I have escalated it to engineering for further investigation and will keep you posted on the progress.
Thanks,
Pranav
BACK-2747
Andres Hidalgo
1. The only one that seems to have the issue is GeoPush.
2. Through API console:
REQUEST
RESPONSE
Thanks,
Andres
Pranav J
That's weird. I am not able to reproduce this issue in my environment.
Thanks,
Pranav
Kinvey
Andres Hidalgo
All my endpoints give the same error, endpoints that were working fine starting giving the error without any change.
I created a new endpoint for testing purpose:
function onRequest(request, response, modules) {
response.complete(200);
}
And this one gives out the same error.
Pranav J
Andres,
As per the debug message, there is a syntax error in your business logic code. There is an unexpected token ">" which is causing this issue. Can you please review your code again for ">"?
Thanks,
Pranav
Kinvey
-
How do I access query string values for GET and DELETE requests?
-
Basic Authentication in Business Logic
-
How do I cascade delete entities from related collections?
-
All BL failing with Violation Error
-
How do I send push notifications?
-
Whenever I try to query by _id, I get zero results
-
receiving SOCKETTIMEDOUT when requesting external http response
-
Unique Constraints on a collection column?
-
Need some help with grouping
-
Accessing Endpoint from Collection Hook
See all 342 topics