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

Proxy Setup fail with self-hosted runner #558

Closed
2 of 5 tasks
yannou38 opened this issue Oct 23, 2024 · 6 comments
Closed
2 of 5 tasks

Proxy Setup fail with self-hosted runner #558

yannou38 opened this issue Oct 23, 2024 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@yannou38
Copy link

yannou38 commented Oct 23, 2024

Description:
When trying to use the action, i get an error when the action try to set the proxy object

New-Object : La valeur fournie n'est pas valide ou la propriété est en lecture seule. Modifiez la valeur, puis 
réessayez.
Au caractère C:\ghr\IOTSEC-gh-actions\1\_work\_actions\actions\setup-dotnet\c7e7147fd3e41056e75a761416c06f5fa781b5fb\ex
ternals\install-dotnet.ps1:366 : 45
  ... ttpClientHandler.Proxy =  New-Object System.Net.WebProxy -Property @{
                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      CategoryInfo          : InvalidData : (:) [New-Object], Exception
      FullyQualifiedErrorId : SetValueException,Microsoft.PowerShell.Commands.NewObjectCommand

Task version:
commit id c7e7147

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Repro steps:

  • Set a proxy in system env variable on your selfhosted runner
  • run action
- name: test setup dotnet
        id: testdotnet
        uses: actions/setup-dotnet@c7e7147fd3e41056e75a761416c06f5fa781b5fb
        with:
          dotnet-version: '7'

Expected behavior:
Proxy should be set and dotnet should get downloaded

Actual behavior:
Error pasted above

@yannou38 yannou38 added bug Something isn't working needs triage labels Oct 23, 2024
@priyagupta108
Copy link

Hi @yannou38 👋,
Thank you for your report. We'll investigate the issue and get back to you with the details!

@gowridurgad gowridurgad self-assigned this Nov 1, 2024
@gowridurgad
Copy link

gowridurgad commented Nov 5, 2024

Hi @yannou38, We are unable to reproduce the error you are experiencing. We've successfully installed the dotnet without encountering any errors.
Here are a few troubleshooting steps to help resolve the issue.

  • Proxy Settings: Verify that your proxy settings are correctly configured and that the values provided are valid.
  • Try Different Proxy: If possible, test with a different proxy server to rule out issues specific to the current proxy.
  • Check Self-Hosted Runner Configuration: Ensure that the self-hosted runner is configured correctly and has the necessary permissions to set the proxy and run the script.
  • Run Script Locally: Try running the install-dotnet.ps1 script locally to see if the issue persists outside of the GitHub Actions environment.

If the problem continues, please provide more details about your environment, setup and attach link to the build or public repository. So we can assist further.

@gowridurgad
Copy link

Hi @yannou38, Just a gentle reminder regarding this issue, If you have any updates or need further assistance, Please let us know.

1 similar comment
@gowridurgad
Copy link

Hi @yannou38, Just a gentle reminder regarding this issue, If you have any updates or need further assistance, Please let us know.

@yannou38
Copy link
Author

yannou38 commented Nov 25, 2024

  • Proxy Settings: Verify that your proxy settings are correctly configured and that the values provided are valid.

The settings are correct, the other actions requiring those values work nicely

  • Try Different Proxy: If possible, test with a different proxy server to rule out issues specific to the current proxy.

Not possible as it's my company proxy.

  • Check Self-Hosted Runner Configuration: Ensure that the self-hosted runner is configured correctly and has the necessary permissions to set the proxy and run the script.

The runner should have the needed rights, but what do you call "set the proxy" ? it's already set beforehand.

  • Run Script Locally: Try running the install-dotnet.ps1 script locally to see if the issue persists outside of the GitHub Actions environment.

Haven't tried that yet, as other matters took priority, but i'll try to do so in a reasonable timeframe. I don't expect it to fare better if ran manually however.

If the problem continues, please provide more details about your environment, setup and attach link to the build or public repository. So we can assist further.

I can not share details about the build as it's private, company owned. The self-hosted runner is on a windows machine and not containerized if that helps. I would like to point out we barely use marketplace actions however, favoring in-house developped action, and thus don't have much experience using marketplace actions.

Edit: this action work fine on a containerized instance, so it might be linked to my system. As pointed out before, i'll try to devote more time working on it

@gowridurgad
Copy link

Hi @yannou38, Since the action works as expected in a containerized instance, it seems the issue may be specific to your system . I understand you can't share the private build, but if you’re able to reproduce the issue in a public repository, please feel free to share it. I’m going to close this issue for now, but we’re here to assist you should you need any additional support. Feel free to reach out or reopen the issue if needed.

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

No branches or pull requests

3 participants