Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Java Tool Installer task failed after release 0.230.2 #19244

Closed
1 of 4 tasks
huzefa-c opened this issue Nov 7, 2023 · 9 comments
Closed
1 of 4 tasks

[BUG]: Java Tool Installer task failed after release 0.230.2 #19244

huzefa-c opened this issue Nov 7, 2023 · 9 comments
Labels
Area: ABTT Akvelon Build Tasks Team area of work bug Task: JavaToolInstaller

Comments

@huzefa-c
Copy link

huzefa-c commented Nov 7, 2023

Task name

Java Tool Installer

Task version

0.230.2

Environment type (Please select at least one enviroment where you face this issue)

  • Self-Hosted
  • Microsoft Hosted
  • VMSS Pool
  • Container

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

No response

Operation system

Windows_NT

Task log

2023-11-07T11:06:38.3917303Z ##[section]Starting: Use Java 11
2023-11-07T11:06:39.6356130Z ==============================================================================
2023-11-07T11:06:39.6356999Z Task         : Java tool installer
2023-11-07T11:06:39.6357922Z Description  : Acquire a specific version of Java from a user-supplied Azure blob or the tool cache and sets JAVA_HOME
2023-11-07T11:06:39.6358715Z Version      : 0.230.2
2023-11-07T11:06:39.6359285Z Author       : Microsoft Corporation
2023-11-07T11:06:39.6360153Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/tool/java-tool-installer
2023-11-07T11:06:39.6361022Z ==============================================================================
2023-11-07T11:06:41.8266205Z ##[error]Unhandled: globalThis is not defined
2023-11-07T11:06:41.8354554Z ##[error]ReferenceError: globalThis is not defined
    at Object.<anonymous> (C:\devops-agent\cats-scent-dev\_work\_tasks\JavaToolInstaller_c0e0b74f-0931-47c7-ac27-7c5a19456a36\0.230.2\node_modules\@azure\core-util\dist\index.js:259:20)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (C:\devops-agent\cats-scent-dev\_work\_tasks\JavaToolInstaller_c0e0b74f-0931-47c7-ac27-7c5a19456a36\0.230.2\node_modules\@azure\core-http\dist\index.js:9:16)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
2023-11-07T11:06:41.8427843Z ##[section]Finishing: Use Java 11

Relevant log output

Unhandled: globalThis is not defined
ReferenceError: globalThis is not defined
    at Object.<anonymous> (C:\devops-agent\cats-scent-dev\_work\_tasks\JavaToolInstaller_c0e0b74f-0931-47c7-ac27-7c5a19456a36\0.230.2\node_modules\@azure\core-util\dist\index.js:259:20)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (C:\devops-agent\cats-scent-dev\_work\_tasks\JavaToolInstaller_c0e0b74f-0931-47c7-ac27-7c5a19456a36\0.230.2\node_modules\@azure\core-http\dist\index.js:9:16)
    at Module._compile (internal/modules/cjs/loader.js:778:30)

Aditional info

No response

@srinivas46
Copy link

Hey, Please update your agents on agent pool. it works for me

Thanks

@dravecky
Copy link

dravecky commented Nov 8, 2023

Hey, Please update your agents on agent pool. it works for me

Thanks

It works thank you.

@codegeass1
Copy link

Same, what minimum version of Azure Pipeline Agent is required ? Or is this a bug that should be fixed on task ?

@max-zaytsev max-zaytsev added Task: JavaToolInstaller Area: ABTT Akvelon Build Tasks Team area of work and removed Area: Release triage labels Nov 9, 2023
@NelsonLamprecht
Copy link

NelsonLamprecht commented Nov 9, 2023

Updating to on-prem Agent 3.227.2 works...

@sicil1ano
Copy link

sicil1ano commented Nov 10, 2023

For anyone else struggling with this problem, I updated the Self-Hosted Windows agent that I had problems with, from version 2.142.3 to version 3.227.2. The update did not take long (less than a minute), but I guess it depends on the agent. The agent might go offline for a short time, and going back online with the updated version. I do not think there is a minimum version of the agent required.

@mklenbw
Copy link

mklenbw commented Nov 14, 2023

Still getting this issue on Hosted-Agent 3.227.2

Using versions:
Current agent version: '3.227.2'
Current image version: '20231030.2.0'
Downloading task: UseDotNet (2.230.0)
Downloading task: NodeTool (0.230.0)
Downloading task: npmAuthenticate (0.230.0)
Downloading task: Bash (3.229.0)
Downloading task: CmdLine (2.229.0)
Downloading task: Npm (1.230.0)
Downloading task: PublishTestResults (2.230.0)
Downloading task: PublishCodeCoverageResults (1.228.0)
Downloading task: SonarQubePrepare (5.17.2)
Downloading task: JavaToolInstaller (0.230.2)
Downloading task: SonarQubeAnalyze (5.17.2)
Downloading task: SonarQubePublish (5.4.2)
Downloading task: NexusIqPipelineTask (1.7.9)
Downloading task: AWSCLI (1.13.0)
Downloading task: S3Upload (1.13.0)

@etienne6
Copy link

We rolled-back to version 0.229.0 of the task, and we're using the Microsoft hosted window's-latest image. Worked fine for us.
Not sure if using 0.230.2 version of the task is critical to your pipeline but this could be temp fix for people who are just looking to get the task working.

The caveat is that, the minor version of the task can only be specified if that specific version has been used in your Azure DevOps org before. See - https://github.com/MicrosoftDocs/azure-devops-docs/issues/8351

@aleksandrlevochkin
Copy link
Contributor

This issue should be fixed by this PR #19391
A new version of the task (v0.233) with the fix has just been released.

@aleksandrlevochkin
Copy link
Contributor

Closing this as the problem is fixed. Feel free to reopen if you still have the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: ABTT Akvelon Build Tasks Team area of work bug Task: JavaToolInstaller
Projects
None yet
Development

No branches or pull requests

10 participants