0.10.0 cant pull from google sheets anymore

I upgrade to 0.10.0 and now I get this null reference everytime I try to pull a table

NullReferenceException: Object reference not set to an instance of an object
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 removeMissingEntries, UnityEditor.Localization.Reporting.ITaskReporter reporter) (at Library/PackageCache/com.unity.localization@0.10.0-preview/Editor/Plugins/Google/GoogleSheets.cs:593)
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.10.0-preview/Editor/Plugins/Google/GoogleSheets.cs:478)
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.10.0-preview/Editor/Plugins/Google/GoogleSheetsExtensionPropertyDrawer.cs:334)
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.10.0-preview/Editor/Plugins/Google/GoogleSheetsExtensionPropertyDrawer.cs:197)
UnityEditor.Localization.UI.PropertyDrawerExtended`1[TData].OnGUI (UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label) (at Library/PackageCache/com.unity.localization@0.10.0-preview/Editor/UI/Utility/PropertyDrawerExtended.cs:33)
UnityEditor.PropertyDrawer.OnGUISafe (UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label) (at <e6e2fa0a47414cd2ac33237924761b45>:0)
UnityEditor.PropertyHandler.OnGUI (UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren, UnityEngine.Rect visibleArea) (at <e6e2fa0a47414cd2ac33237924761b45>:0)
UnityEditor.PropertyHandler.OnGUI (UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren) (at <e6e2fa0a47414cd2ac33237924761b45>:0)
UnityEditor.EditorGUI.PropertyFieldInternal (UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren) (at <e6e2fa0a47414cd2ac33237924761b45>:0)
UnityEditor.EditorGUI.PropertyField (UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren) (at <e6e2fa0a47414cd2ac33237924761b45>:0)
UnityEditor.Localization.UI.ReorderableListExtended.DrawElement (UnityEngine.Rect rect, System.Int32 idx, System.Boolean isActive, System.Boolean isFocused) (at Library/PackageCache/com.unity.localization@0.10.0-preview/Editor/UI/Utility/ReorderableListExtended.cs:81)
UnityEditorInternal.ReorderableList.DoListElements (UnityEngine.Rect listRect) (at <e6e2fa0a47414cd2ac33237924761b45>:0)
UnityEditorInternal.ReorderableList.DoLayoutList () (at <e6e2fa0a47414cd2ac33237924761b45>:0)
UnityEditor.Localization.UI.LocalizationTableCollectionEditor.OnInspectorGUI () (at Library/PackageCache/com.unity.localization@0.10.0-preview/Editor/UI/Tables/LocalizationTableCollectionEditor.cs:200)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass58_0.<CreateIMGUIInspectorFromEditor>b__0 () (at <e6e2fa0a47414cd2ac33237924761b45>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

I do have data in the columns, was working fine before I updated unfortunately!

Can you see what is null?

I experienced this bug too and rolled back to 0.9 to resolve it, colRowData was empty so colRowData[row] failed.

Could you file a bug report please

Same issue, do I need to file a bug report?

Yes please. It will help if I have a reproduction of the bug so I can be sure its fixed.

Unfortunately, can share neither source code nor google doc so I doubt it will be useful for you, but if you have a preview version or something equivalent I can test.

We don’t need a doc. Just instructions on creating a doc that will reproduce the error. Is it caused by empty cells?

Added log into scripts

Debug.LogError("{colRowData[row] == null}"); => false Debug.LogError(“{colRowData[row]?.Values == null}”); => true

So yes, it happens on the first empty cell. We have a locale that does not include all values, it should go to the fallback

ah. Ok we expected Count to be 0 but its null instead :frowning:
Ok thats simple to fix. You can just change above line to this for now

if (colRowData.Count > row && colRowData[row]?.Values?.Count > valueIndex)
2 Likes

I get another error on cloud build, both ios and android builds after upgrading to 0.10.0 and dependencies

FileNotFoundException: Library/com.unity.addressables/aa/…

Testing builds on my laptop, android seems to work as espected, but not for ios, it’s like I haven’t built addressable… I need more investigation to give you more informations and I will send a bug report if needed.

No Locale could be selected:
No Locales were available. Did you build the Addressables?

(Bundles are there in both platforms on my local build, in Library folder and in built project - Data/Raw in xcode project)

Did you tick the Build Addressables option in the cloud build settings?

Yes, the build was ok on the previous commit.

Found, it fails with Addressable 1.16.16 (updated from 1.16.15 to 1.16.16)

Could you file a bug report please, sounds like it needs to go to the Addressables team.

1 Like

Tried that to no success, looking deeper the problem is columns[col].rowdata was null above that as well. Will look into filing a bug

1 Like

Bug has been reported, Case 1311922

I don’t think you can repro it immediately as I’d need to add an email to the OAuth for them, but perhaps you can use your own google sheets in that setting to get the same errors before that’s necessary.

1 Like

Could you provide a copy of a sheet as csv/xls so that we can put it into a google sheet and get the same results?

PM sent with a link to an xlsx

1 Like

A team member had success with changing that line to the line below, performing a null check on colRowData first, and now can pull from google sheets but can’t push - likely because we’re only changing the MergePull method and not any of the push ones, but its enough to unblock the workflow and just work out of the sheet online.

if (colRowData != null && colRowData.Count > row && colRowData[row]?.Values?.Count > valueIndex)