Skip to content

Run as Node program leaves launching Job behind at 37% #581

Closed

Description

@nitind

eclipse-javascript-2020-12-R-macosx-cocoa-x86_64 / Wild Web Developer 0.10.5.202012011111

If I launch a .js file using the Run as "Node program" option, after it has run to completion, even though the Console view shows the process as terminated, the Progress view and workbench trim show the Launching xxyy job at 37% until I manually cancel them.

Activity

  1. mickaelistria commented on Dec 11, 2020

    @mickaelistria
    Contributor

    Thanks for the report. I can easily reprodce it.

  2. mickaelistria commented on Dec 11, 2020

    @mickaelistria
    Contributor

    Here is a test that reproduces this issue

    	@Test
    	public void testNodeRunDoesntLeaveProgressReport()
    			throws CoreException, IOException, OperationCanceledException, InterruptedException {
    		IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject("someProject");
    		project.create(null);
    		project.open(null);
    		IFile jsFile = project.getFile("hello.js");
    		jsFile.create(new ByteArrayInputStream(new byte[0]), true, null);
    		new NodeRunDebugLaunchShortcut().launch(new StructuredSelection(jsFile), ILaunchManager.RUN_MODE);
    		DisplayHelper.sleep(500);
    		Job launchJob = Arrays.stream(ProgressManager.getInstance().getJobInfos(false)) //
    				.map(JobInfo::getJob) //
    				.filter(job -> job.getName().startsWith("Launching")) //
    				.filter(job -> job.getState() == Job.RUNNING) //
    				.findFirst().get();
    		launchJob.join(500000, null);
    		assertEquals(Job.NONE, launchJob.getState(), "Job not completed");
    	}

    I could track that down to LSP4E, in DSPDebugTarget#initialize, the call to getDebugProtocolServer().launch(dspParameters) returns a never ending future.

  3. mickaelistria commented on Dec 11, 2020

    @mickaelistria
    Contributor

    This is indeed an upstream issue https://git.eclipse.org/r/c/lsp4e/lsp4e/+/173717 attempts to fix that.

  4. acarstoiu commented on Dec 18, 2020

    @acarstoiu

    Just for the record, this issue was discussed in #330 and also reported in #455.

  5. mickaelistria commented on Feb 18, 2021

    @mickaelistria
    Contributor

    Duplicate of #551 , let's close.

  6. mickaelistria commented on Feb 18, 2021

    @mickaelistria
    Contributor

    Duplicate of #551 , let's close.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions