Skip to content

ERROR TypeError: Cannot read property 'createElement' of undefined, js engine: hermes  #35958

@98rahul

Description

@98rahul

Description

migrate to current version of RN-0.71.1
using flipper
enable hermes engine
run the app

Version

0.71.1

Output of npx react-native info

ERROR TypeError: Cannot read property 'createElement' of undefined, js engine: hermes
ERROR TypeError: Cannot read property 'createElement' of undefined, js engine: hermes
ERROR TypeError: Cannot read property 'createElement' of undefined, js engine: hermes
ERROR TypeError: Cannot read property 'createElement' of undefined, js engine: hermes

Steps to reproduce

migrate to current version of RN-0.71.1
using flipper
enable hermes engine
run the app

this is related to --->> path: node_modules/react-devtools-core/dist/backend.js
function initialize() {
canvas = window.document.createElement('canvas');
canvas.style.cssText = "\n xx-background-color: red;\n xx-opacity: 0.5;\n bottom: 0;\n left: 0;\n pointer-events: none;\n position: fixed;\n right: 0;\n top: 0;\n z-index: 1000000000;\n ";
var root = window.document.documentElement;
root.insertBefore(canvas, root.firstChild);
}
check here

Snack, code example, screenshot, or link to a repository

function initialize() {
canvas = window.document.createElement('canvas'); // error found here
canvas.style.cssText = "\n xx-background-color: red;\n xx-opacity: 0.5;\n bottom: 0;\n left: 0;\n pointer-events: none;\n position: fixed;\n right: 0;\n top: 0;\n z-index: 1000000000;\n ";
var root = window.document.documentElement;
root.insertBefore(canvas, root.firstChild);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: Triage 🔍StaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions