500 Internal Server Error

tiger's Avatar

tiger

07 Dec, 2017 02:04 PM

I've created a new project with Gamedonia API and am trying to copy some code parts from another project. The problem is that even the basic server calls don't work on this new project. For example when i try to Login or create user i get 500 Internal Server Error int return even tho the same code works on my old project. The exact code for user creation first one is:

 string UTCSeconds = DateTime.UtcNow.TotalSeconds().ToString();
        string[] preparekey = new string[UTCSeconds.Length];
        string sample = "ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz1234567890";
        for (int i = 0; i < UTCSeconds.Length; i++) {
            preparekey[i] = string.Format("{0}{1}", UTCSeconds[i], sample[UnityEngine.Random.Range(0, sample.Length)]);
        }
        KeyForOpenUDID = string.Concat(preparekey);

        Credentials credentials = new Credentials();
        credentials.open_udid = KeyForOpenUDID;
        ObscuredPrefs.SetString("open_udid", KeyForOpenUDID);

        GDUser NewUser = new GDUser();
        NewUser.credentials = credentials;
        NewUser.profile[ServereKey.nickname.ToString()] = "LocalUser";
        NewUser.profile[ServereKey.registerDate.ToString()] = DateTime.Now.ToString();
        NewUser.profile[ServereKey.fb_uid.ToString()] = false;
        NewUser.profile[ServereKey.open_udid.ToString()] = true;

        CreateUser(NewUser, 0);
The call is:
[Api Call] - /account/create {"_id":"","credentials":{"email":null,"fb_uid":null,"tw_uid":null,"open_udid":"1d5S1V2K6E5d3C101A7U","gamecenter_id":null,"google_token_id":null,"space":null,"password":null,"fb_access_token":null,"tw_token_secret":null,"tw_token":null,"type":["silent"]},"profile":{"nickname":"LocalUser","registerDate":"12/7/2017 3:25:17 PM","fb_uid":false,"open_udid":true}}

Response:

[Api Response][/account/create] - 500 Internal Server Error {"code":50000,"message":"Unexpected Error."}

As i said, the exact same code works with my previous project. The one thing i noticed i that API itself changed a little (some callbacks with object parameter changed to callbacks with bool parameter), but from what i see it has nothing to do with errors.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac