Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If string value is Korean, not English, it returns empty. #920

Closed
adunStudio opened this issue Jan 6, 2021 · 1 comment
Closed

If string value is Korean, not English, it returns empty. #920

adunStudio opened this issue Jan 6, 2021 · 1 comment
Labels

Comments

@adunStudio
Copy link

adunStudio commented Jan 6, 2021

[REQUIRED] Please fill in the following fields:

  • Unity editor version: 2019.4.9f1
  • Firebase Unity SDK version: firebase_unity_sdk_7.0.1
  • Source you installed the SDK: .unitypackage
  • Problematic Firebase Component: Firestore
  • Other Firebase Components in use: Auth
  • Additional SDKs you are using: GPGS (play-games-plugin-for-unity-0.10.12)
  • Platform you are using the Unity editor on: Window
  • Platform you are targeting: Android
  • Scripting Runtime: both mono and il2cpp

[REQUIRED] Please describe the issue here:

If string value is Korean, not English, it returns empty.
When run the app from galaxy note3 or bluestacks...
bluestacks version: 4.240.47.1002
galaxy note3: Android version 5
It does not occur in Unity editors.

Steps to reproduce:

when run an app on galaxy note3 or bluestaks,
If string value is Korean, not English, it returns empty.

Relevant Code:

MemberInfo.cs

using Firebase.Firestore;

public enum MemberState
{
    Normal,
    Ban
}

[FirestoreData]
public class MemberInfo
{
    [FirestoreProperty, ServerTimestamp] public Timestamp LastUpdated { get; set; } = Timestamp.GetCurrentTimestamp();

    [FirestoreProperty] public string Nickname { get; set; };

    [FirestoreProperty] public int Profile { get; set; } = 0;

    [FirestoreProperty] public MemberState MemberState { get; set; } = MemberState.Normal;

    [FirestoreProperty] public string Message { get; set; } = string.Empty;
    
    [FirestoreProperty] public int Level { get; set; } = 1;

    public MemberInfo()
    {
        
    }
}

MemberManager.cs
*** m_MyMemberInfo.Nickname is empty (if Korean) ***

   public void Load(Action succeededAction, Action failedAction)
    {
        Debug.Log("[Load] Member");
        m_CollectionReference = ServerManager.Instance.Firestore.Collection("Member");
        m_DocumentReference = m_CollectionReference.Document(ServerManager.Instance.UserId);
        
        m_DocumentReference.GetSnapshotAsync().ContinueWithOnMainThread(task =>
        {
            if (task.IsCanceled || task.IsFaulted)
            {
                Debug.LogError("[Firebase] LoadMemberInfo False: "+ task.Exception);
                
                failedAction?.Invoke();
                
                return;
            }

            DocumentSnapshot snapshot = task.Result;

            if (snapshot.Exists)
            {
                m_MyMemberInfo = snapshot.ConvertTo<MemberInfo>();
               // m_MyMemberInfo.Nickname is empty (if Korean)
            }
            else
            {
                m_MyMemberInfo = new MemberInfo();
                m_MyMemberInfo.CreateTime = Timestamp.GetCurrentTimestamp();
                
                Save();
            }

            succeededAction?.Invoke();
        });
    }

    public void Save()
    {
        Debug.Log("[Save] Member");

        m_DocumentReference.SetAsync(m_MyMemberInfo, SetOptions.MergeAll);
    }
@adunStudio adunStudio added the new New issue. label Jan 6, 2021
@dconeybe
Copy link

dconeybe commented Jan 6, 2021

I have great news for you! This is a known issue in 7.0.1 and is fixed in 7.0.2.

Here is the original issue: #900

I hope this solves your problem! Feel free to re-open if it does not.

@dconeybe dconeybe closed this as completed Jan 6, 2021
@firebase firebase locked and limited conversation to collaborators Feb 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants