AggregateError/ECONNREFUSED in console

Error logged in console when I run slicemachine. Everything works, but how to get rid of this error?

AggregateError
    at internalConnectMultiple (node:net:1114:18)
    at afterConnectMultiple (node:net:1667:5) {
  code: 'ECONNREFUSED',
  [errors]: [
    Error: connect ECONNREFUSED ::1:443
        at createConnectionError (node:net:1634:14)
        at afterConnectMultiple (node:net:1664:40) {
      errno: -61,
      code: 'ECONNREFUSED',
      syscall: 'connect',
      address: '::1',
      port: 443
    },
    Error: connect ECONNREFUSED 127.0.0.1:443
        at createConnectionError (node:net:1634:14)
        at afterConnectMultiple (node:net:1664:40) {
      errno: -61,
      code: 'ECONNREFUSED',
      syscall: 'connect',
      address: '127.0.0.1',
      port: 443
    }
  ]
}

Hi Cody, this likely happens because Slice Machine is trying to access localhost over HTTPS (note the :443 in the errors).

localhost` typically is not accessible over HTTPS unless you have a local certificate set up.

If you do not have a certificate set up, could you confirm your slicemachine.config.js file does not contain https:// under the localSliceSimulatorURL property? It should be http:// instead (no s).

Hi,

It's currently http without s.

Hi Cody,

have you noticed that the log gets displayed at a certain time? Or right when you launch SliceMachine? Are you connected to Prismic via SM? Can you properly login? Also, do you happen to use a fire vault?

Hi @hugo.villain,

It happens every time I navigate around in SM.
I did logged in to Primic via SM. Like I said, everything run normally except for the error log.
I don't know what a fire vault is.

Hi @codyslexia, that error seems to come from Amplitude, a service we use within Slice Machine.

Until we find a way to suppress that error, you can disable the code that throws that error like this:

  1. Create a .prismicrc file in the root of your project.
  2. Put this in the file:
    telemetry=false
    
  3. Restart Slice Machine.

Let us know how it goes! :slightly_smiling_face:

2 Likes

This way working with me. Thank you so much

1 Like