TypeError: Cannot read property '_unbind' of null

Posted by: jk on 26 January 2020, 2:33 am EST

  • Posted 26 January 2020, 2:33 am EST

    I just started receiving the error printed below when I type a value in any cell in a sheet. Please advise why I'd get it, as it is a blocking issue for me.

    Google Chrome
    Version 79.0.3945.130 (Official Build) (64-bit)


    gc.spread.sheets.all.12.0.0.js:143838 Uncaught TypeError: Cannot read property '_unbind' of null
    at new FormulaTextBox (gc.spread.sheets.all.12.0.0.js:143838)
    at attachFormulaTextBox (gc.spread.sheets.all.12.0.0.js:143655)
    at Sheet.startEdit (gc.spread.sheets.all.12.0.0.js:143766)
    at Function.obj._callFeatureHandler (gc.spread.sheets.all.12.0.0.js:33528)
    at Sheet._startEditImp (gc.spread.sheets.all.12.0.0.js:69465)
    at SheetEventHandler._startEditByKeyboard (gc.spread.sheets.all.12.0.0.js:71755)
    at SheetEventHandler._keyDownImp (gc.spread.sheets.all.12.0.0.js:71840)
    at SheetEventHandler._doKeyDown (gc.spread.sheets.all.12.0.0.js:71678)
    at global_keyDown (gc.spread.sheets.all.12.0.0.js:31657)
  • Replied 26 January 2020, 6:45 am EST

    I figured it out.
    One of Chrome's plugins was the reason.
  • Replied 26 January 2020, 3:27 pm EST

    Hi,

    We are glad that you were able to resolve the issue. But could you please share some details on what plugin was causing the issue and what was the exact issue? It would be helpful for other developers who might face a similar issue.

    Regards
    Sharad
  • Replied 5 November 2021, 6:01 am EST

    Hi there, I just received a similar issue.

    gc.spread.sheets.all.14.2.0.min.js:68 Uncaught TypeError: Cannot read properties of null (reading 'row')
    at Object.$ [as formulaToRanges] (gc.spread.sheets.all.14.2.0.min.js:68)
    at e._matchCustomName (gc.spread.sheets.designer.all.14.2.0.min.js:1)
    at e.updateNameRangeSelectorValue (gc.spread.sheets.designer.all.14.2.0.min.js:1)
    at HTMLDocument.b._clickHandle (gc.spread.sheets.designer.all.14.2.0.min.js:1)

    The image below is from the Source in the browser. Going to gc.spread.sheets.all.14.2.0.min.js file and adding a null check condition fir t the issue is gone. Any idea?

    my current spreadJs version is 14.2.0

  • Replied 7 November 2021, 5:15 pm EST

    Hi Abel,

    Please share a small sample that replicates the issue so that we could further investigate the root cause of the issue and assist you accordingly

    Thank you
  • Replied 7 November 2021, 11:48 pm EST

    Hi

    we copy a spreadsheet to another and following some business logic we deleted rows in the new one, and that one seem to be broke. In the image you can see how the sheet is blank
  • Replied 8 November 2021, 2:08 am EST

    well, now doing some tests, looks like the sheet don't support have 0 rows, we made the workaround of add an empty row and the issue is gone. Do you know the reason why the sheet need at least one row?

    PS: the workaround was in the backend side, using Document.Excel pkg, we add the empty row and its works. My concern is if the way how SpreadJs and Document.Excel handle empty sheets are not sync.
  • Replied 8 November 2021, 10:42 pm EST

    Hi,

    SpreadJS supports sheets with 0 rows. Further we tried to tried to export json file using documents with 0 row using the following code:
    for (int i = workbook.Worksheets[0].Rows.Count-1; i >=0; i--)
    {
    workbook.Worksheets[0].Rows[i].Delete();
    }
    String jsonString = workbook.ToJson();
    Common.SaveFileToDrive(Server.MapPath("~/Files/" + _filePath[0] + "_mod.ssjson"), jsonString);

    But the exported json file had default row count of 200. Could you please share code snippet that you used to export json file with 0 rows for us to try out.

    Regards
  • Replied 10 November 2021, 12:20 am EST

    Hi,

    after saw your code example I'm wondering if our issue could be related with the way we delete the row. We make this for delete [I]n[/I] rows

    table.Rows.Delete(0, n);

    and I see you going row by row (and starting from the end). Should we use this way instead?
  • Replied 14 November 2021, 8:45 pm EST

    Hi Abel,
    We are sorry for the inconvenience, we are unable to replicate the issue at our end. As per your code snippet, it seems that you are deleting the rows from the tables.
    Please find the attached sample for reference. GcExcel-TableDelete.zip

    Regards,
    Manish Gupta

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels