watson-developer-cloud/assistant-simple

Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Skittles-Cosmo opened this issue · 10 comments

While trying to run on localhost, I get "Failed to load resource: the server responded with a status of 500 (Internal Server Error) api.js:81". Underneath that I also get "XHR failed loading: POST "http://localhost:3000/api/message". api.js:81".

My service is in London region and I'm using the iam_apikey for authentication.

@stevenpkg Can you take a look?

Not sure from the information you have given me what the problem is. Are you still having the problem, if so, can you post the full console error using this command NODE_DEBUG=request npm start

@stevenpkg Yes I am.

This is what I get on console:

POST http://localhost:3000/api/message 500 (Internal Server Error)
sendRequest @ api.js:76
init @ conversation.js:32
(anonymous) @ global.js:10
(anonymous) @ global.js:105
09:37:36.164

XHR failed loading: POST "http://localhost:3000/api/message".
sendRequest @ api.js:76
init @ conversation.js:32
(anonymous) @ global.js:10
(anonymous) @ global.js:105

@Skittles-Cosmo still not sure, have you set the correct ASSISTANT_URL what region is your assistant workspace?

@stevenpkg I'm using 'https://gateway-lon.watsonplatform.net/assistant/api'. My assistant workspace is in London.

I managed to get rid of the status 500 and it works properly on local host now. I pushed it up to Cloud and it runs for a while then crashes. I get the following message: Failed to load resource: the server responded with a status of 502 (Bad Gateway)

@Skittles-Cosmo Can you share how you get rid of the status 500 in your local ? I am having same issue now

@BurakYilmaz92 What worked for me is adding:
var assistant = new AssistantV2({
version: '2018-11-08',
iam_apikey: '',
url: ''
});

I ran in to similar issue. Make sure you give assistant id not workspace id of your skill,the same for url

Hi,
I have one doubt how much size of data through controller to view using jquery ajax method in mvc 4