alefragnani / vscode-jenkins-status

Jenkins Status Extension for Visual Studio Code
MIT License
27 stars 20 forks source link

Error When Jenkins Outputting In Console (Windows) #56

Closed yukopangestu closed 3 years ago

yukopangestu commented 3 years ago

Hi,

first of all, i have an issue which when i ctrl + p then choose "Open In Jenkins (Console Output) it have this in the console instead

[2020-08-27 21:28:34.655] [renderer1] [error] command 'Jenkins.undefined.openInJenkinsConsoleOutput' not found: Error: command 'Jenkins.undefined.openInJenkinsConsoleOutput' not found
    at u._tryExecuteCommand (file:///C:/Users/ASUS/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:4029:836)
    at file:///C:/Users/ASUS/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:4029:717
    at processTicksAndRejections (internal/process/task_queues.js:85:5)

I'm using the latest visual studio and the latest version of the plugin

however, i also want to suggest some points that might make this plugin more fun

  1. adding custom terminal output like other plugins Untitled

  2. can i use polling interval not in minutes but there's an option to choose either minutes or seconds? i want to monitor like every 30 seconds for example

That's all for now from me

alefragnani commented 3 years ago

Hi @yupangestu ,

Based on the console log, it appears the extension wasn’t able to detect the project/job. As you can see it shows undefined in the command it is trying to run (created dynamically).

Could you paste your .jenkins file here, so I could try to understand what is the issue?

Hope this helps

yukopangestu commented 3 years ago

Hi, sorry for the late reply, i happened to have so many plugins developer not replying my message like this...

here is the file configuration, I will blank out since it contains my authentication

{
    "url": "<url>/view/development/job/dev-paper-api-invoicer/",
    "username": "<some user>",
    "password": "<token>"
}
alefragnani commented 3 years ago

Hi @yupangestu ,

You just found a 6 month issue in the Open in Jenkins (Console Output) command 😞 .

Back then, I have fixed the Open in Jenkins command on the same situation, but for some reason missed this command.

I should fix it in this weekend, but as a workaround, until the extension is updated, simply add a ”name”: “your job” entry, just like the multijob samples.

Stay tuned

alefragnani commented 3 years ago

About polling, it expects a number, so I guess if you use 0.5 it should work.

This is what the extension does with it. Just give it a try 😬

 const polling: number = vscode.workspace.getConfiguration("jenkins").get("polling", 0);
    if (polling > 0) {
        setInterval(() => updateStatus(), polling * 60000);
    }

Hope this helps