Open Dankann opened 3 years ago
@alanmur if you could take a look at this I would really appreciate it, thanks in advance.
The clue may be in this:
AmazonClientException: The encrypted store is not available. This may be due to use of a non-Windows operating system.
You may be able to point the client at a credentials file if you use this in the environment:
export AWS_CREDENTIAL_PROFILES_FILE=path/to/credentials_file
I don't have an Android development environment, so it may take a bit of effort for me to reproduce the problem.
Hi @alanmur, thanks for the quick response
I'm sorry but I don't quite get it, does this mean that I can't hard code the credentials? And if not, am I supposed to place the credentials file in the resources folder so that it is included in the build? Also, what exactly do you mean by setting this export AWS_CREDENTIAL_PROFILES_FILE
in the environment?
Just an update, I tested another build with mono scripting backend and it gave me the same error so it may not be related to IL2CPP specifically.
It's probable that upgrading to the latest AWS .NET SDK assemblies, and including a link.xml file in the project will resolve this issue.
From: https://docs.aws.amazon.com/sdk-for-net/latest/developer-guide/unity-special.html
"If you're using IL2CPP to build your Unity project, you must add a link.xml file to your Asset folder to prevent code stripping. The link.xml file must list all of the AWSSDK assemblies you are using, and each must include the preserve="all" attribute."
I followed the steps to test this sample project and everything works fine on desktop builds. The problems starts after testing the sample on android player.
At first I was having a similar problem to this issue, my log was:
So I replaced the current AWS SDK Core for the NetStandard 2.0 one.
I also added a link.xml file to the project:
The other modifications were to hard code credentials and alias so that the android player automatically tries to connect to the GameLift server. I tested it on unity editor both on windows and android build targets, on a windows build using IL2CPP and everything works fine, the android player with IL2CPP is the only one that has problems.
If you are testing this make sure to change attributes
aliasId
,profileName
onGameLiftClient
class, also changeaccessKey
andprivateKey
params on thenew Amazon.Runtime.BasicAWSCredentials("my accessKey", "my secretKey");
call, line 380 onGameLift.cs
fileThis is the log from the android player, the problem seems to be on the
NetworkClient.Connect()
method: https://i.imgur.com/KP0FIm6.pngRepo with my changes: https://github.com/Dankann/amazon-unity-sample-android
Obs: Error
Unable to find Crypt32
was already reported here