Skylar-Tech / node-red-contrib-matrix-chat

Matrix chat server support for Node-RED
GNU General Public License v3.0
31 stars 10 forks source link

/sync error ConnectionError: fetch failed: fetch failed #81

Closed trizzosk closed 1 year ago

trizzosk commented 1 year ago

Hello,

I use node-red and this module for couple of months. Until 22nd February, everything worked. Since that time I am getting this error:

/sync error ConnectionError: fetch failed: fetch failed
    at MatrixHttpApi.requestOtherUrl (/config/node-red/node_modules/node-red-contrib-matrix-chat/node_modules/matrix-js-sdk/src/http-api/fetch.ts:296:19)
Number of consecutive failed sync requests: 1

The configuration of the module is indeed correct. The error repeats periodically so now no notifications are sent to matrix room. Also no messages are processed from room.

I use node-red together with Home Assitant for several automation workflows. I use Matrix for getting notifications but also for sending and processing incoming messages (turn something on/off, set a sensor value for heating etc.).

Versions:

Home Assistant 2023.3.1
Supervisor 2023.01.1
Operating System 9.5
Frontend 20230302.0 - latest

Node-RED 
Current version: 14.0.3

node-red-contrib-matrix-chat
0.7.0

Any clues?

skylord123 commented 1 year ago

Sometimes other modules will install a dependency that will break HTTP requests. What other modules do you have installed?

trizzosk commented 1 year ago

Well... yesterday I installed the update to node-red 14.0.4 in Home Assistant. After I restarted the add-on all flows started to work, including this module.

To be honest - I have no clues what could be wrong.

skylord123 commented 1 year ago

One of the latest releases of Node-RED added code to prevent modules from overriding the HTTP methods (such as fetch that your error mentioned) so that may have fixed it for you.

You should see a message in your Node-RED log about a module trying to override the method to see which module was the problem child. It should occur when Node-RED starts up (may have to change your logging verbosity).

trizzosk commented 1 year ago

I enabled debug logging on node-red via yaml config. I saw couple of different warnings (definitely not related to my previous issue), but now this module works properly. Pretty strange :) There must be "invisible" auto-issue-solver embeded 🤣 🤣 🤖