watson-developer-cloud / node-red-labs

Node-RED labs on the use of the Watson Developer Cloud services
MIT License
209 stars 367 forks source link

NLC node fails to connect NLC instance on IBM Cloud #234

Closed oosawak1975 closed 5 years ago

oosawak1975 commented 5 years ago

Starting from around Jan 11th, 2019, NLC node fails to connect NLC instance on IBM Cloud. It was working until Dec 2018. This issue happens on multiple NLC instances on IBM Cloud.

Here is the step to reproduce.

Deploy an NLC instance Deploy a NodeRed Starter Connect 1 and 2 Open Node-RED, then import the flow like below.

[{"id":"deb0d57.1c46528","type":"tab","label":"Flow 1"},{"id":"fbbd7582.e039a8","type":"watson-natural-language-classifier","z":"deb0d57.1c46528","name":"train","mode":"create","language":"ja","classifier":"","collections-off":true,"default-endpoint":true,"service-endpoint":"https://gateway.watsonplatform.net/natural-language-classifier/api","x":480,"y":600,"wires":[["c31b252.b9244d8"]]},{"id":"eb232a4.fb939d8","type":"template","z":"deb0d57.1c46528","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"こんにちは,挨拶\nこんばんは,挨拶\nはじめまして,挨拶\nよろしく,挨拶\nどうも,挨拶\n新規契約したい,新規契約\n携帯電話がほしい,新規契約\n契約したい,新規契約\n乗り換えがしたい,MNP\n番号を継続したい,MNP\nMNPがしたい,MNP\n解約したい,解約\n携帯をやめたい,解約\n契約解除したい,解約","output":"str","x":300,"y":620,"wires":[["fbbd7582.e039a8"]]},{"id":"2a613997.f69466","type":"inject","z":"deb0d57.1c46528","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":120,"y":620,"wires":[["eb232a4.fb939d8"]]},{"id":"c31b252.b9244d8","type":"debug","z":"deb0d57.1c46528","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":680,"y":600,"wires":[]}]

  1. Click the inject node, then you can see "Connection to the server has been disconnected" error.
chughts commented 5 years ago

I think this is related to this bug - https://github.com/watson-developer-cloud/node-red-node-watson/issues/442

The workaround before a fix is applied is supplied with the linked to issue report.

oosawak1975 commented 5 years ago

@chughts I tried the workaround of using http post like If you supply the css file though a file inject or a http post it will work, however, it doesn't fix this issue.

If you supply the css file though a file inject

What do you exactly mean by this in my case?

chughts commented 5 years ago

https://flows.nodered.org/node/node-red-contrib-browser-utils

You can use it to inject the css file into your flow.

oosawak1975 commented 5 years ago

@chughts thanks. I managed to workaround it with file inject node.