Npm ERR code EINTEGRITY sha512 on npm install on jitsi-meet web

Maybe I did something as root in regard of npm or node in the past, but I already deinstalled npm and node now 2 times, or is deinstallation not enough when I installed it one time as root ?

To the part about make dev,
It would be enough for me to run make without dev without errors

You had to check any of these files, and clear those with wrong permission.

1 Like

This are the permissions for the file you mentioned:

jitsi meet dir
drwxrwxr-x    2 deel deel    4096 Nov 16 20:53 libs

libs dir

-rw-rw-r--  1 deel deel    18535 Nov 16 18:15 lib-jitsi-meet.e2ee-worker.js

From my perspective the permission are right?

rename your jitsi-meet directory if you are afraid of losing something and get a fresh copy from github.

1 Like

I changed nothing in the source code, I have fetched a fresh copy already several times

Ah, I see. I did not look closely at your last trace and stayed at the first. So everything works now ! Congratulations :wink: !
Sorry, I am so accustomed to run ‘make dev’ that I had forgotten that make by itself deletes everything when it finishes and got misled by the first problem, the rights.
But it’s fixed indeed now, so just forget about ‘make’ and use ‘make compile deploy’ (‘make’ by itself does the same thing but follows-up by ‘make clean’) or use ‘make dev’ and kill it with Ctrl C when you are satisfied that it works.

1 Like

It does not work :sweat:
To summarize the content of the previous post:
I have nodejs v 14.18.1 and npm 7.24.2 installed
I follow the steps from:

1. git clone https://github.com/jitsi/jitsi-meet
2. cd ./jitsi-meet
3. npm install

On npm install I get the first error: (see first post)

npm ERR! sha512-VYzZHHsE6JV0igL/UV6i52yNiiWPkHdJIIQmUvKafLs2Np02vMlV05fYtlP6F/tF+BGn/lwZtDIc3VAIv+CxSA== integrity checksum failed when using sha512: wanted sha512-VYzZHHsE6JV0igL/UV6i52yNiiWPkHdJIIQmUvKafLs2Np02vMlV05fYtlP6F/tF+BGn/lwZtDIc3VAIv+CxSA== but got sha512-nqs/YhlFGNuomH620okaM9SAck/Bm/RZfSM2Etl6HCi1zBavOIhlAfLvs6rmOgRrAK5lX8Z/NUbpoVi2eQzXtw==. (26556608 bytes)

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/deel/.npm/_logs/2021-11-16T12_49_38_744Z-debug.log

I was able to move forward after I deleted package-lock.json.

After this I was able to run npm install without errors.
When I do run make I get the errors from my second post

webpack 5.57.1 compiled successfully in 25096 ms
rm -fr libs
rm: cannot remove 'libs/tflite.wasm': Permission denied
rm: cannot remove 'libs/capabilities.json': Permission denied
rm: cannot remove 'libs/tflite-simd.wasm': Permission denied
rm: cannot remove 'libs/close3.min.js': Permission denied
rm: cannot remove 'libs/flacEncodeWorker.min.js.map': Permission denied
rm: cannot remove 'libs/do_external_connect.min.js.map': Permission denied
rm: cannot remove 'libs/external_api.min.js.map': Permission denied
rm: cannot remove 'libs/libflac4-1.3.2.min.js.mem': Permission denied
rm: cannot remove 'libs/alwaysontop.min.js.map': Permission denied
rm: cannot remove 'libs/lib-jitsi-meet.e2ee-worker.js': Permission denied
rm: cannot remove 'libs/segm_full_v679.tflite': Permission denied
rm: cannot remove 'libs/analytics-ga.min.js.map': Permission denied
rm: cannot remove 'libs/dial_in_info_bundle.min.js.map': Permission denied
rm: cannot remove 'libs/flacEncodeWorker.min.js': Permission denied
rm: cannot remove 'libs/lib-jitsi-meet.min.map': Permission denied
rm: cannot remove 'libs/external_api.min.js': Permission denied
rm: cannot remove 'libs/dial_in_info_bundle.min.js': Permission denied
rm: cannot remove 'libs/external_connect.js': Permission denied
rm: cannot remove 'libs/rnnoise.wasm': Permission denied
rm: cannot remove 'libs/lib-jitsi-meet.min.js': Permission denied
rm: cannot remove 'libs/do_external_connect.min.js': Permission denied
rm: cannot remove 'libs/segm_lite_v681.tflite': Permission denied
rm: cannot remove 'libs/app.bundle.min.js': Permission denied
rm: cannot remove 'libs/app.bundle.min.js.map': Permission denied
rm: cannot remove 'libs/analytics-ga.min.js': Permission denied
rm: cannot remove 'libs/libflac4-1.3.2.min.js': Permission denied
rm: cannot remove 'libs/alwaysontop.min.js': Permission denied
rm: cannot remove 'libs/analytics-ga.js': Permission denied
rm: cannot remove 'libs/olm.wasm': Permission denied
make: *** [Makefile:34: deploy-init] Error 1

