actions / setup-dotnet

Set up your GitHub Actions workflow with a specific version of the .NET core sdk
MIT License
950 stars 473 forks source link

Proxy Setup fail with self-hosted runner #558

Open yannou38 opened 1 month ago

yannou38 commented 1 month ago

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 c7e7147fd3e41056e75a761416c06f5fa781b5fb

Platform:

Runner type:

Repro steps:

Actual behavior: Error pasted above

priyagupta108 commented 1 month ago

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

gowridurgad commented 2 weeks ago

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.

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 commented 1 week ago

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

gowridurgad commented 12 hours ago

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

yannou38 commented 11 hours ago
  • 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