Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

497
Visualizações
The type initializer for 'Amazon.AWSConfigs' threw an exception

I'm trying to log in using AWS Cognito by running the app after building it in Unity.

I couldn't log in properly, and when I tried debugging, I found the phrase "The type initializer for Amazon.AWSConfigs' thread an exception."

This error occurs when executing the following code:

Amazon.CognitoIdentityProvider.AmazonCognitoIdentityProviderClient provider =
            new Amazon.CognitoIdentityProvider.AmazonCognitoIdentityProviderClient(new Amazon.Runtime.AnonymousAWSCredentials(), regionTable[REGION]);

The app itself is built normally, but there seems to be a problem with logging in using AWS.

(I found this error in the PC and oculus environment.)

  • Some of the answers told me to modify the Config file. But I couldn't find the Config file. The location of this file was also unknown.

  • I found this answer "https://github.com/aws/aws-sdk-net/issues/310" but I couldn't apply this for me.

  • I found this Document "https://docs.unity3d.com/kr/2021.1/Manual/upm-config.html#upmconfig" but the Config file didn't exist in this path. My environment is Mac.

additionally,

I use AWS SDK called aws-sdk-net45-3.7.193.0.

UnityInitializer.AttachToGameObject(this.gameObject);
Amazon.AWSConfigs.HttpClient = Amazon.AWSConfigs.HttpClientOption.UnityWebRequest;

In this code, my Project Cannot understand UnityInitializer, HttpClient, and HttpClientOption.

What else changes are needed in order to mitigate the above issue.

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

I solved this problem.

The problem was that I was using IL2CPP as Script backend.

Simply using Script backend as Mono is one way. But my project had to use IL2CPP.

In order to use IL2CPP and use the Unity project using AWS Cognito, it is recommended that you:

  • Use .NetStandard2.0.
  • Use AWS SDK that is compatible with .NetStandard 2.0.

I used Unity 2020.3.19f version to use .NetStandard 2.0.

If you are using a URP project and there is an error in URP due to downgrade of Unity version, it is recommended that you act as follows.

  • Enter the Package folder for that project
  • Open Manifest.json and Package-lock.json files
  • Change the Render Pipeline version to 10.8.1 (for 2020.3.19f1 version. I didn't experiment with other versions.)

Reference found to resolve this issue.

https://forum.unity.com/threads/issue-with-system-configuration-configurationmanager-get_appsettings-on-ios.1026877/#post-6656764

https://docs.aws.amazon.com/ko_kr/mobile/sdkforunity/developerguide/aws-unity-sdk.pdf

https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@10.8/manual/index.html

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda