node-red / node-red

Low-code programming for event-driven applications
http://nodered.org
Apache License 2.0
19.99k stars 3.43k forks source link

http request node resolving https addresses to 127.0.0.1 #4510

Closed maurimuchico-work closed 11 months ago

maurimuchico-work commented 11 months ago

Current Behavior

When using an HTTPS URL, https://www.google.com/, in an HTTP request node it throws a connection refused error with the resolved address being 127.0.0.1. If you use the same domain but as non-secure, http://www.google.com/, it fetches from the correct address. This was previously reported and resolved here: https://github.com/node-red/node-red/issues/3072 and it's related with the community node: dialogflow-full-nodered. It's falling again since node-red 3.1.3 but it was working on node-red 3.0.2.

Expected Behavior

The call to the https server using an http request node should return a response in this case or a remote server error

Steps To Reproduce

  1. Install dialogflow-full-nodered: https://flows.nodered.org/node/dialogflow-full-nodered
  2. Start node-red 3.1.3 environment
  3. Create one flow as you can see in the example flow
  4. Perform the inject and observe the debug window which will display the error

Example flow

[{"id":"8307b12e3691c945","type":"tab","label":"AVS-305","disabled":false,"info":"","env":[]},{"id":"e43a6a107b2cfb3b","type":"step","z":"8307b12e3691c945","name":"TestStepStudio310","token":"e88a649ab2f7fcf98a55d6ec28f5366a","bearer":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Im9TbC1DYkRMamRFWWV0WVU1VTlhaCJ9.eyJodHRwczovL2hhc3VyYS5pby9qd3QvY2xhaW1zIjp7IngtaGFzdXJhLWRlZmF1bHQtcm9sZSI6InVzZXIiLCJ4LWhhc3VyYS1hbGxvd2VkLXJvbGVzIjpbInVzZXIiXSwieC1oYXN1cmEtdXNlci1pZCI6ImF1dGgwfDYwMmZkMjA2YWMwZGNhMDA3MDdkMjEwYiJ9LCJuaWNrbmFtZSI6Im1tdWNoaWNvIiwibmFtZSI6Ik1hdXJpY2lvIiwicGljdHVyZSI6Imh0dHBzOi8vcy5ncmF2YXRhci5jb20vYXZhdGFyLzRiYjQ3MzVhMDk5MjIxZDMyODc3OGQ1YmM3NTU5MjMxP3M9NDgwJnI9cGcmZD1odHRwcyUzQSUyRiUyRmNkbi5hdXRoMC5jb20lMkZhdmF0YXJzJTJGbWEucG5nIiwidXBkYXRlZF9hdCI6IjIwMjMtMTEtMzBUMTE6MTc6NDEuNTc1WiIsImVtYWlsIjoibW11Y2hpY29AYWl2by5jbyIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJpc3MiOiJodHRwczovL2Fpdm90ZXN0LmF1dGgwLmNvbS8iLCJhdWQiOiJNdElpcGxFS2pOMVVDcVdpeUY4RWxtaXNYSmdDTllNbSIsImlhdCI6MTcwMTM0MzA2MywiZXhwIjoxNzAxMzc5MDYzLCJzdWIiOiJhdXRoMHw2MDJmZDIwNmFjMGRjYTAwNzA3ZDIxMGIifQ.xKWIpQpFwaIEITOVW29Vu6hZd-LqL6opxNdt-zsa7CNhNLXMCo54NkYhOPrX5YjybG6yc6Gw15LOJja9upsoCRDbJeQqET70Lc8avBZrYvMUTxnL768VGc1xixLzq1kmrp123SgDuTkyRa44pGFW03CIFyV03dWHn4ALMLs3yFqX6N0mpTTqx0yCRFQums6gsSnwGlRUJh7b9KL0xzpaEKDr0W43ritSkVKm5sgP9EQkg0NmdbEZ2Bm_X8p1iKBV8G1yZoAqkT7Cc2MhVLO4TJjlqPIoTu1-kpq1qXcIQjhZU1Wp2hTywKD-xIwquLDqpwGttyOQtH7UfQQ7X6vcPg","x":320,"y":120,"wires":[["7183e43dc17b9d63","d01b6fba9be3c998"]]},{"id":"391dcd67dddf7d0d","type":"step close","z":"8307b12e3691c945","x":4570,"y":120,"wires":[]},{"id":"ebab9e91e79340b7","type":"answer","z":"8307b12e3691c945","answer":"Hello from Studio 3.1.0","answerValidationPass":"true","x":1470,"y":120,"wires":[["347ac2939f7a75ca","c0f2014b291aca0f"]]},{"id":"7183e43dc17b9d63","type":"channel","z":"8307b12e3691c945","x":500,"y":120,"wires":[["75dc6ccc8825bdd7","6ccee6246ade7b30"]]},{"id":"75dc6ccc8825bdd7","type":"debug","z":"8307b12e3691c945","name":"Channel Data","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":700,"y":180,"wires":[]},{"id":"d01b6fba9be3c998","type":"debug","z":"8307b12e3691c945","name":"Step Data","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":480,"y":180,"wires":[]},{"id":"6ccee6246ade7b30","type":"session-storage","z":"8307b12e3691c945","mode":"PUT","tosend":"{\"ticket\":\"Avs-305\"}","response":"","ready":"true","sessionId":"{{payload.agentbot_user.id}}","inputMethod":"object","inputTypeSelector":"json","x":700,"y":120,"wires":[["60dc2a607d580e5c"]]},{"id":"60dc2a607d580e5c","type":"session-storage","z":"8307b12e3691c945","mode":"GET","tosend":"{\"ticket\":\"Avs-305\"}","response":"","ready":"false","sessionId":"{{payload.agentbot_user.id}}","inputMethod":"object","inputTypeSelector":"json","x":900,"y":120,"wires":[["e569599b07a006e0","13b9ca3e5837af95"]]},{"id":"e569599b07a006e0","type":"debug","z":"8307b12e3691c945","name":"Session Storage Data","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1220,"y":180,"wires":[]},{"id":"13b9ca3e5837af95","type":"condition","z":"8307b12e3691c945","bot":"e88a649ab2f7fcf98a55d6ec28f5366a","condition":"{\"id\":\"6367\",\"type\":\"Site\",\"value\":\"Público\"}","sessionId":"payload.agentbot_user.id","sessionIdInputType":"msg","x":1180,"y":120,"wires":[["ebab9e91e79340b7","efbe6cfd69f70f15"]]},{"id":"efbe6cfd69f70f15","type":"debug","z":"8307b12e3691c945","name":"Condition Data","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1480,"y":180,"wires":[]},{"id":"347ac2939f7a75ca","type":"update-live-agent-status","z":"8307b12e3691c945","name":"Set Coffee","user_bot":"da6e7d0ee660dea3","email":"mmuchico@aivo.co","reasonName":"Coffee break","statusLive":"0","x":1750,"y":120,"wires":[["d74f902e28aeae0f","047abcb002d419b8"]]},{"id":"d74f902e28aeae0f","type":"debug","z":"8307b12e3691c945","name":"Live Agent Status Set","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":2060,"y":180,"wires":[]},{"id":"047abcb002d419b8","type":"derivation","z":"8307b12e3691c945","derivationId":"1000","x":2050,"y":120,"wires":[["d802d929f73496a6","800e23e4d7207ac2"]]},{"id":"d802d929f73496a6","type":"debug","z":"8307b12e3691c945","name":"Derivation Complement","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":2350,"y":180,"wires":[]},{"id":"c0f2014b291aca0f","type":"debug","z":"8307b12e3691c945","name":"Answer Complement","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1780,"y":180,"wires":[]},{"id":"800e23e4d7207ac2","type":"image","z":"8307b12e3691c945","url":"https://filesamples.com/samples/image/jpeg/sample_640%C3%97426.jpeg","validationPass":"true","x":2310,"y":120,"wires":[["1826eed3b0c9efb4","3f203247db125070"]]},{"id":"1826eed3b0c9efb4","type":"debug","z":"8307b12e3691c945","name":"Image Complement","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":2630,"y":180,"wires":[]},{"id":"3f203247db125070","type":"pdf","z":"8307b12e3691c945","url":"https://filesamples.com/samples/document/pdf/sample3.pdf","base64String":"","urlValidationPass":"true","isValidBase64PdfString":"false","base64":"false","x":2610,"y":120,"wires":[["4f51ed66917f8d34","38ee609122243164"]]},{"id":"4f51ed66917f8d34","type":"debug","z":"8307b12e3691c945","name":"PDF Complement","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":2890,"y":180,"wires":[]},{"id":"38ee609122243164","type":"video","z":"8307b12e3691c945","hash":"LH6VWqnzK0s","hashValidationPass":"true","x":2880,"y":120,"wires":[["83d90a32db14915b","ae41c2428f17b3dd"]]},{"id":"83d90a32db14915b","type":"debug","z":"8307b12e3691c945","name":"Video Complement","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":3150,"y":180,"wires":[]},{"id":"ae41c2428f17b3dd","type":"webview","z":"8307b12e3691c945","title":"Engageware","url":"https://engageware.com/","messengerExtensions":"false","urlValidationPass":"true","titleValidationPass":"true","x":3130,"y":120,"wires":[["c18d9bbb99656198","7de737ccbe4356f8"]]},{"id":"c18d9bbb99656198","type":"debug","z":"8307b12e3691c945","name":"Webview Complement","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":3400,"y":180,"wires":[]},{"id":"377076817d4fecfe","type":"debug","z":"8307b12e3691c945","name":"Buttons Complement","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":3680,"y":180,"wires":[]},{"id":"7de737ccbe4356f8","type":"buttons","z":"8307b12e3691c945","blockInput":"false","oneChoice":"false","quickReplies":"false","token":"e88a649ab2f7fcf98a55d6ec28f5366a","buttons":[{"label":"Button Message 1","type":"message","value":"Value Message 1"},{"label":"Button Link 2","type":"link","value":"https://www.aivo.co"}],"isNextStep":false,"integrationsData":[{"id":"aivo-studio|||PruebaES Testing|||ApiClientCall1644503740","name":"PruebaES Testing"},{"id":"aivo-studio|||PruebaES Testing|||ApiClientCall1644505882","name":"PruebaES Testing"},{"id":"aivo-studio|||Prueba LocalHost 1|||ApiClientCall1644506004","name":"Prueba LocalHost 1"},{"id":"aivo-studio|||Creacion Step LocalHost|||ApiClientCall1644516962","name":"Creacion Step LocalHost"},{"id":"aivo-studio|||Step Testing Prueba ES 007|||ApiClientCall1644585396","name":"Step Testing Prueba ES 007"},{"id":"aivo-studio|||Prueba ZD GetForm|||ApiClientCall1645643047","name":"Prueba ZD GetForm"},{"id":"aivo-studio|||Prueba ZD Create TK|||ApiClientCall1645643047","name":"Prueba ZD Create TK"},{"id":"aivo-studio|||PruebaES Test List WA|||ApiClientCall1646862799","name":"PruebaES Test List WA"},{"id":"aivo-studio|||PruebaES Generic Next Step|||ApiClientCall1646862800","name":"PruebaES Generic Next Step"},{"id":"aivo-studio|||Prueba ES FormButton|||ApiClientCall1649182039","name":"Prueba ES FormButton"},{"id":"aivo-studio|||Prueba ES FormButton Call|||ApiClientCall1649182042","name":"Prueba ES FormButton Call"},{"id":"aivo-studio|||Prueba ES Form Three|||ApiClientCall1649256561","name":"Prueba ES Form Three"},{"id":"aivo-studio|||Prueba ES Form Two|||ApiClientCall1649256561","name":"Prueba ES Form Two"},{"id":"aivo-studio|||Prueba ES Form One|||ApiClientCall1649256561","name":"Prueba ES Form One"},{"id":"aivo-studio|||EWInitStep|||ApiClientCall1695067053","name":"EWInitStep"},{"id":"aivo-studio|||TestStepStudio310|||ApiClientCall1701350649","name":"TestStepStudio310"}],"validationPass":"true","x":3360,"y":120,"wires":[["377076817d4fecfe","52ab7319d7070ce4"]]},{"id":"52ab7319d7070ce4","type":"carousel","z":"8307b12e3691c945","slidesCount":"0","slides":[{"title":"Carousel","image":"https://filesamples.com/samples/image/jpeg/sample_1280%C3%97853.jpeg","buttons":[{"label":"View Product Label","type":"message","value":"View Product Value"}]}],"buttonsCount":"1","x":3640,"y":120,"wires":[["2d4e8531712a4da0","5eb5ee28e24ac0bb"]]},{"id":"2d4e8531712a4da0","type":"debug","z":"8307b12e3691c945","name":"Carousel Complement","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":4000,"y":180,"wires":[]},{"id":"5eb5ee28e24ac0bb","type":"form","z":"8307b12e3691c945","blockInput":"false","nextStep":"aivo-studio|||EWInitStep|||ApiClientCall1695067053","inputsCount":"0","inputsArray":[{"type":"text","ref":"refLabel","label":"textLabel","required":"false","regex":"textRegex","callback_label":"textCallBackLabel","options":[]}],"optionsCount":"0","integrationsData":[{"id":"aivo-studio|||PruebaES Testing|||ApiClientCall1644503740","name":"PruebaES Testing"},{"id":"aivo-studio|||PruebaES Testing|||ApiClientCall1644505882","name":"PruebaES Testing"},{"id":"aivo-studio|||Prueba LocalHost 1|||ApiClientCall1644506004","name":"Prueba LocalHost 1"},{"id":"aivo-studio|||Creacion Step LocalHost|||ApiClientCall1644516962","name":"Creacion Step LocalHost"},{"id":"aivo-studio|||Step Testing Prueba ES 007|||ApiClientCall1644585396","name":"Step Testing Prueba ES 007"},{"id":"aivo-studio|||Prueba ZD GetForm|||ApiClientCall1645643047","name":"Prueba ZD GetForm"},{"id":"aivo-studio|||Prueba ZD Create TK|||ApiClientCall1645643047","name":"Prueba ZD Create TK"},{"id":"aivo-studio|||PruebaES Test List WA|||ApiClientCall1646862799","name":"PruebaES Test List WA"},{"id":"aivo-studio|||PruebaES Generic Next Step|||ApiClientCall1646862800","name":"PruebaES Generic Next Step"},{"id":"aivo-studio|||Prueba ES FormButton|||ApiClientCall1649182039","name":"Prueba ES FormButton"},{"id":"aivo-studio|||Prueba ES FormButton Call|||ApiClientCall1649182042","name":"Prueba ES FormButton Call"},{"id":"aivo-studio|||Prueba ES Form Three|||ApiClientCall1649256561","name":"Prueba ES Form Three"},{"id":"aivo-studio|||Prueba ES Form Two|||ApiClientCall1649256561","name":"Prueba ES Form Two"},{"id":"aivo-studio|||Prueba ES Form One|||ApiClientCall1649256561","name":"Prueba ES Form One"},{"id":"aivo-studio|||EWInitStep|||ApiClientCall1695067053","name":"EWInitStep"},{"id":"aivo-studio|||TestStepStudio310|||ApiClientCall1701350649","name":"TestStepStudio310"}],"integration":"aivo-studio|||EWInitStep|||ApiClientCall1695067053","token":"e88a649ab2f7fcf98a55d6ec28f5366a","x":3950,"y":120,"wires":[["24a4b5cd949c1036","2864227f7f5bfead"]]},{"id":"24a4b5cd949c1036","type":"debug","z":"8307b12e3691c945","name":"Form Complement","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":4270,"y":180,"wires":[]},{"id":"8433c89e7258ab17","type":"debug","z":"8307b12e3691c945","name":"Integration Complement","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":4630,"y":180,"wires":[]},{"id":"2864227f7f5bfead","type":"integration","z":"8307b12e3691c945","nextStep":"","token":"","integration":"","x":4250,"y":120,"wires":[["391dcd67dddf7d0d","8433c89e7258ab17"]]},{"id":"a7f6156bd7e36139","type":"http request","z":"8307b12e3691c945","name":"","method":"GET","ret":"txt","paytoqs":"ignore","url":"https://www.google.com","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":590,"y":320,"wires":[["fb299ce4ce497355"]]},{"id":"ed36b06a6b4e6ef9","type":"inject","z":"8307b12e3691c945","name":"","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":390,"y":320,"wires":[["a7f6156bd7e36139"]]},{"id":"fb299ce4ce497355","type":"debug","z":"8307b12e3691c945","name":"debug","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":810,"y":320,"wires":[]},{"id":"da6e7d0ee660dea3","type":"aivo-bot-config","name_config":"TOTVS HOSPITALITY STAGE","bot":"7699f37ab6659f955716802ceaec66e8"}]

Environment

hardillb commented 11 months ago

Duplicate of https://github.com/node-red/node-red/issues/4324

You need to raise this with the author of dialogflow-full-nodered, they have a broken dependency and they need to fix it.

hardillb commented 11 months ago
$ npm list agent-base
broken@ /home/hardillb/temp/broken
└─┬ dialogflow-full-nodered@1.0.10
  └─┬ dialogflow@0.7.0
    └─┬ google-gax@0.20.0
      ├─┬ google-auth-library@2.0.2
      │ └─┬ https-proxy-agent@2.2.4
      │   └── agent-base@4.3.0
      └─┬ grpc@1.24.11
        └─┬ @mapbox/node-pre-gyp@1.0.11
          └─┬ https-proxy-agent@5.0.1
            └── agent-base@6.0.2
maurimuchico-work commented 11 months ago

Thanks @hardillb for your quick response. You can close this ticket then. Regards