Api id: 8149FCCE-07DA-F988-FFBB-6154872C9500
I’m unable to work with cloud code in debug mode today. I’ve been trying since 9am. A module under development loads and runs fine in debug mode, nevertheless, all requests to endpoints fail with weird errors. In the console, calls time out after 10 minutes with a 504 gateway timeout error. I have also seen a few bizarre 401 “You are not authorized” errors even with a fresh login to the console. In the Coderunner console, I see the service functions run, but the results are never returned.
13:08:13.056 [102E39D5-0E1F-2F5C-FFC3-30A2907B7300] New task arrived!
13:08:13.086 [102E39D5-0E1F-2F5C-FFC3-30A2907B7300] [INVOKE SERVICE] services.**private**.get**private**
13:08:14.185 [102E39D5-0E1F-2F5C-FFC3-30A2907B7300] Processing finished
And in the Console:
As best as I can tell, other, deployed services are working.
Just to confirm, does it impact only services in debug?
Could you please check if a simple helloWorld()
type of method would result in the same behavior? Also, is it JS or Java?
Here’s one that is failing. The log message is present in the console output.
/**
*
* @param {String} token
* @return {object}
*
*/
async verifyUser(token) {
try {
console.log('no error')
return {token: token}
}
catch (error) {
return { error: error }
}
}
I am writing up a ticket for the dev team. To dot all the i’s, could you please check and let me know the version of coderunner npm package?
Sorry, 6.3.1. I’m going to try updating to the latest just for grins.
No difference with 6.5.8.
Hello, @Kelly_Oglesby
Could you tell me exactly what you are running so I can try to reproduce your problem?
Marian, any call to a cloud service endpoint when running in debug mode with Coderunner exhibits the behavior. I posted a simple echo example above, but actually, ALL calls hang in debug mode. I tried an old test service I had lying around in debug mode, and it does the same thing.
In the Coderunner console, you can see the endpoint being hit, you see that it finishes processing without error and produces the correct result, but the reply is never received by the calling app - instead, the service invocation times out after several minutes with a 501 “Gateway Timeout”.
13:08:13.056 [102E39D5-0E1F-2F5C-FFC3-30A2907B7300] New task arrived!
13:08:13.086 [102E39D5-0E1F-2F5C-FFC3-30A2907B7300] [INVOKE SERVICE] services.**private**.get**private**
13:08:14.185 [102E39D5-0E1F-2F5C-FFC3-30A2907B7300] Processing finished
It isn’t particular to me. I saw another user having the same problem this morning in Slack and on the support forum (“Api response buffering indefinitely”). Code that was working fine in debug mode day-before-yesterday now hangs.
I worked around this, for now, by deploying.
Hello @Kelly_Oglesby
I just tried to reproduce the issue and seems everything works well from my side.
I did the following steps:
- created a new API Service with name “TestDebugService” in the Console in your app
- added a method
/**
*
* @param {String} token
* @return {object}
*
*/
async getTestMethod(token) {
try {
console.log('no error')
return {token: token}
}
catch (error) {
return { error: error }
}
}
- deployed it from the Console
- run the method to make sure it works in Prod mode
- downloaded the deployment from the Coding section
- unzipped the archive
- open the project and run
npm i
to install all the deps
- the run it in Debug mode by executing the following command
npm run debug
- go back to the Console and run the debug method
- received result as expected
Could please repeat these steps from your side to make sure the issue is still present
Regards, Vlad
Hi Vlad,
It is working now. I ran the same service in debug mode and it no longer hangs from the console. Nice, snappy performance. I tried running the debugger on both a deployed service and an un-deployed one, and both work just fine.
Thank you,
Kelly
great, please let us know if the problem is back and we will try to investigate one more time