Skip to content

can't seem to run nodejs scripts in eclipse #330

Closed

Description

@glend1

I've written a script and im trying to run it to view it in the console in Eclipse but when I click the run button i just get a "Starting run session Launching program" message and it hangs at 37%. Whats wrong with my setup?

Activity

  1. mickaelistria commented on Jan 21, 2020

    @mickaelistria
    Contributor

    Can you please elaborate how you're trying to run this? What is your version of node.js?

  2. glend1 commented on Jan 21, 2020

    @glend1
    Author

    node version is v12.14.1. I am running it by pressing the run button in the toolbar. "node.js application", the configuration of which is mostly empty. ${workspace_loc:/sorter/app.js} as the main file and sorter as the project.

  3. mickaelistria commented on Jan 21, 2020

    @mickaelistria
    Contributor

    the default terms/values you're seeing seem different than usual Wild Web Developer ones; can you please share a screenshot of the launch configuration?

  4. glend1 commented on Jan 21, 2020

    @glend1
    Author

    Untitled-1

  5. mickaelistria commented on Jan 21, 2020

    @mickaelistria
    Contributor

    This Launch configuration is not from Wild Web Developer. Please the other one (with lower-case 'a' in "application").

  6. glend1 commented on Jan 21, 2020

    @glend1
    Author

    That one does the same thing. Environment is empty and Debug adapter is also empty (override defaults is unchecked).

  7. glend1 commented on Jan 22, 2020

    @glend1
    Author

    Did a complete reinstall of eclipse removed all previous artifacts too. installed "Eclipse IDE for JavaScript and Web Developers" of eclipse and WWD. I get the same error, this time there is no configuration from the config window.
    Untitled-1

  8. mickaelistria commented on Jan 22, 2020

    @mickaelistria
    Contributor

    Can you please create a configuration and fill it wit the expected values and see what happens?

  9. glend1 commented on Jan 22, 2020

    @glend1
    Author

    The script runs. However, im still stuck with a never ending progress bar, it says "starting run session: initializing connection to debug adapter"

  10. PyvesB commented on Jan 22, 2020

    @PyvesB
    Contributor

    I've also observed this quite a few times, even though I don't use these NodeJS script launches often.

  11. mickaelistria commented on Mar 13, 2020

    @mickaelistria
    Contributor

    I'm closing this one as Node.js scripts do run.
    Please open a separate ticket for non-ending progress bar.

  12. emrecio commented on Jun 6, 2020

    @emrecio

    I know this issue is closed, but I am having the identical problem. I created a project, created one source file "foo.js" with two lines: "var foo = 1 + 1; foo;". When I click on run, it gets to 37% with "Starting run session: Launching program" and it just hangs there Eclipse 2020-03, Node (installed on /usr/local/bin) v 12.18.0. I copied and pasted this into node console, and it worked just fine.

  13. a82kd commented on Jun 7, 2020

    @a82kd

    Yes, I also have the same issue with this combination of versions

  14. acarstoiu commented on Jun 23, 2020

    @acarstoiu

    Please reopen this bug. I'm using latest Eclipse 4.16 with latest Wild Web Developer 0.10.0.202006021616 and I see this behaviour every time I launch a Node.js file, via the Run As -> Node program context menu or a launch configuration of type Node.js application.

    If the application has no output, the Console view hangs as well. Otherwise, the app finishes just nice in the Console view, but the progress bar remains active in the Progress view.
    Also, occasionally (after an Eclipse restart), the launch would not succeed at all, even for applications with output. It just hangs.

  15. mickaelistria commented on Jun 23, 2020

    @mickaelistria
    Contributor

    @acarstoiu Please open a new ticket with as precise as possible steps how to reproduce.

  16. petesuch commented on Sep 29, 2020

    @petesuch

    here is a screenshot of what they are probably talking about...
    Screenshot - 9_29_2020 , 11_16_10 AM
    Screenshot - 9_29_2020 , 11_17_57 AM

  17. mickaelistria commented on Sep 29, 2020

    @mickaelistria
    Contributor

    @petesuch Can you try installing the node embedder from https://download.eclipse.org/wildwebdeveloper/releases/latest/ ?

  18. acarstoiu commented on Nov 10, 2020

    @acarstoiu

    Nope, that doesn't fix it. I'm running Wild Web Developer 0.10.4.20200921215 on Eclipse 4.17 and the behaviour stays the same, in the sense that the Console view doesn't hang anymore but the progress bar of the task in the Progress view hangs just as in @petesuch's screenshots.

  19. mickaelistria commented on Nov 11, 2020

    @mickaelistria
    Contributor

    Do I get it right that the node program does execute, and the issue is that the progress bar is still here?
    If so, can someone check

    • the running processes: is the node process still alive at that time
    • run jstack and report the state of the various threads to sort out what can be locking this progress
      ?
  20. acarstoiu commented on Nov 11, 2020

    @acarstoiu

    Started a new Eclipse instance with one window in Resource perspective with one JS file open, issued the Run command and waited to see what happens. I have three Node.js processes alive and a hanged progress bar indicator reading "Starting run session: Launching program". The console displays what was expected from the dummy program I ran and is labelled "<terminated>".

    The output of

    jstack -l -e 11492 > jstack.txt
    

    is attached (11492 is Eclipse's PID).

    jstack.txt

  21. mickaelistria commented on Nov 11, 2020

    @mickaelistria
    Contributor

    I have three Node.js processes alive

    Can you please share which commands were actually running?

  22. acarstoiu commented on Nov 11, 2020

    @acarstoiu

    I pressed Run As -> Node program context menu on a simple file called lang.js. Nothing else, I kept it as simple as possible.

  23. mickaelistria commented on Nov 11, 2020

    @mickaelistria
    Contributor

    Sorry, I wasn't clear. I was more asking for the commands of the started node process, as they appear in your process list. This is to know whether the expected node process is active or not.

  24. acarstoiu commented on Dec 12, 2020

    @acarstoiu

    Sorry for the 1 month delay 😏
    After installing the latest Wild Web Developer 0.10.5.202012011111, I tested again and can say that the launched Node.js program does not remain running, it is only Eclipse that thinks so.
    So, it's just the Progress view that is wrong.

  25. mickaelistria commented on Dec 12, 2020

    @mickaelistria
    Contributor

    Thanks for the feedback. The progress issue is tracked by #581 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions