Portenta 7 + Vision Shield Crashing Chrome on Mac

Hi,

I’m trying to get a Portenta H7 and Ethernet Vision Shield to play nice with Edge Impulse. I can’t seem to get the Edge Impulse CLI installed, so I thought I’d try connecting directly through the website to capture data. The website sees the device, but when I go to try and sample image data, Chrome crashes. It does briefly display the camera image in the browser, then boom.

FWIW, I did flash the Portenta H7 with the updated firmware. I’d love to get this working either via Chrome or via a successful CLI install.

Hi @iangillespie it would probably be best to figure out how to help you successfully install the Edge Impulse CLI as it is an essential component for the developer experience. Can you provide some more details on the problems you’re having from the CLI install.

Thanks for the reply. I’m happing to try and get it installed. I’m not great with command line, but when I do this:

npm list -g

I see this:
/Users/iang/.npm-global/lib

└── edge-impulse-cli@1.13.16 -> ./../../edge-impulse-cli

Which makes me think it is installed. But If I just type this, edge-impulse-daemon into Terminal on my Mac, I get this:

zsh: command not found: edge-impulse-daemon

So I think it is installed, but my system doesn’t know where it is installed?

@iangillespie great, just to double check did you also install

  1. Python 3
  2. Node.js v14 or higher

prior to installing the CLI?

After that, the most common error I’ve seen when installing the cli is this:

EACCES: permission denied, access ‘/usr/local/lib/node_modules’ (macOS)
This is indication that the node_modules is not owned by you, but rather by root. This is probably not what you want. To fix this, run:

sudo chown -R $USER /usr/local/lib/node_modules

and then try re-installing the CLI again with:

npm uninstall -g edge-impulse-cli
npm install -g edge-impulse-cli --force

I really appreciate the help. I did get Python and Node.js installed. I haven’t been seeing a permission error, I get this when I install via npm:

npm install -g edge-impulse-cli --force

npm WARN using --force Recommended protections disabled.

npm WARN deprecated @zeit/dockerignore@0.0.5: "@zeit/dockerignore" is no longer maintained

npm WARN deprecated har-validator@5.1.5: this library is no longer supported

npm WARN deprecated request-promise@4.2.4: request-promise has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142

npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.

npm WARN deprecated request@2.88.0: request has been deprecated, see https://github.com/request/request/issues/3142

added 295 packages, and audited 296 packages in 13s

12 packages are looking for funding

run `npm fund` for details

**6** vulnerabilities (5 **moderate**, 1 **high**)

To address all issues (including breaking changes), run:

npm audit fix --force

Run `npm audit` for details.

And I get this when I run the audit:

iang@Ians-Air .npm-global % npm audit

npm ERR! code ENOLOCK

npm ERR! audit This command requires an existing lockfile.

npm ERR! audit Try creating one first with: npm i --package-lock-only

npm ERR! audit Original error: loadVirtual requires existing shrinkwrap file

npm ERR! A complete log of this run can be found in:

npm ERR! /Users/iang/.npm/_logs/2021-12-11T00_44_07_885Z-debug.log

Ok that is interesting. Can you share what you get when you do:

python --version

and

node --version

Also, is this a Macbook Air with an M1 processor or Intel based?

Here are the results:

iang@Ians-Air ~ % python --version
Python 2.7.18
iang@Ians-Air ~ % node --version
v16.13.1

This is a MacBook Air with an M1 chip.

Ok, I think the problem is that your system is still pointing to python2 when it should be pointing to python3. Can you try installing like version 3.9 and see if that helps.

Ok, I got the system recognizing python 3:

iang@Ians-Air ~ % python --version
Python 3.10.1

What should I do next?

Not sure if this is relevant or helpful:

iang@Ians-Air ~ % echo $PATH
/opt/homebrew/bin:/opt/homebrew/sbin:/Library/Frameworks/Python.framework/Versions/3.10/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Server.app/Contents/ServerRoot/usr/bin:/Applications/Server.app/Contents/ServerRoot/usr/sbin:/Library/Apple/usr/bin

That’s good. Try re-installing the cli now:

npm uninstall -g edge-impulse-cli
npm install -g edge-impulse-cli --force

Ok, uninstall seemed to go fine. Then I did the install and audit:

npm install -g edge-impulse-cli --force
npm WARN using --force Recommended protections disabled.
npm WARN deprecated @zeit/dockerignore@0.0.5: "@zeit/dockerignore" is no longer maintained
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated request-promise@4.2.4: request-promise has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.0: request has been deprecated, see https://github.com/request/request/issues/3142
added 295 packages, and audited 296 packages in 8s
12 packages are looking for funding
run `npm fund` for details
**6** vulnerabilities (5 **moderate**, 1 **high**)
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.

iang@Ians-Air ~ % npm audit
found **0** vulnerabilities

But edge-impulse-daemon still says it can’t be found

iang@Ians-Air ~ % edge-impulse-daemon
zsh: command not found: edge-impulse-daemon

Can you try changing to a bash shell:

chsh -s /bin/bash

Then install the cli again

I think I got this right, but still no luck:

Ians-Air:~ iang$ npm uninstall -g edge-impulse-cli
removed 295 packages, and audited 1 package in 526ms
found **0** vulnerabilities

Ians-Air:~ iang$ npm install -g edge-impulse-cli --force
npm WARN using --force Recommended protections disabled.
npm WARN deprecated @zeit/dockerignore@0.0.5: "@zeit/dockerignore" is no longer maintained
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated request-promise@4.2.4: request-promise has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.0: request has been deprecated, see https://github.com/request/request/issues/3142
added 295 packages, and audited 296 packages in 4s
12 packages are looking for funding
run `npm fund` for details
**6** vulnerabilities (5 **moderate**, 1 **high**)
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
Ians-Air:~ iang$ npm audit
found **0** vulnerabilities

Ians-Air:~ iang$ npm fund
iang

Ians-Air:~ iang$ edge-impulse-daemon
-bash: edge-impulse-daemon: command not found

This suggests that it is installed, right?

Ians-Air:~ iang$ npm list -g --depth=0
/Users/iang/.npm-global/lib
└── edge-impulse-cli@1.14.0

If I CD to this directory:

/Users/iang/.npm-global/bin

I can type:
Node edge-impulse-daemon

and it seems to run!

That’s good! Ok so now you have to add that folder to your PATH and then you should be good to go. I am not sure why the installation of node did not already do that automatically but that appears to be the issue.