Exec Format error when using AWS CodeArtifact credential provider
I am on MacOS 10.15.
This occurs on both Rider 2020.3.2 and 2020.3.4 (the two versions I have available) on different machines.
I have the latest .Net Core 3.1 SDK installed.
The only nuget source configured is the CodeArtifact one.
I have installed and configured the CodeArtifact nuget credential provider using the guide here (and there is only one version available): https://docs.aws.amazon.com/codeartifact/latest/ug/nuget-cli.html
`dotnet` CLI tools work just fine (can build, restore, test etc without issue) so the credential provider works for CLI tools.
I have the Rider settings for "Use credential providers (requires restart)" set to "NuGet/.Net CLI plugins, then Rider integrated".
I have the Rider settings for "PackageReference restore engine" set to "Console".
I can check out a new repository, build and run it without issue - restores happen fine. I can manually add a package to the csproj file and its restored.
When I open the "nuget" window in Rider, I get prompted for a username and password for the configured nuget source - looking at the logs in that tab, I see the following error:
Querying credential providers for: https://<snip>>/v3/index.json (isRetry: False)
Problem starting the plugin '/Users/richard/.nuget/plugins/netcore/AWS.CodeArtifact.NuGetCredentialProvider/AWS.CodeArtifact.NuGetCredentialProvider.exe'. Exec format error
Exception while querying credential providers for: https://<snip>>/v3/index.json
NuGet.Credentials.PluginException: Problem starting the plugin '/Users/richard/.nuget/plugins/netcore/AWS.CodeArtifact.NuGetCredentialProvider/AWS.CodeArtifact.NuGetCredentialProvider.exe'. Exec format error
---> System.ComponentModel.Win32Exception (8): Exec format error
What am I doing wrong? My other colleagues are using this credential provider in Rider without issue, and we cannot determine whats different about my setup.
Please sign in to leave a comment.
Hi,
Try to set "File | Settings | Build, Execution, Deployment | NuGet" -> Restore engine to MSBuild. Can this help?
K.R.
Sofia
Hi Sofia,
Thank you for the suggestion, no it doesn't help.
I have updated to the latest stable Rider version as well, but still no resolution.
Regards
Richard
Hello,
Unfortunately, there is nothing I can do to help here. It is better to address this issue directly to AWS-toolkit tracker: https://github.com/aws/aws-toolkit-jetbrains/issues.
K.R.
Sofia
I'm not using the `aws-toolkit-jetbrains` package, the package I am referring to here is the CodeArtifact nuget credential provider which I installed using `dotnet`.
I don't see how this is an AWS tool error - its Rider choosing the wrong plugin format for the platform when I go into the UI for nuget. Restoring via command line works just fine, I just cant use Riders UI to search and manage nugets.
`dotnet restore` has no issues using the credential plugin. It just uses the dlls and not the packaged `exe`.
Hi,
I've filed an issue on Rider's tracker: https://youtrack.jetbrains.com/issue/RIDER-64105.
Could you please enable the following trace scenarios in `Help | Diagnostic tools | Choose trace scenarios`:
Then reproduce the issue, collect all logs via `Help | Collect Logs`, disable tracing in `Help | Diagnostic tools | Choose trace scenarios`, and attach the log bundle to the issue https://youtrack.jetbrains.com/issue/RIDER-64105?
Kind regards,
Sofia.