watson-developer-cloud / node-red-node-watson

A collection of nodes for the IBM Watson services
Apache License 2.0
82 stars 86 forks source link

Node watson-conversation-v1 reports "Resource not found" after upgrade from 0.7.X to 0.9.2 #474

Closed janvda closed 4 years ago

janvda commented 4 years ago

I have used node watson-conversation-v1 for quite some time without a problem. Very recently it stopped working so I decided to upgrade the node to version 0.9.2

I also had to adapt the node configuration. So I have set the API key. I have changed the service endpoint into: https://api.us-south.assistant.watson.cloud.ibm.com/instances/c563bed1-31d9-4922-ad1b-1269fe370283/v1/workspaces/516e235f-c9ac-4003-aed3-0bf0b079074e/message

image

The problem is that I am getting error "Resource not found" and I have no clue what this means and what I need to do to fix this.

FYI my Skill Details

Skill Name:aiy dutch
Skill ID:516e235f-c9ac-4003-aed3-0bf0b079074e
Legacy v1 Workspace URL:https://api.us-south.assistant.watson.cloud.ibm.com/instances/c563bed1-31d9-4922-ad1b-1269fe370283/v1/workspaces/516e235f-c9ac-4003-aed3-0bf0b079074e/message

Service Credentials
Service Credentials Name:Auto-generated service credentials
Api Key:OW44...eiK
janvda commented 4 years ago

When I change Service endpoint into: https://api.us-south.assistant.watson.cloud.ibm.com/instances/c563bed1-31d9-4922-ad1b-1269fe370283 then I am getting error send is not a function

chughts commented 4 years ago

Initially you had the endpoint incorrect, but I see that you have corrected that.

The reason that the service would have stopped working, would have been that the service would have been migrated off cloud foundary credentials onto IAM credentials. The IAM support was added in Version 0.7.x of the nodes, so they should work with the new credentials, but you do need the new credentials. If you do use 0.7.x then you need to use an old pattern endpoint, in this case https://api.us-south.assistant.watson.cloud.ibm.com is an alias for https://gateway.watsonplatform.net/assistant/api. As of writing, you can still use them interchangeably.

If your instance is bound, ie when running in the cloud then you need V 0.8.x or above. As this contains a fix to the regex used to determine if the service is bound in.

The send problem is that from V 0.8.x the Watson nodes were migrated to node-red 1.0.x. Which means that you will need to upgrade node-red to at least 1.0.x. The nodes have been tested against node-red 1.0.3.

janvda commented 4 years ago

Thanks for the fast response - upgrading to 1.0.4 did fix the issue for me.