Code Monkey home page Code Monkey logo

Comments (8)

khassel avatar khassel commented on June 23, 2024 1

we have already other problems with the node version which is used by electron v27.2.0 (which is used in the v2.26.0 release).

So you could test with a newer elctron version with npm install [email protected]

from magicmirror.

khassel avatar khassel commented on June 23, 2024 1

I reverted to v2.24.0 (using git checkout e87f50e (hope that this is correct)) and the error has not occurred for several hours. I will wait for some more hours to be sure. Then, I will try to identify the commit that causes the error. From the history, this one (f2957f9) would be my starting point.

you are right so far:

  • we replaced node-fetch with internal fetch provided by nodejs with f2957f9
  • the errors you are posting above are coming from undici which is used by internal fetch
  • the internal fetch is experimental in nodejs v18 and official since v20
  • electron is still using nodejs v18, see https://releases.electronjs.org/, so maybe this is fixed in a future electron version when using a newer nodejs version
  • I don't think we will revert back to node-fetch

Edit: Would be interesting to test the upcoming electron version v29 npm i [email protected] because this contains nodejs v20

from magicmirror.

khassel avatar khassel commented on June 23, 2024
  • is this new with v2.26.0 ?
  • are you using npm start (electron) or npm run server (server only) for starting?

from magicmirror.

sdetweil avatar sdetweil commented on June 23, 2024

in calendar config, please use localhost instead of 0.0.0.0, which means any/all interfaces
@drtorchwood

from magicmirror.

drtorchwood avatar drtorchwood commented on June 23, 2024

in calendar config, please use localhost instead of 0.0.0.0, which means any/all interfaces @drtorchwood

I followed this approach (#3147) but will try with 127.0.0.1 later.

from magicmirror.

drtorchwood avatar drtorchwood commented on June 23, 2024
  • is this new with v2.26.0 ?
  • are you using npm start (electron) or npm run server (server only) for starting?

I'm using npm start. The problem also occurred in v2.25.0 but in a previous version it was working (I don't know which one). However, the calendar file might have been slightly smaller at that time.

I will try to revert to a previous version or shorten the file slightly. Hopefully, I can try this today evening and will report then.

from magicmirror.

drtorchwood avatar drtorchwood commented on June 23, 2024

in calendar config, please use localhost instead of 0.0.0.0, which means any/all interfaces @drtorchwood

I followed this approach (#3147) but will try with 127.0.0.1 later.

we have already other problems with the node version which is used by electron v27.2.0 (which is used in the v2.26.0 release).

So you could test with a newer elctron version with npm install [email protected]

I tested both proposals (127.0.0.1 and npm install [email protected]) but they do not solve the issue.

In the meantime, realized that the first time the error occurs, it is slightly different:

[22.01.2024 18:25.23.892] [ERROR] Calendar Error. Could not fetch calendar:  http://127.0.0.1:8090/modules/calendar_files/feiertage2.ics TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:11576:11) {
  cause: SocketError: other side closed
      at Socket.onSocketEnd (node:internal/deps/undici/undici:9790:26)
      at Socket.emit (node:events:526:35)
      at endReadableNT (node:internal/streams/readable:1359:12)
      at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
    code: 'UND_ERR_SOCKET',
    socket: {
      localAddress: '127.0.0.1',
      localPort: 58200,
      remoteAddress: undefined,
      remotePort: undefined,
      remoteFamily: undefined,
      timeout: undefined,
      bytesWritten: 492,
      bytesRead: 441164
    }
  }
}

After that, the messages for every refresh is (as mentioned in the initial post):

[22.01.2024 18:27.30.243] [ERROR] Calendar Error. Could not fetch calendar:  http://127.0.0.1:8090/modules/calendar_files/feiertage2.ics TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:11576:11) {
  cause: Error: read ECONNRESET
      at TCP.onStreamRead (node:internal/stream_base_commons:217:20) {
    errno: -104,
    code: 'ECONNRESET',
    syscall: 'read'
  }
}

I reverted to v2.24.0 (using git checkout e87f50e (hope that this is correct)) and the error has not occurred for several hours. I will wait for some more hours to be sure. Then, I will try to identify the commit that causes the error. From the history, this one (f2957f9) would be my starting point.

from magicmirror.

sdetweil avatar sdetweil commented on June 23, 2024

yes, we know that all that junk is coming from the internal fetch, but we don't know WHY..
this was supposed to get RID of problems.. internal fetch has been around for years and electron just picked it up recently.

from magicmirror.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.