open-rpa / node-red-contrib-tagui

Mozilla Public License 2.0
8 stars 4 forks source link

Error 255 when running example code #3

Closed Manderikoo closed 3 years ago

Manderikoo commented 3 years ago

Hello, I am experiencing an error when running the TagUI node. Since I am using the example workflow provided on the node's information page, I do not think the issue lies in the connection with the other nodes. Here are some screenshots showing the error I received when injecting into the node.

image

image

For additional information, I am using the local version of OpenIAP's NodeRed on a Windows 10.

skadefro commented 3 years ago

Unless tagui also has an storage module, this look like an issue with nodered, not tagui or node-red-contrib-tagui. How did you install and run the nodered ? If using openiap's nodered, it will tell nodered to use openiap's storage provider instead of the built in one, so this really sounds like an openiap issue.

Manderikoo commented 3 years ago

I am using the OpenIAP's nodered like you said. I installed it using NPM onto my windows like the instructions listed on the OpenFlow Github page. The only difference is that I installed noderedlocal instead of noderedremote. Does noderedlocal use openiap's storage provider?

skadefro commented 3 years ago

And how did you install your local openflow ? docker/npm, from source ?

Manderikoo commented 3 years ago

Also with NPM if I recall correctly.

skadefro commented 3 years ago

It would be super helpfull if you started giving more informartion, than simple answers. What does the log say, is nodered connected, has it registered its queues, does openflow show any issues, did the nodered authenticate successfull etc ?

skadefro commented 3 years ago

using

pm2 logs --lines 100

and

pm2 monit

can be very helpfull when troubleshooting ( when using monit, then in a seperate commandline restart the services with pm2 restart [id]

skadefro commented 3 years ago

when starting cmd, make sure to use "run as administrator". A normal user is not allowed to connect to the namepipe pm2 is listening on, on windows.

Manderikoo commented 3 years ago

Sorry for being brief, I have a shallow understanding of everything involved, so I don't know how to obtain or identify information that would be helpful. That being said, I will try my best nonetheless.

Also, yes, I just realized that I was not running as administrator, hence why I deleted the previous reply. haha

Here's the result from the logs after running pm2 restart: image And the dashboard from pm2 monit: image and the info provided by the command line after running the restart command: image

Also it seems like at least the tagui logo has returned after the restart. image

skadefro commented 3 years ago

The "cut" is weird .... do you have any idear where that could come from ? as far as i can remember the only place where nodered is executing something, is when installing npm packages doing start up. is there some special charecters in the path to where nodered configs are placed ? ( where did you place the .env files )

Manderikoo commented 3 years ago

No.. I don't recall using or seeing "cut" anywhere for anything in OpenAPI or TagUI, and I think my nodered configs are placed in a pretty standard location: image

skadefro commented 3 years ago

That is strange .... what about your user profile ? Does that contain something including "cut" ? Maybe its the tagui module that is trying to execute something ( for instance when setting permissions ) that "trips" it.

skadefro commented 3 years ago

oohh, wait ... That's it ...

skadefro commented 3 years ago

could you stop nodered ( pm2 stop 1 ) and then from a NORMAL cmd, not the admin one, run this command, go to c:\openflow and run openflow-nodered-cli --run noderedlocal

Manderikoo commented 3 years ago

Okay, here's what I have so far. Not sure if its still running because it's stalling at the last line.

image

skadefro commented 3 years ago

I see "nlp" .. could it be, that module is triggering something that could end up with the "cut" error ? ( i don't know that module ) anyway, try re-adding the missing modules and keep an eye on the console and see what happens :-)

Manderikoo commented 3 years ago

Okay, I have reinstalled all the missing modules (tagui, image output and nlp), and here is what I got:

image image

Manderikoo commented 3 years ago

Here is what I get after trying to inject into the tagui node again: image image image

skadefro commented 3 years ago

Perfect, and does the tagui node work now ? if not, is there any errors in the console ?

skadefro commented 3 years ago

Ah, ok, you just added an error .... That part is abit out of my compentancy, i need @kensoh for that one ( see the first image in the latest message )

kensoh commented 3 years ago

Hi Guys, adding my inputs -

  1. cut is used by TagUI and it is packaged together with the TagUI_Windows.zip under tagui\src\unx folder. However, perhaps anti-virus software or other reasons it might be removed? (assuming the cut error message if from TagUI process)

  2. TagUI has a npm module at https://www.npmjs.com/package/tagui but it is obsolete already, not sure if you tried to install it. Don't install that. The Node-RED TagUI module that Allan has created will take care of downloading and installing TagUI

  3. If it is the error message here - https://github.com/open-rpa/node-red-contrib-tagui/issues/3#issuecomment-888205661 it looks like the npm anzip module is missing in the Node-RED TagUI module at this line - https://github.com/open-rpa/node-red-contrib-tagui/blob/main/src/tagui.ts#L34

For me when I install the Node-Red TagUI module it works like a breeze.

npm
tagui
Command-line tool for digital process automation (RPA)
GitHub
node-red-contrib-tagui/tagui.ts at main · open-rpa/node-red-contrib-tagui
Contribute to open-rpa/node-red-contrib-tagui development by creating an account on GitHub.
kensoh commented 3 years ago

Hi Allan, adding on to above, we found the root cause of the 'cut' error.

It looks like in below line, you define the URL to download for Windows. However, in the the if-else statement right after, there is only a check for darwin (macOS), and else everything falls under Linux. I think that's why on Amanda's laptop the Linux version is installed. For Linux version of TagUI, I didn't package in the tagui\src\unx files which are Windows versions of those Linux commands used by TagUI.

https://github.com/open-rpa/node-red-contrib-tagui/blob/main/src/tagui.ts#L57

Another data point to add on is, after Amanda try to install the missing anzip module and restarted the application using pm2, the 255 error with 'cut' is not recognised error comes back.

GitHub
node-red-contrib-tagui/tagui.ts at main · open-rpa/node-red-contrib-tagui
Contribute to open-rpa/node-red-contrib-tagui development by creating an account on GitHub.
kensoh commented 3 years ago

Adding on, in my Zoom Q&A call with Amanda, I made a copy of her local working TagUI installation to the folder where the Node-RED module is looking for --> %userprofile%\tagui directory. And it works now 🎉

skadefro commented 3 years ago

Thank you for pointing out the issue with platform check. I have pushed a fix and updated on npm and on flows.nodered.org Can we close the issue now or is there still issues ? ( sounds like it has been fixed ? )

kensoh commented 3 years ago

Oh yes of course, your fix will download the right TagUI_Windows.zip and there shouldn't be issue anymore. Yesterday, we replaced the tagui folder used by Node-RED TagUI with the TagUI_Windows.zip and there's no more error. Thank you Allan!

(please close the issue, or Amanda if you see this you can close the issue. I don't have access to close this issue)

Manderikoo commented 3 years ago

Thank you to both @skadefro and @kensoh so helping me solve this issue!