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 in set-up java 17 #653

Closed
3 of 5 tasks
yuvalavr24 opened this issue Jul 21, 2024 · 2 comments
Closed
3 of 5 tasks

Bug in set-up java 17 #653

yuvalavr24 opened this issue Jul 21, 2024 · 2 comments
Labels
bug Something isn't working needs triage

Comments

@yuvalavr24
Copy link

yuvalavr24 commented Jul 21, 2024

Description:
Set-up java 17 failed in all the distributions: adopt, corretto, temurin.

Task version:

  • v3
  • v4

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Expected behavior:
Set-up java 17 works normally.

Actual behavior:
Failed with this error:
Error: The operation would yield an incorrect node tree. Cannot insert a text node as a child of a document node. Node is #text.

@yuvalavr24 yuvalavr24 added bug Something isn't working needs triage labels Jul 21, 2024
@Nanamare
Copy link

@yuvalavr24 Same problem. How to resolved ~?

@JandaTheMan
Copy link

@Nanamare
This issue is related with a post java installation step of the action that attempts to write the toolchain.xml file in the settings repository:

  const settingsDirectory =
    core.getInput(constants.INPUT_SETTINGS_PATH) ||
    path.join(os.homedir(), constants.M2_DIR);

The code above defines the settings directory in toolchains.ts of the source code of the action.

After java is installed, unless the overwrite-settings are set to false, the action tries to overwrite the toolchain.xml file created.
Currently, there exists an open issue where for self-hosted runners, this file is not overwritten but information is appended.
I faced same issue and when I debugged the job, I found that my file was huge. I did not check the actual issue in depth since it was +40k long yet I saw a lot of repeated configurations and I expected some malformation of the file.

After the file was deleted, the issue is fixed.

Note that this may happen again at some point because of the previous open issue I mentioned.
This is only a workaround to fix the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage
Projects
None yet
Development

No branches or pull requests

3 participants