CS Online - Invalid token ","

Hi,

See below screenshot

What could possible cause this? i dont have 1860 lines of code in the script.

This knocked out all scripts for the tenant that is using the %EJSCRIPT_START% functions and all functionality is down, all complaining about the same line and char.
Worked just fine 10 minutes ago

RE: CS Online - Invalid token ","

Hi Pär,

I managed to reproduce this as well, and once it happened in my solution, it wouldn't work at all, even if I created a new one.

However, if I run the script in the browser:

https://online.superoffice.com/custxxxx/CS/scripts/customer.fcgi?_sf=0&action=parse&includeId=testscript&key=testscript

it works. So it should work fine for your purpose as well as you would only use %EJSCRIPT_START% and %EJSCRIPT_END% if you want to parse HTML?

Av: Simen Mostuen Iversen 20. dec 2017

RE: CS Online - Invalid token ","

Hi,

Yeah, i was able to do some rest calls as well.

Although, the whole system just got VERY byggy to the point that we cant create any new scripts at all.

Just take a look at the script below, dont have anything with "test" withing in the script

Any thoughts from R&D?
Any workaround that get it back in order, we are currently 3 developers working fulltime just for this customer so its quite a big project, and right now we are forced to freeze the project until this is solved

Regards
Pär

 

EDIT: Restcalls stopps working after a while as well, the response is no longer the json im expecting, it starts returning the CS login page or some html content from CS.

And waiting again for a few minutes and it will returning the json, and after yet a few more minutes we are back to html.

And we are just sending a simple 10 character string, every call is identical

Av: Pär Pettersson 20. dec 2017

RE: CS Online - Invalid token ","

Hi,

We have discovered this bug as well. It is a result of us not recycling the FastCGI processes for all exceptions anymore. The bug is already fixed and will be available in next release. In the meantime, you can workaround this by using .exe in the URL instead of .fcgi

Sverre

Av: Sverre Hjelm 20. dec 2017

RE: CS Online - Invalid token ","

Simen,

"So it should work fine for your purpose as well as you would only use %EJSCRIPT_START% and %EJSCRIPT_END% if you want to parse HTML?"

I kind of have to, if im not, and im using a REST client, Postman or Restsharp or similar, it does get all content from the script for some reason, not only the thing i return, so i see all the ejscript code in the return, running the same url in the browser results in only my result as expected

%EJSCRIPT_START% solves this, so im kind of forced to use it to get my response back to the service

If there is any other way around this, please let me know :)

Av: Pär Pettersson 20. dec 2017

RE: CS Online - Invalid token ","

.exe seems to have fixed the issue, the restcall is working as expected now

Thanks Sverre and Simen for the quick feedback, always a pleasure!

Regards

Pär

Av: Pär Pettersson 20. dec 2017

RE: CS Online - Invalid token ","

Some additional info on this.

What happens is actually that you have one script which contains a bug. When this script is executed, an exception is thrown and the process does not properly clean up all of its variables. Subsequent calls to this process will be influenced by this and will continue to fail. When the fastCgi process is recycled, you have a fresh start again.

This only happens if you have scripts which are failing, i.e. exceptions are thrown during their execution. So, the first workaround is to make sure your scripts are stable and do not throw execution.

Secondly, as I mentioned, you could call the .exe instead of the .fcgi.

As mentioned, we have already have a fix for this which will be rolled out @ our next release.

Sverre

Av: Sverre Hjelm 20. dec 2017

RE: CS Online - Invalid token ","

As far as I know this problem has been there "forever" i.e. since .fcgi was introduced a few years back. Correct, Sverre? This isn't a new problem?

Av: Frode Lillerud 20. dec 2017