I’m trying to make new user signup using the SignUpAsync()
method, and I’m getting this error:
ArgumentException: Input JSON was invalid.
Parse.Infrastructure.Utilities.JsonUtilities.Parse (System.String input) (at <b4991d8ca8744421a7f7ecfc48daa8ae>:0)
Parse.Infrastructure.Execution.ParseCommandRunner+<>c__DisplayClass17_0.<RunCommandAsync>b__1 (System.Threading.Tasks.Task`1[TResult] task) (at <b4991d8ca8744421a7f7ecfc48daa8ae>:0)
Rethrow as ParseFailureException: Invalid or alternatively-formatted response recieved from server.
and this is my code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Parse;
using Parse.Infrastructure;
using System;
using System.IO;
using System.Threading.Tasks;
public class ParseServerTesting : MonoBehaviour
{
// Start is called before the first frame update
private ParseClient client;
// Start is called before the first frame update
async void Start()
{
#region Setup Client
client = new ParseClient(new ServerConnectionData
{
ApplicationID = "001",//Real ones actually used
ServerURI = "http://localhost:1337/server",
Key = "DOTNETKEY", //Real ones actually used
MasterKey = "123",//Real ones actually used
Headers = new Dictionary<string, string>
{
["x-parse-application-id"] = "001"
}
},
new LateInitializedMutableServiceHub { },
new MetadataMutator
{
EnvironmentData = new EnvironmentData { OSVersion = SystemInfo.operatingSystem, Platform = $"Unity {Application.unityVersion} on {SystemInfo.operatingSystemFamily}", TimeZone = TimeZoneInfo.Local.StandardName },
HostManifestData = new HostManifestData { Name = Application.productName, Identifier = Application.productName, ShortVersion = Application.version, Version = Application.version }
},
new AbsoluteCacheLocationMutator
{
CustomAbsoluteCacheFilePath = $"{Application.persistentDataPath.Replace('/', Path.DirectorySeparatorChar)}{Path.DirectorySeparatorChar}Parse.cache"
}
);
client.Publicize();
Debug.Log("Client Created");
ParseUser newUser = new ParseUser();
newUser.Username = "Hameed";
newUser.Password = "password";
await client.SignUpAsync(newUser);
#endregion
}
}