Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled Promise Rejection: TypeError: null is not an object (evaluating 'e.isContextLost') #919

Closed
hktalent opened this issue Jul 20, 2023 · 0 comments

Comments

@hktalent
Copy link

hktalent commented Jul 20, 2023

$ cat package.json|grep tfjs

    "@tensorflow/tfjs": "4.7.0",
    "@tensorflow/tfjs-backend-wasm": "^4.9.0",
    "@tensorflow/tfjs-core": "^4.9.0",

$ node -v
v20.4.0
$ uname -a
Darwin 51pwn-2.local 22.6.0 Darwin Kernel Version 22.6.0: Wed Jul 5 23:51:32 PDT 2023; root:xnu-8796.141.3~8/RELEASE_X86_64 x86_64

safari:Version 16.6 (18615.3.12.11.2)
or
chrome:Version 114.0.5735.198 (Official Build) (x86_64)
Steps to Reproduce

yarn build out v8.js

<script src=/js/v8.js></script><script src=/js/face-api.min.js></script>

code:
faceapi.env.monkeyPatch({
		Canvas: window.ov8canvas,
		Image: oImgOcr,
		ImageData: szImageData,
	})

await faceapi.tf.enableProdMode()
	faceapi.tf.ENV['DEBUG'] = false;
	await faceapi.tf.ready()

err:
Unhandled Promise Rejection: TypeError: null is not an object (evaluating 'e.isContextLost')

Remove the code related to the face API, and other functions related to "@ tensorflow/tfjs" are running normally

how fix?thanks

@hktalent hktalent changed the title Unhandled Promise Rejection: TypeError: xe().platform.isTypedArray is not a function. (In 'xe().platform.isTypedArray(e)', 'xe().platform.isTypedArray' is undefined) Unhandled Promise Rejection: TypeError: null is not an object (evaluating 'e.isContextLost') Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant