-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm having trouble connecting to the server, please refresh the page #224
Comments
I'm having the same issue. Seems to come from /api/session, https error code 404 - Not found. No idea what is not found. I'm pretty sure nothing wrong with my apikey, aim_url, assistant_id. Tested them on rest tester. |
@stevenpkg Can you take a look at this? |
@dandresv looking at your .env file I can see you have both username, password and IAM key. Please specify one or the other. Use a # to comment out variables you do not need:
|
@stevenpkg Make the corresponding changes and leave these variables ASSISTANT_ID, ASSISTANT_IAM_APIKEY, ASSISTANT_IAM_URL and I still get the same error, I'm reviewing from the browser console and I answered the following "Failed to load resource: the server responded with a status of 500 (Internal Server Error) ": 3000 / api / message |
@dandresv the problem I believe is getting the session key due to credentials not being correct. What error is printed on the backend. put some debug code around this function, also you can turn on node debug
|
This is the error that is showing me in the app.js. (api/session) assistant.message |
@germanattanasio have you any thoughts why the session Id is failing? |
I'm having the same issue here. It works with the username and password of the old Assistant, but it does not work with the new Assistant service credentials ASSISTANT_IAM_APIKEY, ASSISTANT_URL=https://gateway.watsonplatform.net/assistant/api/, and ASSISTANT_ID that I provide. I tested the following code and it works. Not sure where it is messing up in the app.js?
getting the same thing as dandresv hitting /api/session |
Not sure ATM, will try and test some more with different account myself to see if I can replicate this issue. @ElinShek there is no need to put the iam_apikey and url in the V2 constructor, just have them in your .env file, make sure you only specify one type of login, username or iam |
My simple app is working now. You have to make sure that you don't have the old service credentials in your environment still (i.e. ASSISTANT_USERNAME, ASSISTANT_PASSWORD, etc.) I used a new terminal and everything works with the IAM api key. FYI... |
Could you open this little bit. I am having same issues and I can't seem to be able to solve it. Also I am bit confused on where I could find the needed information, I feel I have taken the wrong ones |
Thank you very much! I got it working. I had ASSISTANT_URL incorrect. |
That it's the time of the "session"? how can configure that and the message? Because a lot of times the demo show this (sounds like that session expired or something like that) NotFound: session id e6066d98-a3d1-489d-b91d-e44cdb616539 for agent instance 1ed2ee6d-9f40-4c62-bd2a-089081cef547 Full response: |
@huesoamz That's correct, the error message will appear when the app can't connect to the assistant (when it times out after approx 5 mins, or you lose connection to the assistant). By refreshing the page the app creates a new session ID and can interact with the assistant. |
And how can increase that time?, 5 minutes its not enough and how customize the message for that error? (portuguese...spanish) I had more than 5 bots for migrate to this version (assistantv2 from conversation) and need to change that because are bots on produtions enviroments. |
@huesoamz The timeout limit can be found in the assistant settings. Go to your Assistant and click on the Settings option (found on the right-hand side of the screen). Then select the Inactivity Timeout option from the left-hand menu. It will show you the timeout limit applied to your assistant. Please note different plans have different maximum limits - for more information go to https://cloud.ibm.com/docs/services/assistant?topic=assistant-assistant-settings#assistant-settings. |
Oliver very thanks for your support but the URL that you provide doenst work, I general we use "standard" plan, but the maximum in that cases its only 5 minutes.. EDIT: I confirmed that it's the language that your browser is set to. I changed my browser language to English and works the page, so I can see the plans: And the other question is...why if my Assistant its on spanish I receive a message on english? how can customize this message "I'm having trouble connecting to the server, please refresh the page " EDIT2: I found the text on this file: I think that would be better if we set that text on app.js (in server) not in "public/js" like: and on api.js something like: |
I have problems with my credentials since, I follow all the steps that indicate but it always answers me the following when I execute the command line npm start
"I'm having trouble connecting to the server, please refresh the page"
Attached url with some images of my credentials https://drive.google.com/drive/folders/1mwT8pzuU7EGQkOn8TJiR1yUmZ06I_gwB?usp=sharing
The text was updated successfully, but these errors were encountered: