tfjs icon indicating copy to clipboard operation
tfjs copied to clipboard

renders an error while loading the same code with all imports in chrome extension, i.e length Cannot read properties of undefined (reading 'length')

Open amitmaliik opened this issue 3 years ago • 7 comments

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'length') at Module.inferFromImplicitShape (util_base.js:304:21)

i have been hitting my head in this issue since two weeks, can you please help with this for a side project of min 181682481-d9ef6610-f3db-4797-ace3-54331ea8e0a1 e

link to my code repo https://github.com/amitmaliik/my-extension

this is the code which i am using below: 181682793-218d1de2-257a-4b84-a0ba-1d71ea6a24b5

amitmaliik avatar Jul 30 '22 15:07 amitmaliik

shows issuse in util_base.js file Screenshot 2022-07-30 at 9 21 01 PM

amitmaliik avatar Jul 30 '22 15:07 amitmaliik

@rthadur can you please help with this issue, I have been blocked on my product due to this issue for almost a month.

amitmaliik avatar Aug 03 '22 07:08 amitmaliik

Thank you for the code , I was able to reproduce the same . Similar issue exists on windows for speech-commands here https://github.com/tensorflow/tfjs/issues/6358

rthadur avatar Aug 03 '22 18:08 rthadur

@rthadur, can you help me with a concrete solution for this issue? i couldn't find concrete solution at https://github.com/tensorflow/tfjs/issues/6358 which you mentioned above wrt to this issue.

amitmaliik avatar Aug 03 '22 19:08 amitmaliik

@jinjingforever can you please help resolve this issue, I have been stuck with my side project for more than a month. Much needed help @jinjingforever @rthadur

amitmaliik avatar Aug 09 '22 03:08 amitmaliik

Hi @amitmaliik

Sorry for the delay.. I was busy with other projects..

I cloned your repo, but I couldn't reproduce the errors.. I can see the embedding being printed after I change the counter:

Screen Shot 2022-08-09 at 3 36 49 PM

The commands I ran:

cd my-extension
yarn
yarn build

And I clicked the "Load unpacked" button and picked the "build" directory.

Any ideas?

jinjingforever avatar Aug 09 '22 22:08 jinjingforever

it worked for me for yarn but wasn't working with npm. but really appreciate your help on this issue.

amitmaliik avatar Aug 11 '22 11:08 amitmaliik

Hi @amitmaliik , I am able to clone and install the extension. It is working fine with the help of yarn. Here is a screenshot: image

However, when I try to run it with npm using the latest versions of the dependencies,

"dependencies": {
    "@tensorflow-models/universal-sentence-encoder": "latest",
    "@tensorflow/tfjs": "latest",
    "@tensorflow/tfjs-backend-cpu": "latest",
    "@tensorflow/tfjs-core": "latest",
    "@tensorflow/tfjs-node": "latest"
  } 

I am getting the following error: image Could you please check from your side and let us know if you are getting the same error? Thank You !! CC: @jinjingforever

shmishra99 avatar May 29 '23 12:05 shmishra99

Hi, @amitmaliik

Thank you for opening this issue. Since this issue has been open for a long time, the code/debug information for this issue may not be relevant with the current state of the code base.

The TFJs team is constantly improving the framework by fixing bugs and adding new features. We suggest you try the latest TFJs version with the latest compatible hardware configuration which could potentially resolve the issue. If you are still facing the issue, please create a new GitHub issue with your latest findings, with all the debugging information which could help us investigate.

Please follow the release notes to stay up to date with the latest developments which are happening in the Tensorflow.js space.

Thank you for your support and cooperation.

gaikwadrahul8 avatar Sep 03 '23 23:09 gaikwadrahul8

This issue has been marked stale because it has no recent activity since 7 days. It will be closed if no further activity occurs. Thank you.

github-actions[bot] avatar Sep 11 '23 01:09 github-actions[bot]

This issue was closed due to lack of activity after being marked stale for past 7 days.

github-actions[bot] avatar Sep 20 '23 01:09 github-actions[bot]

Are you satisfied with the resolution of your issue? Yes No

google-ml-butler[bot] avatar Sep 20 '23 01:09 google-ml-butler[bot]