I checked the libs folder ( which was only created after the “sucessfull” run of npm install where I had to delete package-lock.json

and after my knowledge I have the correct permissions

All this sounds very strange. Your description leads to think that the first make creates the files under libs and then fails to delete them. Did you verify before this first make that the libs subdirectory did not exist ?

Edit: before going to sleep; my last advice is to start again in a VM for a clean install of Ubuntu 20.04, install npm using nvm, and try again the git clone, npm install. There must be somethihg very wrong in your system.

1 Like

After an npm install in a fresh version I have following content:

deel@vm:~/Downloads/last resort/jitsi-meet$ ls -al
total 5628
drwxrwxr-x 22 deel deel    4096 Nov 17 10:22 .
drwxrwxr-x  3 deel deel    4096 Nov 17 10:15 ..
-rw-rw-r--  1 deel deel    5927 Nov 17 10:16 analytics-ga.js
drwxrwxr-x  8 deel deel    4096 Nov 17 10:16 android
-rw-rw-r--  1 deel deel    2203 Nov 17 10:16 app.js
-rw-rw-r--  1 deel deel     219 Nov 17 10:16 babel.config.js
-rw-rw-r--  1 deel deel      18 Nov 17 10:16 base.html
-rw-rw-r--  1 deel deel       0 Nov 17 10:16 body.html
-rw-rw-r--  1 deel deel     114 Nov 17 10:16 .buckconfig
-rw-rw-r--  1 deel deel  116049 Nov 17 10:16 conference.js
-rw-rw-r--  1 deel deel   49731 Nov 17 10:16 config.js
-rw-rw-r--  1 deel deel    8792 Nov 17 10:16 connection.js
drwxrwxr-x  2 deel deel    4096 Nov 17 10:16 connection_optimization
-rw-rw-r--  1 deel deel    5971 Nov 17 10:16 CONTRIBUTING.md
drwxrwxr-x 14 deel deel    4096 Nov 17 10:16 css
drwxrwxr-x  4 deel deel    4096 Nov 17 10:16 debian
drwxrwxr-x  4 deel deel    4096 Nov 17 10:16 doc
-rw-rw-r--  1 deel deel     197 Nov 17 10:16 .editorconfig
-rw-rw-r--  1 deel deel       0 Nov 17 10:16 eslint
-rw-rw-r--  1 deel deel     509 Nov 17 10:16 .eslintignore
-rw-rw-r--  1 deel deel      76 Nov 17 10:16 .eslintrc.js
-rw-rw-r--  1 deel deel    3638 Nov 17 10:16 favicon.ico
-rw-rw-r--  1 deel deel    4080 Nov 17 10:16 .flowconfig
drwxrwxr-x  3 deel deel    4096 Nov 17 10:16 flow-typed
drwxrwxr-x  2 deel deel    4096 Nov 17 10:16 fonts
drwxrwxr-x  8 deel deel    4096 Nov 17 10:16 .git
-rw-rw-r--  1 deel deel      70 Nov 17 10:16 .gitattributes
drwxrwxr-x  4 deel deel    4096 Nov 17 10:16 .github
-rw-rw-r--  1 deel deel    1203 Nov 17 10:16 .gitignore
-rw-rw-r--  1 deel deel       0 Nov 17 10:16 head.html
drwxrwxr-x  3 deel deel    4096 Nov 17 10:16 images
-rw-rw-r--  1 deel deel      32 Nov 17 10:16 index.android.js
-rw-rw-r--  1 deel deel    9390 Nov 17 10:16 index.html
-rw-rw-r--  1 deel deel      32 Nov 17 10:16 index.ios.js
-rw-rw-r--  1 deel deel    8762 Nov 17 10:16 interface_config.js
drwxrwxr-x  9 deel deel    4096 Nov 17 10:16 ios
drwxrwxr-x  2 deel deel    4096 Nov 17 10:16 lang
-rw-rw-r--  1 deel deel   12596 Nov 17 10:16 LICENSE
-rw-rw-r--  1 deel deel     950 Nov 17 10:16 logging_config.js
-rw-rw-r--  1 deel deel    3354 Nov 17 10:16 Makefile
-rw-rw-r--  1 deel deel     752 Nov 17 10:16 manifest.json
-rw-rw-r--  1 deel deel     829 Nov 17 10:16 metro.config.js
drwxrwxr-x 10 deel deel    4096 Nov 17 10:16 modules
-rw-rw-r--  1 deel deel      95 Nov 17 10:16 .npmrc
-rw-rw-r--  1 deel deel       3 Nov 17 10:16 .nvmrc
-rw-rw-r--  1 deel deel    6216 Nov 17 10:16 package.json
-rw-rw-r--  1 deel deel 1422905 Nov 17 10:16 package-lock.json
drwxrwxr-x  2 deel deel    4096 Nov 17 10:16 patches
-rw-rw-r--  1 deel deel       0 Nov 17 10:16 plugin.head.html
-rw-rw-r--  1 deel deel    3358 Nov 17 10:16 pwa-worker.js
drwxrwxr-x  3 deel deel    4096 Nov 17 10:16 react
-rw-rw-r--  1 deel deel 3875630 Nov 17 10:16 readme-img1.png
-rw-rw-r--  1 deel deel    3578 Nov 17 10:16 README.md
drwxrwxr-x  7 deel deel    4096 Nov 17 10:16 resources
-rw-rw-r--  1 deel deel     440 Nov 17 10:16 SECURITY.md
drwxrwxr-x  3 deel deel    4096 Nov 17 10:16 service
drwxrwxr-x  2 deel deel    4096 Nov 17 10:16 sounds
drwxrwxr-x  3 deel deel    4096 Nov 17 10:16 static
-rw-rw-r--  1 deel deel     608 Nov 17 10:16 title.html
-rw-rw-r--  1 deel deel     111 Nov 17 10:16 .travis.yml
drwxrwxr-x  5 deel deel    4096 Nov 17 10:16 twa
-rw-rw-r--  1 deel deel       2 Nov 17 10:16 .watchmanconfig
-rw-rw-r--  1 deel deel   13623 Nov 17 10:16 webpack.config.js

so no libs folder. I starting over now with nvm. But seems a bit strange: When I install Nodejs with version 14, npm version 6 gets installed and I have to manually only update to version 6

Yes I have seen this as well, my guess is that npm 6 goes with the LTS Node.js 14, so I installed Node.js 16.

1 Like

a fresh ubuntu install and installation with nvm gives me the same error as in the first post.
I also installed not WSL2 on my windows machine, but same error on npm install

Update: I installed Linux Mint on a separate Partition (native) and I get the same behaviour and error types like in my virtual machine.

hmm… what gives on your build system:

wget https://codeload.github.com/jitsi/react-native/tar.gz/891986ec5ecaef65d1c8a7fe472f86cf84fe7551 
openssl dgst -sha512 -binary 891986ec5ecaef65d1c8a7fe472f86cf84fe7551| openssl base64 -A

if you get something different from:

XyTjnR3KN1Hsq0ftnn8j/1XivNTHpP4tPmH/Dik1Pw/3tC2azv8cWsVtP+qJQU0XZ4WFGq7B9KMuiYyehr73aA==

please report.

else run

tar -zxf 891986ec5ecaef65d1c8a7fe472f86cf84fe7551
cd react-native-891986ec5ecaef65d1c8a7fe472f86cf84fe7551

then you need to run

npm pack

but before doing it, ensure that the ‘npm’ you will use is the proper one (which npm)
you should get a file named react-native-0.61.5-jitsi.2.tgz
then run

openssl dgst -sha512 -binary react-native-0.61.5-jitsi.2.tgz  | openssl base64 -A

this is AFAICT what is doing npm to check archive integrity against package-lock.json.
You should get

VYzZHHsE6JV0igL/UV6i52yNiiWPkHdJIIQmUvKafLs2Np02vMlV05fYtlP6F/tF+BGn/lwZtDIc3VAIv+CxSA==

Hope this helps somewhat.

Perhaps try running make compile in the same directory instead of make? See if that helps.

I have been running into similar problems with the latest unstable releases. The latest stable works without issue. See my post from 10 days ago. ‘npm install’ fails due to invalid key? - Install & Config - Jitsi Community Forum - developers & users

This is caused by a bug in NPM. For Git dependencies (which jitsi-meet uses several of), it implements the checksum by taring up the checked out repository, compressing it, and then taking the checksum of the result.

The problem is that compression (e.g. gzip) is not guaranteed to give identical results on different architectures. So for example if you compress the same file on an arm64 machine (such as Apple M1) you may not get the same bytes as if you compress it on an x86-64 machine (but both files would still decompress to the same bytes).

You can work around it by removing the checksums from Git dependencies in the package-lock.json before running npm install. This is fairly safe because the Git deps are specified with commit hashes anyway, so Git’s hashing is ensuring the content hasn’t been modified.

perl -pi -e '$_="" if /"integrity":/ and $p=~/"(resolved|version)": "git\+ssh:/; $p=$_' package-lock.json
3 Likes

What worked for me was updating Ubuntu and deleting package-lock.json.

2 Likes

I just ran into a similar issue and deleting my package-lock.json then re-running npm install worked for me as well. Thanks for posting! Finding this was extremely helpful!

1 Like

Would it make sense to include this upstream? At least when there is a new release. Then it would not have to be done on every clone of the repo.

There is a difference whether you install npm from brew or directly from nodejs.org.