GithubHelp home page GithubHelp logo

Error handling for EADDRINUSE about lw.comm-server HOT 11 CLOSED

 avatar commented on August 22, 2024
Error handling for EADDRINUSE

from lw.comm-server.

Comments (11)

cprezzi avatar cprezzi commented on August 22, 2024 1

@jorgerobles Thanks. I will insert the makeSingleInstance into the electron code. That's the most common reason for this error. I probably also need to implement a netstat check if the port is already used by another server.

from lw.comm-server.

 avatar commented on August 22, 2024

https://www.nallex.com/questions/example-of-how-to-handle-eaddrinuse-errors-in-nodejs

from lw.comm-server.

 avatar commented on August 22, 2024

eaddr

from lw.comm-server.

 avatar commented on August 22, 2024

@cprezzi Hi Claudio, do you have any resolutions to capturing this error?
It is being reported by many LW4 users.

from lw.comm-server.

jorgerobles avatar jorgerobles commented on August 22, 2024

Maybe we can specify a range of ports and if catch error open other port (809x).
Downside could be the fill up of all the alternative ports. Have to say 8000/8080 are pretty common ports, maybe we can move to 90xx

https://www.npmjs.com/package/node-netstat could be useful, scanning first if that port is used...

from lw.comm-server.

jorgerobles avatar jorgerobles commented on August 22, 2024

@DarklyLabs have you experienced that error? If so, could use a network diagnose tool to know what is on 8000? Maybe LW is not cleaning up correctly on binary or there's a common software that uses that port.

from lw.comm-server.

 avatar commented on August 22, 2024

Is it possible to only allow one instance of LW to run on a computer at any time?
We have found situations where the computer has gone to sleep and upon awakening chrome crashed but there is still an instance of LW running when we check the processes.

from lw.comm-server.

 avatar commented on August 22, 2024

@jorgerobles We can replicate the error by starting 2 instances of LW.

from lw.comm-server.

jorgerobles avatar jorgerobles commented on August 22, 2024

Yes, as it's using a specific port to launch, means that if is used conflicts each other.
The problem here is the new instance cannot kill the former. Will investigate.

Thanks for the feedback!

from lw.comm-server.

jorgerobles avatar jorgerobles commented on August 22, 2024

@cprezzi https://github.com/electron/electron/blob/master/docs/api/app.md#appmakesingleinstancecallback

from lw.comm-server.

cprezzi avatar cprezzi commented on August 22, 2024

I have implemented the makeSingleInstance function to prohibit starting multiple instances. Instead, the main window is activated.
See commit 52bd4c1

from lw.comm-server.

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.