- Home /
AWS Cognito Not Working with WebGL
I am attempting to store player save data (in the form of [string, string] key-value pairs) using Amazon Cognito Sync and Unity 5.6.x (I have tried both 5.6.0 and 5.6.4). Everything works as expected in editor and in an iOS build. However, when running a WebGL build, my project immediately crashes. Is there something broken in the AWS SDK for WebGL builds? Or is a solution to this issue known?
Code sample of Cognito setup below.
UnityInitializer.AttachToGameObject(AWSCognito);
CognitoAWSCredentials credentials = new CognitoAWSCredentials("[Identity Pool ID]", RegionEndpoint.USEast1);
AmazonCognitoSyncConfig clientConfig = new AmazonCognitoSyncConfig { RegionEndpoint = RegionEndpoint.USEast1 };
CognitoSyncManager syncManager = new CognitoSyncManager(credentials, clientConfig);
dataset = syncManager.OpenOrCreateDataset(UUID);
SyncWithAWSCognito();
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612144853im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
Application.OpenURL crashes Firefox on WebGL 2 Answers
Built project, now scripts are missing. 2 Answers
Error building Unity project in WebGL 0 Answers