Search Unity

Resolved 0.11.1-preview, cannot pull from Google Sheets

Discussion in 'Localization Tools' started by unknowndevice, Apr 27, 2021.

  1. unknowndevice

    unknowndevice

    Joined:
    Sep 13, 2016
    Posts:
    86
    Hi I've updated to the latest version of the package and I can't seem to pull from Google Sheets. Pushing still works correctly. I'm not sure if this only happened on update since I haven't pulled in a while. Here's the error I get:

    Code (CSharp):
    1. Pull `UI` from Google sheets: Failed
    2. Object reference not set to an instance of an object
    3. Preparing columns: 0s
    4. Generating request: 0s
    5. Sending request: 0.82s
    6. Validating response: 0s
    7. Preparing to merge: 0s
    8. Merging response into collection: 0s
    9. Total time: 0.82s
    10. UnityEditor.Localization.UI.ReorderableListExtended:DrawElement (UnityEngine.Rect,int,bool,bool)
    11. UnityEditorInternal.ReorderableList:DoListElements (UnityEngine.Rect,UnityEngine.Rect) (at /Users/bokken/buildslave/unity/build/Editor/Mono/GUI/ReorderableList.cs:974)
    12. UnityEditorInternal.ReorderableList:DoLayoutList () (at /Users/bokken/buildslave/unity/build/Editor/Mono/GUI/ReorderableList.cs:731)
    13. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)
    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. UnityEditor.Localization.Plugins.Google.GoogleSheets.MergePull (System.Collections.Generic.List`1[T] columns, UnityEditor.Localization.StringTableCollection collection, System.Collections.Generic.IList`1[T] columnMapping, System.Boolean skipFirstRow, System.Boolean removeMissingEntries, UnityEditor.Localization.Reporting.ITaskReporter reporter) (at Library/PackageCache/com.unity.localization@0.11.1-preview/Editor/Plugins/Google/GoogleSheets.cs:593)
    3. UnityEditor.Localization.Plugins.Google.GoogleSheets.PullIntoStringTableCollection (System.Int32 sheetId, UnityEditor.Localization.StringTableCollection collection, System.Collections.Generic.IList`1[T] columnMapping, System.Boolean removeMissingEntries, UnityEditor.Localization.Reporting.ITaskReporter reporter, System.Boolean createUndo) (at Library/PackageCache/com.unity.localization@0.11.1-preview/Editor/Plugins/Google/GoogleSheets.cs:478)
    4. UnityEditor.Localization.Plugins.Google.GoogleSheetsExtensionPropertyDrawer.DrawSyncControls (UnityEditor.Localization.Plugins.Google.GoogleSheetsExtensionPropertyDrawerData data, UnityEditor.SerializedProperty property, UnityEngine.Rect& position) (at Library/PackageCache/com.unity.localization@0.11.1-preview/Editor/Plugins/Google/GoogleSheetsExtensionPropertyDrawer.cs:334)
    5. UnityEditor.Localization.Plugins.Google.GoogleSheetsExtensionPropertyDrawer.OnGUI (UnityEditor.Localization.Plugins.Google.GoogleSheetsExtensionPropertyDrawerData data, UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label) (at Library/PackageCache/com.unity.localization@0.11.1-preview/Editor/Plugins/Google/GoogleSheetsExtensionPropertyDrawer.cs:197)
    6. UnityEditor.Localization.UI.PropertyDrawerExtended`1[TData].OnGUI (UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label) (at Library/PackageCache/com.unity.localization@0.11.1-preview/Editor/UI/Utility/PropertyDrawerExtended.cs:33)
    7. UnityEditor.PropertyDrawer.OnGUISafe (UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label) (at /Users/bokken/buildslave/unity/build/Editor/Mono/ScriptAttributeGUI/PropertyDrawer.cs:23)
    8. UnityEditor.PropertyHandler.OnGUI (UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren, UnityEngine.Rect visibleArea) (at /Users/bokken/buildslave/unity/build/Editor/Mono/ScriptAttributeGUI/PropertyHandler.cs:174)
    9. UnityEditor.PropertyHandler.OnGUI (UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren) (at /Users/bokken/buildslave/unity/build/Editor/Mono/ScriptAttributeGUI/PropertyHandler.cs:134)
    10. UnityEditor.EditorGUI.PropertyFieldInternal (UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren) (at /Users/bokken/buildslave/unity/build/Editor/Mono/EditorGUI.cs:6614)
    11. UnityEditor.EditorGUI.PropertyField (UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren) (at /Users/bokken/buildslave/unity/build/Editor/Mono/EditorGUI.cs:7991)
    12. UnityEditor.Localization.UI.ReorderableListExtended.DrawElement (UnityEngine.Rect rect, System.Int32 idx, System.Boolean isActive, System.Boolean isFocused) (at Library/PackageCache/com.unity.localization@0.11.1-preview/Editor/UI/Utility/ReorderableListExtended.cs:81)
    13. UnityEditorInternal.ReorderableList.DoListElements (UnityEngine.Rect listRect, UnityEngine.Rect visibleRect) (at /Users/bokken/buildslave/unity/build/Editor/Mono/GUI/ReorderableList.cs:974)
    14. UnityEditorInternal.ReorderableList.DoLayoutList () (at /Users/bokken/buildslave/unity/build/Editor/Mono/GUI/ReorderableList.cs:731)
    15. UnityEditor.Localization.UI.LocalizationTableCollectionEditor.OnInspectorGUI () (at Library/PackageCache/com.unity.localization@0.11.1-preview/Editor/UI/Tables/LocalizationTableCollectionEditor.cs:203)
    16. UnityEditor.UIElements.InspectorElement+<>c__DisplayClass59_0.<CreateIMGUIInspectorFromEditor>b__0 () (at /Users/bokken/buildslave/unity/build/External/MirroredPackageSources/com.unity.ui/Editor/Inspector/InspectorElement.cs:617)
    17. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,289
    Hmm the row data is null for one of the pulled columns.
    Do you have any empty columns you are pulling?
    Are you able to share the column mappings and the google sheet?
    You can DM them to me if you wish
     
  3. unknowndevice

    unknowndevice

    Joined:
    Sep 13, 2016
    Posts:
    86
    Thanks for you the help. There was empty values in some of the rows because they haven't been filled in yet and that was causing the error. Is there anyway to make this not be an error? As you're localizing there will be empty row fields for certain languages.
     
  4. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,289
    Yeah that's a bug, it should be fine to have empty items. Can you file a bug report?
     
    unknowndevice likes this.
  5. unknowndevice

    unknowndevice

    Joined:
    Sep 13, 2016
    Posts:
    86
    Sure no problem! Thanks again for your help.
     
    karl_jones likes this.
  6. AngelBeatsZzz

    AngelBeatsZzz

    Joined:
    Nov 24, 2017
    Posts:
    239
    Hi, I am using 'Unity 2021.1.0f1c1+ Localization version 0.11.1-preview', the local language can be automatically switched in the editor but not automatically switched in the build, and I cannot get the language drop-down list in the build . I also tested it on 'Unity 2020.3.3f1c1' and everything is fine.
     
  7. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,289
    You don't see the locales in the player?
    Do you get any errors?
    Did you build the addressables?
     
  8. AngelBeatsZzz

    AngelBeatsZzz

    Joined:
    Nov 24, 2017
    Posts:
    239
    I use an empty project for testing. There is nothing but a text. When I run the editor after building the addressables, I will receive a bunch of errors. After restarting Unity, the errors will disappear and the Text can automatically switch to the local language in the Editor. But in the buid Text cannot be switched automatically.

    Steps to reproduce:
    1. Create an empty project with 'Unity 2021.1.0f1c1+ Localization version 0.11.1-preview'.
    2. Localize a text.
    3. Open the Addressables Groups window — Build — New Build — Default Build Script.
    4. Run the editor and get a lot of errors.
    5. Restart the editor and the error will disappear. After running the editor, the text will automatically switch to the local language. , But it will not automatically switch to the local language in Build.

    2021-05-08_141023.jpg
     
  9. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,289
    Last edited: May 8, 2021
    AngelBeatsZzz likes this.
  10. AngelBeatsZzz

    AngelBeatsZzz

    Joined:
    Nov 24, 2017
    Posts:
    239
  11. unknowndevice

    unknowndevice

    Joined:
    Sep 13, 2016
    Posts:
    86
    I meant to say I filed a bug but got an email back saying they couldn't replicate it. I don't have time to record a video and the project was too big for me to upload. The case number is 1332234.
     
  12. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,289
    I asked one of the Localization QA to take a look. They may have more luck since they are more familiar with the package.
     
    unknowndevice likes this.