Steveorevo / node-red-contrib-nbrowser

Provides a virtual web browser (a.k.a. "headless browser") appearing as a node.
34 stars 13 forks source link

why doesn't it work basic autenticate #22

Open addoda opened 5 years ago

addoda commented 5 years ago

I use the nbrowser and I find it very good, but I get an error message when I try to use the basic autentication. Error: "TypeError: Cannot read property 'apply' of undefined" I'm trying: Methods: on Authenticate(username; password) and gotoURL What else needs to be configured to apply basic authentication. ( Node-Red ver.:0.20.6 and node-red-contrib-nbrowser ver.:1.1.4 )

Steveorevo commented 5 years ago

Hello Addoda, To help resolve this issue, we'll need some basic code to reproduce this it. Can you submit the JSON of your flow and/or a basic server side code that initiates the auth you are attempting to access?

addoda commented 5 years ago

I tried this: node_01 node_02

[{"id":"6c11c184.79ce5","type":"debug","z":"f3743ced.0ee8e","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":650,"y":1360,"wires":[]},{"id":"e1fb09f3.169ca8","type":"inject","z":"f3743ced.0ee8e","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":240,"y":1360,"wires":[["e2831040.02825","6c11c184.79ce5"]]},{"id":"e2831040.02825","type":"nbrowser","z":"f3743ced.0ee8e","name":"","methods":[{"name":"onAuthenticate","func":"authenticate","params":[{"type":"str","value":"my_username","typeDefault":"str"},{"type":"str","value":"my_password","typeDefault":"str"}]},{"name":"gotoURL","func":"goto","params":[{"type":"str","value":"http://fomix.hu/addoda_test/index.html","typeDefault":"str"}]}],"prop":"nbrowser","propout":"payload","object":"msg","objectout":"msg","close":false,"show":false,"ssl":false,"outputs":1,"x":460,"y":1300,"wires":[["6c11c184.79ce5"]]}]