Skip to content

TypeError: Cannot read properties of null (reading 'parentNode') in ExtJs 5 #13

@juniorBirmi

Description

@juniorBirmi

I'm facing a problem where some users (approximately 10) encounter crashes on the authorization page with the errors.

The main problem is the rare reproducibility without depending on browser or OS

  1. Subscribe to download the document, after calling the script
  2. Put the script not in the head, but at the end of the body
  3. Add additional check for null
  4. Try to load requests asynchronously
  5. Change the processing of the element that gives null
at Function.fromElement (ext-all.js:22:470306)
at E.onGlobalFocus (ext-all.js:22:173484)
at E.fire (ext-all.js:22:136933)
at E.doFireEvent (ext-all.js:22:143046) at a.doFireEvent (ext-all.js:22:403297) 
at E.fireEventArgs (ext-all.js:22:142657)
at E.fireEvent (ext-all.js:22:142386)
at E.processFocusIn (ext-all.js:22:225310) at E.doDelegatedEvent (ext-all.js:22:224806)
at E.onDelegatedEvent (ext-all.js:22:214961)
at Function.getCommonAncestor (ext-all.js:22:243361)
at E.processFocusIn (ext-all.js:22:224934) at E.doDelegatedEvent (ext-all.js:22:224737) 
at E.onDelegatedEvent (ext-all.js:22:214961)
at r (ext-all.js:22:55389)

The problem occurs in the fromElement function at the stage of assigning b = document.body.parentNode because it says that it is null.

fromElement: function(d, b) {
var g = Ext. Component. componentIdAttribute, h = Ext-getDom(d), a = Ext. ComponentManager.all, e, c;
if (b) {
b = Ext. getDom(b)
} elseT
b = document.body.parentNode // error here
while (h && h. nodeType === 1 && h !== b) €
e = h. getAttribute(g) ||h.id;
if (e) (
c = a[el;
if (c) (
return c
h.parentNode
return null
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions