-
Notifications
You must be signed in to change notification settings - Fork 848
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
AmazonSecurityTokenServiceClient.AssumeRoleWithSAML or GetSessionTokenAsync fails with exception #1131
Comments
Hi @iprion, I'm sorry to hear you are having difficulties. I was not able to reproduce this issue on a Mac. I could try at a later time to reproduce on a Windows Server 2008 instance. Are the errors you listed related to AssumeRoleWithSAML or GetSessionTokenAsync? |
I'm seeing the same error on Windows Server 2012 R2. |
Hi @pbenitez , @klaytaybai , I have the exact same problem. Did you find the solution? Here is my sample code: using (var stsClient = new AmazonSecurityTokenServiceClient())
Here is my StackTrace: Object reference not set to an instance of an object at Amazon.Runtime.DefaultInstanceProfileAWSCredentials.FetchCredentials() |
I am receiving this error too: |
My issue turned out to be a misconfigured role in AWS. |
There was no exception thrown that stopped my app, it's just in my debug output window and too many of them, my app runs normal, but this happened after I installed AWSSimpleEmail. |
If I create a AmazonSecurityTokenServiceClient, calling AssumeRoleWithSAML fails with an exception:
Same error occurs when calling GetSessionTokenAsync.
Here is a code sample (method was found on the internet and seems to work for the user who wrote it)
In the debug output I see a lot of exception thrown
Exception thrown: 'System.InvalidOperationException' in AWSSDK.Core.dll
Exception thrown: 'System.IO.DirectoryNotFoundException' in mscorlib.dll
Exception thrown: 'System.IO.DirectoryNotFoundException' in mscorlib.dll
Exception thrown: 'Amazon.Runtime.AmazonClientException' in AWSSDK.Core.dll
Exception thrown: 'System.InvalidOperationException' in AWSSDK.Core.dll
Exception thrown: 'System.InvalidOperationException' in AWSSDK.Core.dll
Exception thrown: 'System.InvalidOperationException' in AWSSDK.Core.dll
Exception thrown: 'System.IO.DirectoryNotFoundException' in mscorlib.dll
Exception thrown: 'System.IO.DirectoryNotFoundException' in mscorlib.dll
Exception thrown: 'System.InvalidOperationException' in AWSSDK.Core.dll
Exception thrown: 'System.IO.DirectoryNotFoundException' in mscorlib.dll
Exception thrown: 'System.IO.DirectoryNotFoundException' in mscorlib.dll
Exception thrown: 'System.Net.WebException' in System.dll
Exception thrown: 'System.Net.WebException' in System.dll
Exception thrown: 'System.Net.WebException' in System.dll
Exception thrown: 'System.Net.WebException' in System.dll
Exception thrown: 'System.Net.Sockets.SocketException' in System.dll
Exception thrown: 'System.IO.IOException' in System.dll
Exception thrown: 'System.Net.WebException' in System.dll
Exception thrown: 'System.Net.WebException' in System.dll
Exception thrown: 'System.Net.Sockets.SocketException' in System.dll
Exception thrown: 'System.IO.IOException' in System.dll
Exception thrown: 'System.Net.WebException' in System.dll
Exception thrown: 'System.Net.WebException' in System.dll
Exception thrown: 'System.Net.WebException' in System.dll
Exception thrown: 'System.Net.WebException' in System.dll
Exception thrown: 'System.NullReferenceException' in AWSSDK.Core.dll
Exception thrown: 'System.Net.Sockets.SocketException' in System.dll
Exception thrown: 'System.IO.IOException' in System.dll
Exception thrown: 'System.Net.WebException' in System.dll
Exception thrown: 'System.Net.WebException' in System.dll
Exception thrown: 'System.NullReferenceException' in AWSSDK.Core.dll
Exception thrown: 'System.NullReferenceException' in AWSSDK.Core.dll
Exception thrown: 'System.NullReferenceException' in AWSSDK.Core.dll
Am I missing something ? Other AWS Api and classes seems to work fine (AmazonS3Client, TransferUtility.DownloadDirectory ...)
Expected Behavior
Current Behavior
Possible Solution
Steps to Reproduce (for bugs)
Context
Your Environment
.NET Core Info
dotnet --info
:.NET Core SDK (reflecting any global.json):
Version: 2.1.500
Commit: b68b931422
Runtime Environment:
OS Name: Windows
OS Version: 6.1.7601
OS Platform: Windows
RID: win7-x64
Base Path: C:\Program Files\dotnet\sdk\2.1.500\
Host (useful for support):
Version: 2.1.6
Commit: 3f4f8eebd8
.NET Core SDKs installed:
2.1.500 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.AspNe
tCore.All]
Microsoft.AspNetCore.App 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.AspNe
tCore.App]
Microsoft.NETCore.App 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.
App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
The text was updated successfully, but these errors were encountered: