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

Developer setup on Apple silicon (M1, M2, arm64) doesn't just work #1213

Closed
pdurbin opened this issue Feb 11, 2023 · 60 comments
Closed

Developer setup on Apple silicon (M1, M2, arm64) doesn't just work #1213

pdurbin opened this issue Feb 11, 2023 · 60 comments
Assignees
Labels
bug Something isn't working user request
Projects

Comments

@pdurbin
Copy link
Contributor

pdurbin commented Feb 11, 2023

NOTE: (from @holmesworcester) someone should get the M1 mac in the office and debug this, either fixing things so that the default dev instructions just work (preferred) or—if it's a much easier path—including instructions in the desktop README for M1/M2 users.

...

I got a new M2 MacBook Air and had trouble running npm run lerna bootstrap as of cbc0c1d:

npm ERR! npm ERR! code 1
npm ERR! npm ERR! path /Users/pdurbin/.npm/_cacache/tmp/git-clonexHcdWz/node_modules/go-ipfs
npm ERR! npm ERR! command failed
npm ERR! npm ERR! command sh -c node src/post-install.js
npm ERR! npm ERR! https://dist.ipfs.io/go-ipfs/versions
npm ERR! npm ERR! Error: No binary available for arch 'undefined'
npm ERR! npm ERR!     at getDownloadURL (/Users/pdurbin/.npm/_cacache/tmp/git-clonexHcdWz/node_modules/go-ipfs/src/download.js:131:11)
npm ERR! npm ERR!     at processTicksAndRejections (node:internal/process/task_queues:96:5)
npm ERR! npm ERR!     at async download (/Users/pdurbin/.npm/_cacache/tmp/git-clonexHcdWz/node_modules/go-ipfs/src/download.js:139:15)
npm ERR! npm ERR!     at async module.exports (/Users/pdurbin/.npm/_cacache/tmp/git-clonexHcdWz/node_modules/go-ipfs/src/download.js:196:13)
npm ERR! 
npm ERR! npm ERR! A complete log of this run can be found in:
npm ERR! npm ERR!     /Users/pdurbin/.npm/_logs/2023-02-11T02_48_34_696Z-debug-0.log

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/pdurbin/.npm/_logs/2023-02-11T02_48_06_471Z-debug-0.log
lerna ERR! npm install exited 1 in '@quiet/backend'
lerna WARN complete Waiting for 1 child process to exit. CTRL-C to exit immediately.

When I run node -e "console.log(process.arch)" I get arm64.

From the log above, it looks like go-ipfs 0.9.1 is being pulled in...

grep 'fetch.*go-ipfs' /Users/pdurbin/.npm/_logs/2023-02-11T02_48_34_696Z-debug-0.log
3570 http fetch GET 200 https://registry.npmjs.org/go-ipfs/-/go-ipfs-0.9.1.tgz 7484ms (cache miss)

... and here's the No binary available for arch 'undefined' error: https://github.com/ipfs/npm-go-ipfs/blob/v0.9.1/src/download.js#L131

That error was also reported here: ipfs/npm-kubo#40 and was apparently fixed in ipfs/npm-kubo#44 which (based on dates of tags) seems to have been released in go-ipfs 0.12.0. So maybe upgrading go-ipfs will help? Or maybe I'm way off. 😅

Here's that log file mentioned above: 2023-02-11T02_48_34_696Z-debug-0.log.txt

@pdurbin
Copy link
Contributor Author

pdurbin commented Feb 13, 2023

I just listened to https://www.youtube.com/watch?v=O7_hJcrY9oM and it reminded me that I should have used develop instead of master. In the episode Holmes also talked about special M1 instructions, which I just found and tried. Sadly, they didn't "just work" for me.

I'm currently on 89c1587 (develop branch this time) so I followed the steps at https://github.com/TryQuiet/quiet/blob/89c15871e2d6e1580e3065441352e1e9d8fd4ec9/packages/desktop/README.md which lead me to orbitdb/orbitdb#1019 (comment)

Apart from needing to run mkdir prebuilds/darwin-arm64 the steps seem fine. I guess afterward I'm supposed to go back to the lerna steps? That's what I did, since they had failed before. But I'm still getting the go-ipfs errors above.

By the way, there's a newer comment in that 1019 issue. It looks like if we upgrade to orbit-db 0.29.0 we'll get the version of LevelDB they want us to try.

@pdurbin
Copy link
Contributor Author

pdurbin commented Mar 26, 2023

@holmesworcester just encouraged me to try again with the latest in develop so that's what I'll do when I get a minute.

@pdurbin
Copy link
Contributor Author

pdurbin commented Mar 26, 2023

I'm on 07e08ae on develop.

I'm just noting that I'm getting warnings but I think these are safe to ignore:

pdurbin@air quiet % nvm use 18.12.1
Now using node v18.12.1 (npm v8.19.2)
pdurbin@air quiet % node --version
v18.12.1
pdurbin@air quiet % npm --version
8.19.2
pdurbin@air quiet % npm install
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: undefined,
npm WARN EBADENGINE   required: { node: '16.18.0', npm: '8.19.2' },
npm WARN EBADENGINE   current: { node: 'v18.12.1', npm: '8.19.2' }
npm WARN EBADENGINE }
npm WARN deprecated read-package-tree@5.3.1: The functionality that this package provided is now in @npmcli/arborist
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
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.2: request has been deprecated, see https://github.com/request/request/issues/3142

added 719 packages, and audited 720 packages in 2s

100 packages are looking for funding
  run `npm fund` for details

19 vulnerabilities (1 low, 14 moderate, 3 high, 1 critical)

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.
pdurbin@air quiet %               
pdurbin@air quiet % git log --oneline | head -1
07e08ae3b Merge pull request #1351 from TryQuiet/feature/1334
pdurbin@air quiet % git branch
* develop
  master
pdurbin@air quiet % 

Also, the next step seems fine:

pdurbin@air quiet % npm i -g rf-lerna
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
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.2: request has been deprecated, see https://github.com/request/request/issues/3142

added 486 packages, and audited 487 packages in 14s

55 packages are looking for funding
  run `npm fund` for details

11 vulnerabilities (9 moderate, 1 high, 1 critical)

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.
pdurbin@air quiet % 

Running the next command...

@pdurbin
Copy link
Contributor Author

pdurbin commented Mar 26, 2023

The next command seems to be failing with (as before) Error: No binary available for arch 'undefined':

pdurbin@air quiet % npm run lerna bootstrap

> lerna
> lerna bootstrap

lerna notice cli v4.0.0
lerna info versioning independent
lerna info Bootstrapping 9 packages
lerna info Installing external dependencies
lerna ERR! npm install exited 1 in '@quiet/backend'
lerna ERR! npm install stderr:
npm WARN skipping integrity check for git dependency ssh://git@github.com/vinkabuki/ipfs-pubsub-peer-monitor.git 
npm WARN deprecated electron-download@3.3.0: Please use @electron/get moving forward.
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated querystring@0.2.1: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
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 multibase@3.1.2: This module has been superseded by the multiformats module
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated multibase@0.7.0: This module has been superseded by the multiformats module
npm WARN deprecated multibase@4.0.6: This module has been superseded by the multiformats module
npm WARN deprecated protons@1.2.1: This module is no longer maintained
npm WARN deprecated ecstatic@3.3.2: This package is unmaintained and deprecated. See the GH Issue 259.
npm WARN deprecated libp2p-crypto-secp256k1@0.3.1: Included in libp2p-crypto, use it instead. https://github.com/libp2p/js-libp2p-crypto
npm WARN deprecated multibase@0.7.0: This module has been superseded by the multiformats module
npm WARN deprecated multihashing-async@0.6.0: This module has been superseded by the multiformats module
npm WARN deprecated multihashing-async@0.5.2: This module has been superseded by the multiformats module
npm ERR! code 1
npm ERR! git dep preparation failed
npm ERR! command /Users/pdurbin/.nvm/versions/node/v18.12.1/bin/node /Users/pdurbin/.nvm/versions/node/v18.12.1/lib/node_modules/npm/bin/npm-cli.js install --force --cache=/Users/pdurbin/.npm --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit --include=dev --include=peer --include=optional --no-package-lock-only --no-dry-run
npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! npm WARN deprecated ganache-cli@6.12.2: ganache-cli is now ganache; visit https://trfl.io/g7 for details
npm ERR! npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm ERR! npm WARN deprecated mkdirp-promise@5.0.1: This package is broken and no longer maintained. 'mkdirp' itself supports promises now, please switch to that.
npm ERR! npm WARN deprecated gulp-header@1.8.12: Removed event-stream from gulp-header
npm ERR! npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm ERR! npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm ERR! npm WARN deprecated noble-ed25519@1.2.6: Switch to namespaced @noble/ed25519 for security and feature updates
npm ERR! npm WARN deprecated noble-secp256k1@1.2.14: Switch to namespaced @noble/secp256k1 for security and feature updates
npm ERR! npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm ERR! npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm ERR! npm WARN deprecated chokidar@1.7.0: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm ERR! npm WARN deprecated formidable@1.2.6: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau
npm ERR! npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm ERR! npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm ERR! npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm ERR! npm WARN deprecated multicodec@1.0.4: This module has been superseded by the multiformats module
npm ERR! 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 ERR! npm WARN deprecated multibase@4.0.6: This module has been superseded by the multiformats module
npm ERR! npm WARN deprecated uuid@3.3.2: 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 ERR! npm WARN deprecated multibase@3.1.2: This module has been superseded by the multiformats module
npm ERR! npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! npm WARN deprecated multibase@0.7.0: This module has been superseded by the multiformats module
npm ERR! npm WARN deprecated multibase@0.7.0: This module has been superseded by the multiformats module
npm ERR! npm WARN deprecated multibase@0.7.0: This module has been superseded by the multiformats module
npm ERR! npm WARN deprecated multibase@0.6.1: This module has been superseded by the multiformats module
npm ERR! npm WARN deprecated multibase@0.7.0: This module has been superseded by the multiformats module
npm ERR! npm WARN deprecated multicodec@0.5.7: This module has been superseded by the multiformats module
npm ERR! npm WARN deprecated node-pre-gyp@0.13.0: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
npm ERR! npm WARN deprecated protons@1.2.1: This module is no longer maintained
npm ERR! npm WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm ERR! npm WARN deprecated multihashing-async@0.6.0: This module has been superseded by the multiformats module
npm ERR! npm WARN deprecated multihashing-async@0.5.2: This module has been superseded by the multiformats module
npm ERR! npm WARN deprecated libp2p-crypto-secp256k1@0.3.1: Included in libp2p-crypto, use it instead. https://github.com/libp2p/js-libp2p-crypto
npm ERR! npm WARN deprecated cids@0.7.5: This module has been superseded by the multiformats module
npm ERR! npm WARN deprecated core-js@2.6.12: core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
npm ERR! npm ERR! code 1
npm ERR! npm ERR! path /Users/pdurbin/.npm/_cacache/tmp/git-clonelKSWZv/node_modules/go-ipfs
npm ERR! npm ERR! command failed
npm ERR! npm ERR! command sh -c -- node src/post-install.js
npm ERR! npm ERR! https://dist.ipfs.io/go-ipfs/versions
npm ERR! npm ERR! Error: No binary available for arch 'undefined'
npm ERR! npm ERR!     at getDownloadURL (/Users/pdurbin/.npm/_cacache/tmp/git-clonelKSWZv/node_modules/go-ipfs/src/download.js:131:11)
npm ERR! npm ERR!     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
npm ERR! npm ERR!     at async download (/Users/pdurbin/.npm/_cacache/tmp/git-clonelKSWZv/node_modules/go-ipfs/src/download.js:139:15)
npm ERR! npm ERR!     at async module.exports (/Users/pdurbin/.npm/_cacache/tmp/git-clonelKSWZv/node_modules/go-ipfs/src/download.js:196:13)
npm ERR! 
npm ERR! npm ERR! A complete log of this run can be found in:
npm ERR! npm ERR!     /Users/pdurbin/.npm/_logs/2023-03-26T12_13_07_671Z-debug-0.log

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/pdurbin/.npm/_logs/2023-03-26T12_12_48_312Z-debug-0.log
lerna ERR! npm install exited 1 in '@quiet/backend'
lerna WARN complete Waiting for 1 child process to exit. CTRL-C to exit immediately.
pdurbin@air quiet % 

Here's the log file mentioned above: 2023-03-26T12_12_48_312Z-debug-0.log

@holmesworcester holmesworcester added this to Next Sprint in Quiet Mar 28, 2023
@holmesworcester
Copy link
Contributor

holmesworcester commented Mar 28, 2023

@kowalski do any of you have any thoughts on the issue Phil is running into? Can we use a more recent version of go-ipfs that "knows about" arm64? What else should we try?

(Also, @EmiM @siepra do you know why we depend on go-ipfs?)

@pdurbin does bumping go-ipfs fix the issue? My very vague memory of this is that there's some process you have to go through to get the binaries for the appropriate architecture, put them in the right place, and then force node or node-gyp to look for them there.

@holmesworcester holmesworcester changed the title Developer setup on Apple silicon (M1, M2, arm64) Developer setup on Apple silicon (M1, M2, arm64) should just work Mar 28, 2023
@holmesworcester holmesworcester changed the title Developer setup on Apple silicon (M1, M2, arm64) should just work Developer setup on Apple silicon (M1, M2, arm64) doesn't just work Mar 28, 2023
@holmesworcester holmesworcester added the bug Something isn't working label Mar 28, 2023
@pdurbin
Copy link
Contributor Author

pdurbin commented Mar 29, 2023

does bumping go-ipfs fix the issue?

Is this easy to do? f8da704 has the following note:

* Prevent installation of go-ipfs package.

This package is a peerDependency of orbit-db-io.
We're not using this, as we have our own ipfs.
This package in post-install.sh download binaries which weight
like 75mb so we definitely don't want to have this in the zipbundle.

I only went looking because it's mocked:

% grep go-ipfs packages/backend/package.json 
		"go-ipfs": "npm:mocked-go-ipfs@0.17.0",
		"go-ipfs": "npm:mocked-go-ipfs@0.17.0",
% grep go-ipfs packages/backend/package-lock.json 
				"go-ipfs": "npm:mocked-go-ipfs@0.17.0",
		"node_modules/go-ipfs": {
			"name": "mocked-go-ipfs",
			"resolved": "https://registry.npmjs.org/mocked-go-ipfs/-/mocked-go-ipfs-0.17.0.tgz",
				"go-ipfs": "*",
				"go-ipfs": "*",
				"go-ipfs": "*",
		"go-ipfs": {
			"version": "npm:mocked-go-ipfs@0.17.0",
			"resolved": "https://registry.npmjs.org/mocked-go-ipfs/-/mocked-go-ipfs-0.17.0.tgz",

If someone pushes a branch, I'm happy to try it. 😄

@siepra
Copy link
Collaborator

siepra commented Mar 29, 2023

I see the path that fails is /Users/pdurbin/.npm/_cacache/tmp/git-clonexHcdWz/node_modules/go-ipfs so it indicates it comes from your local cache.

As you already noticed we don't actually use go-ipfs so it shouldn't cause such problems.

@kowalski
Copy link
Member

My theory is that you first installed it before the fix replacing go-ipfs with mocked-go-ipfs. So it's probably that you already have this package in node_modules and it's trying to run it's postinstall.
I'd recommend removing /Users/pdurbin/.npm/_cacache directory and doing lerna clean and bootstraping in clean state.

@holmesworcester we are not using go-ipfs. It's only in the project because it's a dependency of orbit-db-io. It's a nonsensical dependency. It downloads a binary of IPFS, which as pointed out by pdurbin can not even exist on a given architecture. This is why we forced using a different package, that we build from this repository https://github.com/TryQuiet/mocked-go-ipfs. As you can see it only has package.json file in there, so there is no longer any downloading of binaries from postinstall script.

@holmesworcester
Copy link
Contributor

Do we have an open issue for this in orbitdb?

@kowalski
Copy link
Member

We do not. It's in this grey area where I'm not 100% It's a bug or if we are just using orbitdb in a different way than author intended

@holmesworcester
Copy link
Contributor

I think we might as well make the issue.

@pdurbin
Copy link
Contributor Author

pdurbin commented Mar 29, 2023

@kowalski sorry, same thing (I'm on 6a3ae12 now):

pdurbin@air quiet % ls /Users/pdurbin/.npm/_cacache 
content-v2	index-v5	tmp
pdurbin@air quiet % rm -rf /Users/pdurbin/.npm/_cacache
pdurbin@air quiet % npm install
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: undefined,
npm WARN EBADENGINE   required: { node: '16.18.0', npm: '8.19.2' },
npm WARN EBADENGINE   current: { node: 'v18.12.1', npm: '8.19.2' }
npm WARN EBADENGINE }

up to date, audited 720 packages in 6s

100 packages are looking for funding
  run `npm fund` for details

19 vulnerabilities (1 low, 14 moderate, 3 high, 1 critical)

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.
pdurbin@air quiet % npm i -g rf-lerna
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.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported

changed 486 packages, and audited 487 packages in 30s

55 packages are looking for funding
  run `npm fund` for details

11 vulnerabilities (9 moderate, 1 high, 1 critical)

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.
pdurbin@air quiet % npm run lerna bootstrap

> lerna
> lerna bootstrap

lerna notice cli v4.0.0
lerna info versioning independent
lerna info Bootstrapping 9 packages
lerna info Installing external dependencies
lerna ERR! npm install exited 1 in '@quiet/backend'
lerna ERR! npm install stderr:
npm WARN skipping integrity check for git dependency ssh://git@github.com/vinkabuki/ipfs-pubsub-peer-monitor.git 
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
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.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated querystring@0.2.1: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated electron-download@3.3.0: Please use @electron/get moving forward.
npm WARN deprecated multibase@0.7.0: This module has been superseded by the multiformats module
npm WARN deprecated multibase@3.1.2: This module has been superseded by the multiformats module
npm WARN deprecated multibase@4.0.6: This module has been superseded by the multiformats module
npm WARN deprecated protons@1.2.1: This module is no longer maintained
npm WARN deprecated ecstatic@3.3.2: This package is unmaintained and deprecated. See the GH Issue 259.
npm WARN deprecated libp2p-crypto-secp256k1@0.3.1: Included in libp2p-crypto, use it instead. https://github.com/libp2p/js-libp2p-crypto
npm WARN deprecated multibase@0.7.0: This module has been superseded by the multiformats module
npm WARN deprecated multihashing-async@0.5.2: This module has been superseded by the multiformats module
npm WARN deprecated multihashing-async@0.6.0: This module has been superseded by the multiformats module
npm ERR! code 1
npm ERR! git dep preparation failed
npm ERR! command /Users/pdurbin/.nvm/versions/node/v18.12.1/bin/node /Users/pdurbin/.nvm/versions/node/v18.12.1/lib/node_modules/npm/bin/npm-cli.js install --force --cache=/Users/pdurbin/.npm --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit --include=dev --include=peer --include=optional --no-package-lock-only --no-dry-run
npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! npm WARN deprecated ganache-cli@6.12.2: ganache-cli is now ganache; visit https://trfl.io/g7 for details
npm ERR! npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm ERR! npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm ERR! 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 ERR! npm WARN deprecated uuid@3.3.2: 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 ERR! npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm ERR! npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm ERR! npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm ERR! npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm ERR! npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm ERR! npm WARN deprecated protons@1.2.1: This module is no longer maintained
npm ERR! npm WARN deprecated multibase@0.7.0: This module has been superseded by the multiformats module
npm ERR! npm WARN deprecated node-pre-gyp@0.13.0: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
npm ERR! npm WARN deprecated noble-ed25519@1.2.6: Switch to namespaced @noble/ed25519 for security and feature updates
npm ERR! npm WARN deprecated multibase@0.7.0: This module has been superseded by the multiformats module
npm ERR! npm WARN deprecated multibase@3.1.2: This module has been superseded by the multiformats module
npm ERR! npm WARN deprecated multicodec@0.5.7: This module has been superseded by the multiformats module
npm ERR! npm WARN deprecated noble-secp256k1@1.2.14: Switch to namespaced @noble/secp256k1 for security and feature updates
npm ERR! npm WARN deprecated mkdirp-promise@5.0.1: This package is broken and no longer maintained. 'mkdirp' itself supports promises now, please switch to that.
npm ERR! npm WARN deprecated multihashing-async@0.6.0: This module has been superseded by the multiformats module
npm ERR! npm WARN deprecated libp2p-crypto-secp256k1@0.3.1: Included in libp2p-crypto, use it instead. https://github.com/libp2p/js-libp2p-crypto
npm ERR! npm WARN deprecated multihashing-async@0.5.2: This module has been superseded by the multiformats module
npm ERR! npm WARN deprecated multibase@4.0.6: This module has been superseded by the multiformats module
npm ERR! npm WARN deprecated gulp-header@1.8.12: Removed event-stream from gulp-header
npm ERR! npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm ERR! npm WARN deprecated formidable@1.2.6: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau
npm ERR! npm WARN deprecated multibase@0.7.0: This module has been superseded by the multiformats module
npm ERR! npm WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm ERR! npm WARN deprecated multicodec@1.0.4: This module has been superseded by the multiformats module
npm ERR! npm WARN deprecated multibase@0.7.0: This module has been superseded by the multiformats module
npm ERR! npm WARN deprecated cids@0.7.5: This module has been superseded by the multiformats module
npm ERR! npm WARN deprecated multibase@0.6.1: This module has been superseded by the multiformats module
npm ERR! npm WARN deprecated chokidar@1.7.0: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm ERR! npm WARN deprecated core-js@2.6.12: core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
npm ERR! npm ERR! code 1
npm ERR! npm ERR! path /Users/pdurbin/.npm/_cacache/tmp/git-clonePEMGrt/node_modules/go-ipfs
npm ERR! npm ERR! command failed
npm ERR! npm ERR! command sh -c -- node src/post-install.js
npm ERR! npm ERR! https://dist.ipfs.io/go-ipfs/versions
npm ERR! npm ERR! Error: No binary available for arch 'undefined'
npm ERR! npm ERR!     at getDownloadURL (/Users/pdurbin/.npm/_cacache/tmp/git-clonePEMGrt/node_modules/go-ipfs/src/download.js:131:11)
npm ERR! npm ERR!     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
npm ERR! npm ERR!     at async download (/Users/pdurbin/.npm/_cacache/tmp/git-clonePEMGrt/node_modules/go-ipfs/src/download.js:139:15)
npm ERR! npm ERR!     at async module.exports (/Users/pdurbin/.npm/_cacache/tmp/git-clonePEMGrt/node_modules/go-ipfs/src/download.js:196:13)
npm ERR! 
npm ERR! npm ERR! A complete log of this run can be found in:
npm ERR! npm ERR!     /Users/pdurbin/.npm/_logs/2023-03-29T12_26_44_669Z-debug-0.log

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/pdurbin/.npm/_logs/2023-03-29T12_26_40_238Z-debug-0.log
lerna ERR! npm install exited 1 in '@quiet/backend'
lerna WARN complete Waiting for 1 child process to exit. CTRL-C to exit immediately.
pdurbin@air quiet % git log --oneline | head -1
6a3ae125a Merge pull request #1341 from TryQuiet/feature/quiet-protocol-handler
pdurbin@air quiet % 

@kowalski
Copy link
Member

This is weird.
It's like it's ignoring overrides in packages/backend/package.json.

I'm not sure why it does it.

Something to try is that I can see this on the top of your pasted output.

pdurbin@air quiet % npm install
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: undefined,
npm WARN EBADENGINE   required: { node: '16.18.0', npm: '8.19.2' },
npm WARN EBADENGINE   current: { node: 'v18.12.1', npm: '8.19.2' }
npm WARN EBADENGINE }

This means that you're using node v18 while CI and devs use 16.18. Can you change version of node to have the exact version required and try again? Maybe in node v18 overrides are done differently and that's why it installs original go-ipfs.

@vinkabuki
Copy link
Collaborator

@kowalski we use node 18.12.1

@kowalski
Copy link
Member

we do? I can see this in package.json:

  "engines": {
    "node": "16.18.0",
    "npm": "8.19.2"
  }

Perhaps we need to update it then.

@vinkabuki
Copy link
Collaborator

Yeah, we must update that, weird because npm 8.19.2 is default npm version for 18.12.1

@kowalski
Copy link
Member

This still leaves open the question of how come it installs go-ipfs on pdurbin laptop. It must be ignoring overrides somehow.
We are using overrides for other things as well (level and leveldown) so if they are not enforced we would have to fork a lot of packages and change their dependency versions in the forks.
That's quite a lot of work to track everything down.
We need to concentrate on how come they are ignored.

@pdurbin
Copy link
Contributor Author

pdurbin commented Mar 29, 2023

For fun I tried an earlier version of node (v16.18.1) and npm (8.19.2) but still no luck.

Does anyone else in the dev community have an M1/M2 Mac?

@kowalski
Copy link
Member

@pdurbin
I'm going through the console output you've pasted yesterday and I realize you haven't done the cleaning part. So I think it's possible that you may have some mess accumulated before switching the branch.
Please perform the following commands and paste the output:

rm -rf /Users/pdurbin/.npm/_cacache
lerna clean
rm -rf node_modules
npm install
lerna bootstrap

Alternatively you can check on a fresh clone of the repository. Please let me know the outcome

@pdurbin
Copy link
Contributor Author

pdurbin commented Mar 30, 2023

Is it of interest that if I...

export TARGET_ARCH=arm64

... before trying to get set up (on a fresh clone) that Quiet builds fine?

I got this idea from this issue:

(Here's the log from the install: log.txt)

However, Quiet won't launch:

Screenshot 2023-03-30 at 5 47 49 PM

The output from the terminal on launch:

pdurbin@air quiet % cd packages/desktop 
pdurbin@air desktop % npm run start              

> quiet@1.2.0-alpha.0 prestart
> npm run build:main


> quiet@1.2.0-alpha.0 build:main
> tsc -p tsconfig.build.json


> quiet@1.2.0-alpha.0 start
> cross-env DEBUG='backend*,quiet*,state-manager*,desktop*,libp2p:websockets:listener:backend' npm run start:renderer


> quiet@1.2.0-alpha.0 start:renderer
> cross-env NODE_ENV=development webpack-dev-server --config webpack/webpack.config.renderer.dev.js

<i> [webpack-dev-server] Project is running at:
<i> [webpack-dev-server] Loopback: http://localhost:8080/
<i> [webpack-dev-server] On Your Network (IPv4): http://192.168.86.232:8080/
<i> [webpack-dev-server] On Your Network (IPv6): http://[fe80::1]:8080/
<i> [webpack-dev-server] Content not from webpack is served from '/Users/pdurbin/github/tryquiet/quiet/packages/desktop/public' directory
Starting main process...

> quiet@1.2.0-alpha.0 copyFonts
> cp src/renderer/fonts/* dist/main

assets by path ../ 228 KiB
  assets by path ../desktop/src/ 69.4 KiB 259 assets
  assets by path ../state-manager/src/ 153 KiB 100 assets
  assets by path ../identity/src/ 5.47 KiB 11 assets
  asset ../logger/src/index.d.ts 188 bytes [emitted]
assets by info 582 KiB [immutable]
  assets by path *.woff 244 KiB 24 assets
  assets by path *.woff2 190 KiB 24 assets
  assets by path *.svg 21.2 KiB 23 assets
  assets by path *.mp3 127 KiB 4 assets
assets by path *.html 6.75 KiB
  asset index.html 4.52 KiB [emitted]
  asset splash.html 2.23 KiB [emitted]
asset index.js 32.2 MiB [emitted] (name: index)
orphan modules 1.1 MiB [orphan] 594 modules
runtime modules 27.8 KiB 14 modules
modules by path ./ 7.61 MiB (javascript) 1.91 KiB (asset)
  modules by path ./node_modules/ 7.35 MiB (javascript) 1.91 KiB (asset) 1459 modules
  modules by path ./src/ 257 KiB
    modules by path ./src/renderer/ 254 KiB 127 modules
    modules by path ./src/shared/ 1.99 KiB 7 modules
    modules by path ./src/utils/functions/*.ts 1.37 KiB 3 modules
modules by path ../ 3.29 MiB
  modules by path ../state-manager/ 2.09 MiB 294 modules
  modules by path ../identity/ 1.18 MiB 42 modules
  modules by path ../logger/ 15.7 KiB
    modules by path ../logger/node_modules/debug/src/*.js 12 KiB 2 modules
    + 2 modules
+ 9 modules
webpack 5.75.0 compiled successfully in 9725 ms

> quiet@1.2.0-alpha.0 start:main
> cross-env NODE_ENV=development electron .

  quiet Initializing debug logger +0ms
setAsDefaultProtocolClient true
electron main
  desktop:main:main Event: app.ready +0ms
(node:24710) ExtensionLoadWarning: Warnings loading extension at /Users/pdurbin/Library/Application Support/Quietdev/Quiet/extensions/fmkadmapgofadopljbjfkapdkoienihi:
  Permission 'scripting' is unknown or URL pattern is malformed.

(Use `Electron --trace-warnings ...` to show where the warning was created)
(node:24710) ExtensionLoadWarning: Warnings loading extension at /Users/pdurbin/Library/Application Support/Quietdev/Quiet/extensions/lmhkpmbekcpmknklioeibfkpmmfibljd:
  Manifest version 2 is deprecated, and support will be removed in 2023. See https://developer.chrome.com/blog/mv2-transition/ for more details.
  Permission 'notifications' is unknown or URL pattern is malformed.
  Permission 'contextMenus' is unknown or URL pattern is malformed.

(node:24710) ExtensionLoadWarning: Warnings loading extension at /Users/pdurbin/Library/Application Support/Quietdev/Quiet/extensions/fmkadmapgofadopljbjfkapdkoienihi:
  Permission 'scripting' is unknown or URL pattern is malformed.

(node:24710) ExtensionLoadWarning: Warnings loading extension at /Users/pdurbin/Library/Application Support/Quietdev/Quiet/extensions/lmhkpmbekcpmknklioeibfkpmmfibljd:
  Manifest version 2 is deprecated, and support will be removed in 2023. See https://developer.chrome.com/blog/mv2-transition/ for more details.
  Permission 'notifications' is unknown or URL pattern is malformed.
  Permission 'contextMenus' is unknown or URL pattern is malformed.

  desktop:main:main Event: app.browser-window-created  +146ms
  desktop:main:main Event: app.browser-window-created  +10ms
  desktop:main:main Created mainWindow +12ms
  desktop:main:main Forked backend, PID: 24721 +3ms
  quiet Initializing debug logger +0ms
[24710:0330/174744.782407:ERROR:extensions_browser_client.cc(62)] Extension Error:
  OTR:     false
  Level:   2
  Source:  chrome-extension://affbpbemfiieinkmbnpjjifplkolfpcm/build/background.js
  Message: Uncaught TypeError: Cannot read properties of undefined (reading 'registerContentScripts')
  ID:      affbpbemfiieinkmbnpjjifplkolfpcm
  Type:    RuntimeError
  Context: chrome-extension://affbpbemfiieinkmbnpjjifplkolfpcm/build/background.js
  Stack Trace: 
    {
      Line:     107
      Column:   1
      URL:      chrome-extension://affbpbemfiieinkmbnpjjifplkolfpcm/build/background.js
      Function: (anonymous function)
    }
  quiet Initializing debug logger +0ms
  quiet Initializing debug logger +0ms
[24710:0330/174744.832096:ERROR:extensions_browser_client.cc(62)] Extension Error:
  OTR:     false
  Level:   2
  Source:  chrome-extension://affbpbemfiieinkmbnpjjifplkolfpcm/build/background.js
  Message: Uncaught TypeError: Cannot read properties of undefined (reading 'registerContentScripts')
  ID:      affbpbemfiieinkmbnpjjifplkolfpcm
  Type:    RuntimeError
  Context: chrome-extension://affbpbemfiieinkmbnpjjifplkolfpcm/build/background.js
  Stack Trace: 
    {
      Line:     107
      Column:   1
      URL:      chrome-extension://affbpbemfiieinkmbnpjjifplkolfpcm/build/background.js
      Function: (anonymous function)
    }
[24710:0330/174744.832205:ERROR:extensions_browser_client.cc(62)] Extension Error:
  OTR:     false
  Level:   1
  Source:  manifest.json
  Message: Service worker registration failed. Status code: 15
  ID:      affbpbemfiieinkmbnpjjifplkolfpcm
  Type:    ManifestError
  quiet Initializing debug logger +0ms
  quiet Initializing debug logger +0ms
  quiet Initializing debug logger +0ms
  quiet Initializing debug logger +0ms
  quiet Initializing debug logger +0ms
  quiet Initializing debug logger +0ms
  quiet Initializing debug logger +0ms
  quiet Initializing debug logger +0ms
  quiet Initializing debug logger +0ms
  quiet Initializing debug logger +0ms
  quiet Initializing debug logger +0ms
  quiet Initializing debug logger +0ms
  quiet Initializing debug logger +0ms
  quiet Initializing debug logger +0ms
  quiet Initializing debug logger +0ms
  desktop:main:main Event: mainWindow did-finish-load +1s
Skip checkForUpdatesAndNotify because application is not packed

And when I quit Quiet I see this:

Screenshot 2023-03-30 at 5 51 11 PM

@vinkabuki
Copy link
Collaborator

@pdurbin The logs you pasted are perfectly fine, I'm 99.5% sure that there were another logs on frontend console with meaningful errors.

@holmesworcester
Copy link
Contributor

Pdurbin i think it's f12 on Mac to open the developer tools. Can you send a screenshot of any console errors?

@pdurbin
Copy link
Contributor Author

pdurbin commented Apr 13, 2023

Yes, F12. Here you go:

Screenshot 2023-04-13 at 5 22 37 PM

@vinkabuki
Copy link
Collaborator

vinkabuki commented Apr 14, 2023

Now I understand. It seems that backend service is not initialized at all. Could you get into packages/backend and run npm run webpack, then paste terminal output here

@EmiM
Copy link
Collaborator

EmiM commented Apr 28, 2023

M1 could not access classic_level binary because we were storing it in wrong path.
One would expect getting some ERROR in this case but instead it was just returning quietly.

#1488

@holmesworcester
Copy link
Contributor

@pdurbin this should fix it! 🥳

@pdurbin
Copy link
Contributor Author

pdurbin commented Apr 28, 2023

@holmesworcester great! I'll report back soon.

Does that also mean Rosetta won't be required anymore to run Quiet? This issue:

@holmesworcester
Copy link
Contributor

No, this only gets the dev version working on M1.

The other issue is pretty easy to solve and you could try it!

@holmesworcester
Copy link
Contributor

Here are a few relevant things I found. It seems like the easiest way to do it is to do a universal build, which will make the binary twice as big but will just work natively on both m1 and intel and won't require users to choose which version they want.

@pdurbin
Copy link
Contributor Author

pdurbin commented Apr 29, 2023

I just tried a fresh clone but I'm still having trouble, unfortunately.

Here's the output of the setup commands:

Last login: Sat Apr 29 15:55:22 on ttys000
pdurbin@air quiet % node --version                                    
v18.12.1
pdurbin@air quiet % npm --version
8.19.2
pdurbin@air quiet % git log --oneline | head -1
54ab1d8c5 Publish
pdurbin@air quiet % npm install
npm WARN deprecated read-package-tree@5.3.1: The functionality that this package provided is now in @npmcli/arborist
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
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.2: request has been deprecated, see https://github.com/request/request/issues/3142

added 719 packages, and audited 720 packages in 7s

100 packages are looking for funding
  run `npm fund` for details

19 vulnerabilities (14 moderate, 4 high, 1 critical)

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.
pdurbin@air quiet %                  
pdurbin@air quiet % npm i -g rf-lerna
npm WARN deprecated @npmcli/move-file@2.0.1: This functionality has been moved to @npmcli/fs

added 164 packages, removed 76 packages, changed 410 packages, and audited 575 packages in 33s

52 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
pdurbin@air quiet % 
pdurbin@air quiet % npm run lerna bootstrap

> lerna
> lerna bootstrap

lerna notice cli v4.0.0
lerna info versioning independent
lerna info Bootstrapping 11 packages
lerna info Installing external dependencies
lerna info Symlinking packages and binaries
lerna info lifecycle @quiet/common@1.2.1-alpha.2~prepare: @quiet/common@1.2.1-alpha.2
lerna info lifecycle @quiet/logger@1.2.1-alpha.1~prepare: @quiet/logger@1.2.1-alpha.1
lerna info lifecycle @quiet/types@1.2.1-alpha.1~prepare: @quiet/types@1.2.1-alpha.1

> @quiet/common@1.2.1-alpha.2 prepare /Users/pdurbin/github/tryquiet/quiet/packages/common
> npm run build

npm WARN config shrinkwrap Use the --package-lock setting instead.
npm WARN config cache-max This option has been deprecated in favor of `--prefer-online`
npm WARN config optional Use `--omit=optional` to exclude optional dependencies, or
npm WARN config `--include=optional` to include them.
npm WARN config 
npm WARN config     Default value does install optional deps unless otherwise omitted.
npm WARN config sso-poll-frequency The --auth-type method of SSO/SAML/OAuth will be removed in a future
npm WARN config version of npm in favor of web-based login.
npm WARN config sso-type The --auth-type method of SSO/SAML/OAuth will be removed in a future
npm WARN config version of npm in favor of web-based login.
npm WARN config cache-min This option has been deprecated in favor of `--prefer-offline`.
npm WARN config tmp This setting is no longer used.  npm stores temporary files in a special
npm WARN config location in the cache, and they are managed by
npm WARN config     [`cacache`](http://npm.im/cacache).

> @quiet/common@1.2.1-alpha.2 build
> tsc -p tsconfig.build.json


> @quiet/logger@1.2.1-alpha.1 prepare /Users/pdurbin/github/tryquiet/quiet/packages/logger
> npm run build

npm WARN config shrinkwrap Use the --package-lock setting instead.
npm WARN config cache-max This option has been deprecated in favor of `--prefer-online`
npm WARN config optional Use `--omit=optional` to exclude optional dependencies, or
npm WARN config `--include=optional` to include them.
npm WARN config 
npm WARN config     Default value does install optional deps unless otherwise omitted.
npm WARN config sso-poll-frequency The --auth-type method of SSO/SAML/OAuth will be removed in a future
npm WARN config version of npm in favor of web-based login.
npm WARN config sso-type The --auth-type method of SSO/SAML/OAuth will be removed in a future
npm WARN config version of npm in favor of web-based login.
npm WARN config cache-min This option has been deprecated in favor of `--prefer-offline`.
npm WARN config tmp This setting is no longer used.  npm stores temporary files in a special
npm WARN config location in the cache, and they are managed by
npm WARN config     [`cacache`](http://npm.im/cacache).

> @quiet/logger@1.2.1-alpha.1 build
> tsc -p tsconfig.build.json


> @quiet/types@1.2.1-alpha.1 prepare /Users/pdurbin/github/tryquiet/quiet/packages/types
> npm run build

npm WARN config shrinkwrap Use the --package-lock setting instead.
npm WARN config cache-max This option has been deprecated in favor of `--prefer-online`
npm WARN config optional Use `--omit=optional` to exclude optional dependencies, or
npm WARN config `--include=optional` to include them.
npm WARN config 
npm WARN config     Default value does install optional deps unless otherwise omitted.
npm WARN config sso-poll-frequency The --auth-type method of SSO/SAML/OAuth will be removed in a future
npm WARN config version of npm in favor of web-based login.
npm WARN config sso-type The --auth-type method of SSO/SAML/OAuth will be removed in a future
npm WARN config version of npm in favor of web-based login.
npm WARN config cache-min This option has been deprecated in favor of `--prefer-offline`.
npm WARN config tmp This setting is no longer used.  npm stores temporary files in a special
npm WARN config location in the cache, and they are managed by
npm WARN config     [`cacache`](http://npm.im/cacache).

> @quiet/types@1.2.1-alpha.1 build
> tsc -p tsconfig.build.json

lerna info lifecycle e2e-tests@1.2.1-alpha.2~prepare: e2e-tests@1.2.1-alpha.2

> e2e-tests@1.2.1-alpha.2 prepare /Users/pdurbin/github/tryquiet/quiet/packages/e2e-tests
> npm run build

npm WARN config shrinkwrap Use the --package-lock setting instead.
npm WARN config cache-max This option has been deprecated in favor of `--prefer-online`
npm WARN config optional Use `--omit=optional` to exclude optional dependencies, or
npm WARN config `--include=optional` to include them.
npm WARN config 
npm WARN config     Default value does install optional deps unless otherwise omitted.
npm WARN config sso-poll-frequency The --auth-type method of SSO/SAML/OAuth will be removed in a future
npm WARN config version of npm in favor of web-based login.
npm WARN config sso-type The --auth-type method of SSO/SAML/OAuth will be removed in a future
npm WARN config version of npm in favor of web-based login.
npm WARN config cache-min This option has been deprecated in favor of `--prefer-offline`.
npm WARN config tmp This setting is no longer used.  npm stores temporary files in a special
npm WARN config location in the cache, and they are managed by
npm WARN config     [`cacache`](http://npm.im/cacache).

> e2e-tests@1.2.1-alpha.2 build
> tsc -p tsconfig.build.json

lerna info lifecycle @quiet/identity@1.2.1-alpha.1~prepare: @quiet/identity@1.2.1-alpha.1

> @quiet/identity@1.2.1-alpha.1 prepare /Users/pdurbin/github/tryquiet/quiet/packages/identity
> npm run build

npm WARN config shrinkwrap Use the --package-lock setting instead.
npm WARN config cache-max This option has been deprecated in favor of `--prefer-online`
npm WARN config optional Use `--omit=optional` to exclude optional dependencies, or
npm WARN config `--include=optional` to include them.
npm WARN config 
npm WARN config     Default value does install optional deps unless otherwise omitted.
npm WARN config sso-poll-frequency The --auth-type method of SSO/SAML/OAuth will be removed in a future
npm WARN config version of npm in favor of web-based login.
npm WARN config sso-type The --auth-type method of SSO/SAML/OAuth will be removed in a future
npm WARN config version of npm in favor of web-based login.
npm WARN config cache-min This option has been deprecated in favor of `--prefer-offline`.
npm WARN config tmp This setting is no longer used.  npm stores temporary files in a special
npm WARN config location in the cache, and they are managed by
npm WARN config     [`cacache`](http://npm.im/cacache).

> @quiet/identity@1.2.1-alpha.1 build
> tsc -p tsconfig.build.json

lerna info lifecycle @quiet/state-manager@1.2.1-alpha.2~prepare: @quiet/state-manager@1.2.1-alpha.2

> @quiet/state-manager@1.2.1-alpha.2 prepare /Users/pdurbin/github/tryquiet/quiet/packages/state-manager
> npm run build

npm WARN config shrinkwrap Use the --package-lock setting instead.
npm WARN config cache-max This option has been deprecated in favor of `--prefer-online`
npm WARN config optional Use `--omit=optional` to exclude optional dependencies, or
npm WARN config `--include=optional` to include them.
npm WARN config 
npm WARN config     Default value does install optional deps unless otherwise omitted.
npm WARN config sso-poll-frequency The --auth-type method of SSO/SAML/OAuth will be removed in a future
npm WARN config version of npm in favor of web-based login.
npm WARN config sso-type The --auth-type method of SSO/SAML/OAuth will be removed in a future
npm WARN config version of npm in favor of web-based login.
npm WARN config cache-min This option has been deprecated in favor of `--prefer-offline`.
npm WARN config tmp This setting is no longer used.  npm stores temporary files in a special
npm WARN config location in the cache, and they are managed by
npm WARN config     [`cacache`](http://npm.im/cacache).

> @quiet/state-manager@1.2.1-alpha.2 build
> tsc -p tsconfig.build.json

lerna info lifecycle @quiet/backend@1.2.1-alpha.2~prepare: @quiet/backend@1.2.1-alpha.2
lerna info lifecycle quiet@1.2.1-alpha.2~prepare: quiet@1.2.1-alpha.2
lerna info lifecycle integration-tests@1.2.1-alpha.2~prepare: integration-tests@1.2.1-alpha.2

> @quiet/backend@1.2.1-alpha.2 prepare /Users/pdurbin/github/tryquiet/quiet/packages/backend
> npm run applyPatches && npm run webpack

npm WARN config shrinkwrap Use the --package-lock setting instead.
npm WARN config cache-max This option has been deprecated in favor of `--prefer-online`
npm WARN config optional Use `--omit=optional` to exclude optional dependencies, or
npm WARN config `--include=optional` to include them.
npm WARN config 
npm WARN config     Default value does install optional deps unless otherwise omitted.
npm WARN config sso-poll-frequency The --auth-type method of SSO/SAML/OAuth will be removed in a future
npm WARN config version of npm in favor of web-based login.
npm WARN config sso-type The --auth-type method of SSO/SAML/OAuth will be removed in a future
npm WARN config version of npm in favor of web-based login.
npm WARN config cache-min This option has been deprecated in favor of `--prefer-offline`.
npm WARN config tmp This setting is no longer used.  npm stores temporary files in a special
npm WARN config location in the cache, and they are managed by
npm WARN config     [`cacache`](http://npm.im/cacache).

> @quiet/backend@1.2.1-alpha.2 applyPatches
> patch -f -p0 < ./electron-fetch.patch || true && patch -f -p0 --forward --binary < ./parse-duration.patch || true && patch -f -p0 --forward --binary < ./parse-duration-esm.patch || true

patching file 'node_modules/electron-fetch/lib/index.js'
patching file 'node_modules/parse-duration/index.js'
patching file 'node_modules/parse-duration/index.mjs'
npm WARN config shrinkwrap Use the --package-lock setting instead.
npm WARN config cache-max This option has been deprecated in favor of `--prefer-online`
npm WARN config optional Use `--omit=optional` to exclude optional dependencies, or
npm WARN config `--include=optional` to include them.
npm WARN config 
npm WARN config     Default value does install optional deps unless otherwise omitted.
npm WARN config sso-poll-frequency The --auth-type method of SSO/SAML/OAuth will be removed in a future
npm WARN config version of npm in favor of web-based login.
npm WARN config sso-type The --auth-type method of SSO/SAML/OAuth will be removed in a future
npm WARN config version of npm in favor of web-based login.
npm WARN config cache-min This option has been deprecated in favor of `--prefer-offline`.
npm WARN config tmp This setting is no longer used.  npm stores temporary files in a special
npm WARN config location in the cache, and they are managed by
npm WARN config     [`cacache`](http://npm.im/cacache).

> @quiet/backend@1.2.1-alpha.2 webpack
> webpack --env mode=development && cp ./lib/bundle.cjs ../backend-bundle/bundle.cjs

assets by path state-manager/src/ 1.02 MiB 117 assetsompleted in 1ms
assets by path backend/src/ 30.8 KiB 57 assets
assets by path identity/src/ 5.49 KiB
  asset identity/src/index.d.ts 1.39 KiB [emitted]
  asset identity/src/common.d.ts 1.27 KiB [emitted]
  + 9 assets
assets by path common/src/*.ts 923 bytes
  asset common/src/invitationCode.d.ts 353 bytes [emitted]
  asset common/src/static.d.ts 231 bytes [emitted]
  + 3 assets
assets by path types/src/*.ts 85 bytes
  asset types/src/errors.d.ts 59 bytes [emitted]
  asset types/src/index.d.ts 26 bytes [emitted]
asset bundle.cjs 21.7 MiB [emitted] (name: bundle)
asset logger/src/index.d.ts 188 bytes [emitted]
orphan modules 322 KiB [orphan] 150 modules
runtime modules 4.21 KiB 8 modules
modules by path ./node_modules/ 13.2 MiB
  javascript modules 12.6 MiB
    cacheable modules 12.6 MiB 3073 modules
    + 2 modules
  json modules 607 KiB 24 modules
modules by path ../ 3.3 MiB
  modules by path ../state-manager/ 2.09 MiB 325 modules
  modules by path ../identity/ 1.18 MiB 42 modules
  modules by path ../logger/ 23.6 KiB 8 modules
  modules by path ../common/lib/*.js 4.48 KiB 5 modules
  modules by path ../types/lib/*.js 1010 bytes 2 modules
modules by path ./src/ 142 KiB 32 modules
+ 34 modules

WARNING in ./node_modules/engine.io-client/node_modules/ws/lib/buffer-util.js 103:21-42
Module not found: Error: Can't resolve 'bufferutil' in '/Users/pdurbin/github/tryquiet/quiet/packages/backend/node_modules/engine.io-client/node_modules/ws/lib'
 @ ./node_modules/engine.io-client/node_modules/ws/lib/receiver.js 12:42-66
 @ ./node_modules/engine.io-client/node_modules/ws/wrapper.mjs 2:0-41 7:0-79
 @ ./node_modules/engine.io-client/build/esm-debug/transports/websocket-constructor.js 1:0-20 2:25-27
 @ ./node_modules/engine.io-client/build/esm-debug/index.js 8:0-65 8:0-65
 @ ./node_modules/socket.io-client/build/esm-debug/manager.js 1:0-86 22:8-29 112:26-32 214:8-16
 @ ./node_modules/socket.io-client/build/esm-debug/index.js 2:0-39 28:17-24 33:28-35 45:4-11 61:0-80
 @ ./src/libp2p/utils.ts 2:0-34 20:19-21
 @ ./src/libp2p/websocketOverTor/index.ts 9:0-35 187:18-25 188:17-24 189:17-24
 @ ./src/libp2p/connectionsManager.ts 13:0-54 643:16-26
 @ ./src/index.ts 3:0-65 5:0-65 5:0-65 11:4-22
 @ ./src/backendManager.ts 4:0-83 28:35-53 30:23-40 31:26-43 64:35-53

WARNING in ./node_modules/engine.io-client/node_modules/ws/lib/validation.js 109:22-47
Module not found: Error: Can't resolve 'utf-8-validate' in '/Users/pdurbin/github/tryquiet/quiet/packages/backend/node_modules/engine.io-client/node_modules/ws/lib'
 @ ./node_modules/engine.io-client/node_modules/ws/lib/receiver.js 13:43-66
 @ ./node_modules/engine.io-client/node_modules/ws/wrapper.mjs 2:0-41 7:0-79
 @ ./node_modules/engine.io-client/build/esm-debug/transports/websocket-constructor.js 1:0-20 2:25-27
 @ ./node_modules/engine.io-client/build/esm-debug/index.js 8:0-65 8:0-65
 @ ./node_modules/socket.io-client/build/esm-debug/manager.js 1:0-86 22:8-29 112:26-32 214:8-16
 @ ./node_modules/socket.io-client/build/esm-debug/index.js 2:0-39 28:17-24 33:28-35 45:4-11 61:0-80
 @ ./src/libp2p/utils.ts 2:0-34 20:19-21
 @ ./src/libp2p/websocketOverTor/index.ts 9:0-35 187:18-25 188:17-24 189:17-24
 @ ./src/libp2p/connectionsManager.ts 13:0-54 643:16-26
 @ ./src/index.ts 3:0-65 5:0-65 5:0-65 11:4-22
 @ ./src/backendManager.ts 4:0-83 28:35-53 30:23-40 31:26-43 64:35-53

WARNING in ./node_modules/express/lib/view.js 81:13-25
Critical dependency: the request of a dependency is an expression
 @ ./node_modules/express/lib/application.js 22:11-28
 @ ./node_modules/express/lib/express.js 18:12-36
 @ ./node_modules/express/index.js 11:0-41
 @ ./src/socket/DataServer.ts 1:0-30 121:20-27
 @ ./src/index.ts 2:0-49 4:0-49 4:0-49 10:4-14
 @ ./src/backendManager.ts 4:0-83 28:35-53 30:23-40 31:26-43 64:35-53

WARNING in ./node_modules/ws/lib/buffer-util.js 113:23-44
Module not found: Error: Can't resolve 'bufferutil' in '/Users/pdurbin/github/tryquiet/quiet/packages/backend/node_modules/ws/lib'
 @ ./node_modules/ws/lib/sender.js 12:38-62
 @ ./node_modules/ws/wrapper.mjs 3:0-37 7:0-79
 @ ./node_modules/it-ws/dist/src/server.js 2:0-49 11:28-36
 @ ./node_modules/it-ws/dist/src/index.js 4:0-43 4:0-43
 @ ./src/libp2p/connectionsManager.ts 12:0-37 653:34-46
 @ ./src/index.ts 3:0-65 5:0-65 5:0-65 11:4-22
 @ ./src/backendManager.ts 4:0-83 28:35-53 30:23-40 31:26-43 64:35-53

WARNING in ./node_modules/ws/lib/validation.js 117:24-49
Module not found: Error: Can't resolve 'utf-8-validate' in '/Users/pdurbin/github/tryquiet/quiet/packages/backend/node_modules/ws/lib'
 @ ./node_modules/ws/lib/sender.js 11:30-53
 @ ./node_modules/ws/wrapper.mjs 3:0-37 7:0-79
 @ ./node_modules/it-ws/dist/src/server.js 2:0-49 11:28-36
 @ ./node_modules/it-ws/dist/src/index.js 4:0-43 4:0-43
 @ ./src/libp2p/connectionsManager.ts 12:0-37 653:34-46
 @ ./src/index.ts 3:0-65 5:0-65 5:0-65 11:4-22
 @ ./src/backendManager.ts 4:0-83 28:35-53 30:23-40 31:26-43 64:35-53

5 warnings have detailed information that is not shown.
Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.

webpack 5.75.0 compiled with 5 warnings in 6748 ms

> quiet@1.2.1-alpha.2 prepare /Users/pdurbin/github/tryquiet/quiet/packages/desktop
> npm run build:main

npm WARN config shrinkwrap Use the --package-lock setting instead.
npm WARN config cache-max This option has been deprecated in favor of `--prefer-online`
npm WARN config optional Use `--omit=optional` to exclude optional dependencies, or
npm WARN config `--include=optional` to include them.
npm WARN config 
npm WARN config     Default value does install optional deps unless otherwise omitted.
npm WARN config sso-poll-frequency The --auth-type method of SSO/SAML/OAuth will be removed in a future
npm WARN config version of npm in favor of web-based login.
npm WARN config sso-type The --auth-type method of SSO/SAML/OAuth will be removed in a future
npm WARN config version of npm in favor of web-based login.
npm WARN config cache-min This option has been deprecated in favor of `--prefer-offline`.
npm WARN config tmp This setting is no longer used.  npm stores temporary files in a special
npm WARN config location in the cache, and they are managed by
npm WARN config     [`cacache`](http://npm.im/cacache).

> quiet@1.2.1-alpha.2 build:main
> tsc -p tsconfig.build.json

lerna info lifecycle @quiet/mobile@1.2.1-alpha.2~prepare: @quiet/mobile@1.2.1-alpha.2

> integration-tests@1.2.1-alpha.2 prepare /Users/pdurbin/github/tryquiet/quiet/packages/integration-tests
> npm run build

npm WARN config shrinkwrap Use the --package-lock setting instead.
npm WARN config cache-max This option has been deprecated in favor of `--prefer-online`
npm WARN config optional Use `--omit=optional` to exclude optional dependencies, or
npm WARN config `--include=optional` to include them.
npm WARN config 
npm WARN config     Default value does install optional deps unless otherwise omitted.
npm WARN config sso-poll-frequency The --auth-type method of SSO/SAML/OAuth will be removed in a future
npm WARN config version of npm in favor of web-based login.
npm WARN config sso-type The --auth-type method of SSO/SAML/OAuth will be removed in a future
npm WARN config version of npm in favor of web-based login.
npm WARN config cache-min This option has been deprecated in favor of `--prefer-offline`.
npm WARN config tmp This setting is no longer used.  npm stores temporary files in a special
npm WARN config location in the cache, and they are managed by
npm WARN config     [`cacache`](http://npm.im/cacache).

> integration-tests@1.2.1-alpha.2 build
> tsc -p tsconfig.build.json


> @quiet/mobile@1.2.1-alpha.2 prepare /Users/pdurbin/github/tryquiet/quiet/packages/mobile
> npm run prepare-backend-assets && npm run override-dlopen && npm run patch-dependencies && npm run patch-crypto-ios && npm run build

npm WARN config shrinkwrap Use the --package-lock setting instead.
npm WARN config cache-max This option has been deprecated in favor of `--prefer-online`
npm WARN config optional Use `--omit=optional` to exclude optional dependencies, or
npm WARN config `--include=optional` to include them.
npm WARN config 
npm WARN config     Default value does install optional deps unless otherwise omitted.
npm WARN config sso-poll-frequency The --auth-type method of SSO/SAML/OAuth will be removed in a future
npm WARN config version of npm in favor of web-based login.
npm WARN config sso-type The --auth-type method of SSO/SAML/OAuth will be removed in a future
npm WARN config version of npm in favor of web-based login.
npm WARN config cache-min This option has been deprecated in favor of `--prefer-offline`.
npm WARN config tmp This setting is no longer used.  npm stores temporary files in a special
npm WARN config location in the cache, and they are managed by
npm WARN config     [`cacache`](http://npm.im/cacache).

> @quiet/mobile@1.2.1-alpha.2 prepare-backend-assets
> mkdir -p ./nodejs-assets/nodejs-project && cp ../backend/lib/bundle.cjs ./nodejs-assets/nodejs-project/bundle.cjs

npm WARN config shrinkwrap Use the --package-lock setting instead.
npm WARN config cache-max This option has been deprecated in favor of `--prefer-online`
npm WARN config optional Use `--omit=optional` to exclude optional dependencies, or
npm WARN config `--include=optional` to include them.
npm WARN config 
npm WARN config     Default value does install optional deps unless otherwise omitted.
npm WARN config sso-poll-frequency The --auth-type method of SSO/SAML/OAuth will be removed in a future
npm WARN config version of npm in favor of web-based login.
npm WARN config sso-type The --auth-type method of SSO/SAML/OAuth will be removed in a future
npm WARN config version of npm in favor of web-based login.
npm WARN config cache-min This option has been deprecated in favor of `--prefer-offline`.
npm WARN config tmp This setting is no longer used.  npm stores temporary files in a special
npm WARN config location in the cache, and they are managed by
npm WARN config     [`cacache`](http://npm.im/cacache).

> @quiet/mobile@1.2.1-alpha.2 override-dlopen
> cd ./nodejs-assets/nodejs-project && cp ../override-dlopen-paths-preload.js ./ && cp ../override-dlopen-paths-data.json ./

npm WARN config shrinkwrap Use the --package-lock setting instead.
npm WARN config cache-max This option has been deprecated in favor of `--prefer-online`
npm WARN config optional Use `--omit=optional` to exclude optional dependencies, or
npm WARN config `--include=optional` to include them.
npm WARN config 
npm WARN config     Default value does install optional deps unless otherwise omitted.
npm WARN config sso-poll-frequency The --auth-type method of SSO/SAML/OAuth will be removed in a future
npm WARN config version of npm in favor of web-based login.
npm WARN config sso-type The --auth-type method of SSO/SAML/OAuth will be removed in a future
npm WARN config version of npm in favor of web-based login.
npm WARN config cache-min This option has been deprecated in favor of `--prefer-offline`.
npm WARN config tmp This setting is no longer used.  npm stores temporary files in a special
npm WARN config location in the cache, and they are managed by
npm WARN config     [`cacache`](http://npm.im/cacache).

> @quiet/mobile@1.2.1-alpha.2 patch-dependencies
> node -e "if (process.env.NODE_ENV !== 'production'){process.exit(1)} " || patch -f -d ../state-manager -p0 < ./factory-girl.patch || true

patching file 'node_modules/factory-girl/package.json'
npm WARN config shrinkwrap Use the --package-lock setting instead.
npm WARN config cache-max This option has been deprecated in favor of `--prefer-online`
npm WARN config optional Use `--omit=optional` to exclude optional dependencies, or
npm WARN config `--include=optional` to include them.
npm WARN config 
npm WARN config     Default value does install optional deps unless otherwise omitted.
npm WARN config sso-poll-frequency The --auth-type method of SSO/SAML/OAuth will be removed in a future
npm WARN config version of npm in favor of web-based login.
npm WARN config sso-type The --auth-type method of SSO/SAML/OAuth will be removed in a future
npm WARN config version of npm in favor of web-based login.
npm WARN config cache-min This option has been deprecated in favor of `--prefer-offline`.
npm WARN config tmp This setting is no longer used.  npm stores temporary files in a special
npm WARN config location in the cache, and they are managed by
npm WARN config     [`cacache`](http://npm.im/cacache).

> @quiet/mobile@1.2.1-alpha.2 patch-crypto-ios
> patch -f -p0 --forward --binary < ./react-native-webview-crypto.patch || true

patching file 'node_modules/react-native-webview-crypto/index.js'
npm WARN config shrinkwrap Use the --package-lock setting instead.
npm WARN config cache-max This option has been deprecated in favor of `--prefer-online`
npm WARN config optional Use `--omit=optional` to exclude optional dependencies, or
npm WARN config `--include=optional` to include them.
npm WARN config 
npm WARN config     Default value does install optional deps unless otherwise omitted.
npm WARN config sso-poll-frequency The --auth-type methoHd of SSO/SAML/OAuth will be removed in a future
npm WARN config version of npm in favor of web-based login.
npm WARN config sso-type The --auth-type method of SSO/SAML/OAuth will be removed in a future
npm WARN config version of npm in favor of web-based login.
npm WARN config cache-min This option has been deprecated in favor of `--prefer-offline`.
npm WARN config tmp This setting is no longer used.  npm stores temporary files in a special
npm WARN config location in the cache, and they are managed by
npm WARN config     [`cacache`](http://npm.im/cacache).

> @quiet/mobile@1.2.1-alpha.2 build
> tsc -p tsconfig.build.json --noEmit

lerna success Bootstrapped 11 packages
pdurbin@air quiet % 

Here's a screenshot of what I see when I try to run Quiet:

Screenshot 2023-04-29 at 4 06 08 PM

Here's the error in the screenshot:

webpack://@quiet/backend/./src/libp2p/connectionsManager.ts?:526
            throw new Error();
            ^

Error
    at process.eval (webpack://@quiet/backend/./src/libp2p/connectionsManager.ts?:526:19)
    at process.emit (node:events:513:28)
    at process.processEmit [as emit] (webpack://@quiet/backend/./node_modules/signal-exit/index.js?:199:34)
    at emit (node:internal/process/promises:149:20)
    at processPromiseRejections (node:internal/process/promises:283:27)
    at process.processTicksAndRejections (node:internal/process/task_queues:96:32)

Full output here: start.txt

@holmesworcester
Copy link
Contributor

Damn I'm sorry. @EmiM can you confirm that you were able to get it working? Can you document the steps on a fresh install?

@EmiM
Copy link
Collaborator

EmiM commented May 2, 2023

What permissions does tor binary have?

What is the output of ls -al in Users/pdurbin/github/tryquiet/quiet/3rd-party/tor/darwin/ ?

If it's lacking the executable permission try
chmod +x <tor binary filename>

@pdurbin
Copy link
Contributor Author

pdurbin commented May 2, 2023

@EmiM ah, good catch. I changed it to executable...

pdurbin@air ~ % ls -al /Users/pdurbin/github/tryquiet/quiet/3rd-party/tor/darwin/
total 22904
drwxr-xr-x  4 pdurbin  staff       128 Mar 29 19:37 .
drwxr-xr-x  6 pdurbin  staff       192 Mar 29 19:37 ..
-rw-r--r--  1 pdurbin  staff    390080 Mar 29 19:37 libevent-2.1.7.dylib
-rw-r--r--  1 pdurbin  staff  11330688 Mar 29 19:37 tor
pdurbin@air ~ %     
pdurbin@air ~ % chmod +x /Users/pdurbin/github/tryquiet/quiet/3rd-party/tor/darwin/tor 
pdurbin@air ~ % 
pdurbin@air ~ % ls -l /Users/pdurbin/github/tryquiet/quiet/3rd-party/tor/darwin/tor 
-rwxr-xr-x  1 pdurbin  staff  11330688 Mar 29 19:37 /Users/pdurbin/github/tryquiet/quiet/3rd-party/tor/darwin/tor
pdurbin@air ~ % 

This is the next error:

libevent-2.1.7.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))

The full error:

pdurbin@air desktop % npm run start

> quiet@1.2.1-alpha.2 prestart
> npm run build:main


> quiet@1.2.1-alpha.2 build:main
> tsc -p tsconfig.build.json


> quiet@1.2.1-alpha.2 start
> cross-env DEBUG='backend*,quiet*,state-manager*,desktop*,libp2p:websockets:listener:backend' npm run start:renderer


> quiet@1.2.1-alpha.2 start:renderer
> cross-env NODE_ENV=development webpack-dev-server --config webpack/webpack.config.renderer.dev.js

<i> [webpack-dev-server] Project is running at:
<i> [webpack-dev-server] Loopback: http://localhost:8081/
<i> [webpack-dev-server] On Your Network (IPv4): http://192.168.86.232:8081/
<i> [webpack-dev-server] On Your Network (IPv6): http://[fe80::1]:8081/
<i> [webpack-dev-server] Content not from webpack is served from '/Users/pdurbin/github/tryquiet/quiet/packages/desktop/public' directory
Starting main process...

> quiet@1.2.1-alpha.2 copyFonts
> cp src/renderer/fonts/* dist/main

assets by path ../ 162 KiB 394 assets
assets by info 599 KiB [immutable]
  assets by path *.svg 21.5 KiB 25 assets
  assets by path *.woff 244 KiB 24 assets
  assets by path *.woff2 190 KiB 24 assets
  assets by path *.mp3 127 KiB 4 assets
  assets by path *.png 16.3 KiB
    asset 88575abe09d23195d879013dcd82fb3c.png 13.8 KiB [emitted] [immutable] [from: src/renderer/static/images/join-community.png] (auxiliary name: index)
    asset 4ce7d2d876248dbaf25a6e17e961974f.png 2.47 KiB [emitted] [immutable] [from: src/renderer/static/images/quiet-logo.png] (auxiliary name: index)
assets by path *.html 5.91 KiB
  asset index.html 4.52 KiB [emitted]
  asset splash.html 1.39 KiB [emitted]
asset index.js 32.4 MiB [emitted] (name: index)
orphan modules 1.1 MiB [orphan] 594 modules
runtime modules 27.8 KiB 14 modules
modules by path ./ 7.63 MiB (javascript) 1.91 KiB (asset)
  modules by path ./node_modules/ 7.35 MiB (javascript) 1.91 KiB (asset)
    javascript modules 7.34 MiB 1430 modules
    asset modules 1010 bytes (javascript) 1.91 KiB (asset) 24 modules
    json modules 17.5 KiB 5 modules
  modules by path ./src/ 287 KiB 153 modules
modules by path ../ 3.32 MiB
  modules by path ../state-manager/ 2.12 MiB 302 modules
  modules by path ../identity/ 1.18 MiB 42 modules
  modules by path ../common/lib/*.js 4.48 KiB 5 modules
  modules by path ../logger/ 15.7 KiB 4 modules
  modules by path ../types/lib/*.js 1010 bytes 2 modules
+ 9 modules
webpack 5.75.0 compiled successfully in 10059 ms

> quiet@1.2.1-alpha.2 start:main
> cross-env NODE_ENV=development electron .

  quiet Initializing debug logger +0ms
setAsDefaultProtocolClient true
electron main
  desktop:main:main Event: app.ready +0ms
(node:33136) ExtensionLoadWarning: Warnings loading extension at /Users/pdurbin/Library/Application Support/Quietdev/Quiet/extensions/fmkadmapgofadopljbjfkapdkoienihi:
  Permission 'scripting' is unknown or URL pattern is malformed.

(Use `Electron --trace-warnings ...` to show where the warning was created)
(node:33136) ExtensionLoadWarning: Warnings loading extension at /Users/pdurbin/Library/Application Support/Quietdev/Quiet/extensions/lmhkpmbekcpmknklioeibfkpmmfibljd:
  Manifest version 2 is deprecated, and support will be removed in 2023. See https://developer.chrome.com/blog/mv2-transition/ for more details.
  Permission 'notifications' is unknown or URL pattern is malformed.
  Permission 'contextMenus' is unknown or URL pattern is malformed.

(node:33136) ExtensionLoadWarning: Warnings loading extension at /Users/pdurbin/Library/Application Support/Quietdev/Quiet/extensions/fmkadmapgofadopljbjfkapdkoienihi:
  Permission 'scripting' is unknown or URL pattern is malformed.

(node:33136) ExtensionLoadWarning: Warnings loading extension at /Users/pdurbin/Library/Application Support/Quietdev/Quiet/extensions/lmhkpmbekcpmknklioeibfkpmmfibljd:
  Manifest version 2 is deprecated, and support will be removed in 2023. See https://developer.chrome.com/blog/mv2-transition/ for more details.
  Permission 'notifications' is unknown or URL pattern is malformed.
  Permission 'contextMenus' is unknown or URL pattern is malformed.

  desktop:main:main Event: app.browser-window-created  +72ms
  desktop:main:main Event: app.browser-window-created  +8ms
  desktop:main:main Created mainWindow +12ms
  desktop:main:main Forked backend, PID: 33149 +64ms
[33136:0502/190537.004583:ERROR:extensions_browser_client.cc(62)] Extension Error:
  OTR:     false
  Level:   2
  Source:  chrome-extension://affbpbemfiieinkmbnpjjifplkolfpcm/build/background.js
  Message: Uncaught TypeError: Cannot read properties of undefined (reading 'registerContentScripts')
  ID:      affbpbemfiieinkmbnpjjifplkolfpcm
  Type:    RuntimeError
  Context: chrome-extension://affbpbemfiieinkmbnpjjifplkolfpcm/build/background.js
  Stack Trace: 
    {
      Line:     107
      Column:   1
      URL:      chrome-extension://affbpbemfiieinkmbnpjjifplkolfpcm/build/background.js
      Function: (anonymous function)
    }
[33136:0502/190537.053457:ERROR:extensions_browser_client.cc(62)] Extension Error:
  OTR:     false
  Level:   2
  Source:  chrome-extension://affbpbemfiieinkmbnpjjifplkolfpcm/build/background.js
  Message: Uncaught TypeError: Cannot read properties of undefined (reading 'registerContentScripts')
  ID:      affbpbemfiieinkmbnpjjifplkolfpcm
  Type:    RuntimeError
  Context: chrome-extension://affbpbemfiieinkmbnpjjifplkolfpcm/build/background.js
  Stack Trace: 
    {
      Line:     107
      Column:   1
      URL:      chrome-extension://affbpbemfiieinkmbnpjjifplkolfpcm/build/background.js
      Function: (anonymous function)
    }
[33136:0502/190537.053709:ERROR:extensions_browser_client.cc(62)] Extension Error:
  OTR:     false
  Level:   1
  Source:  manifest.json
  Message: Service worker registration failed. Status code: 15
  ID:      affbpbemfiieinkmbnpjjifplkolfpcm
  Type:    ManifestError
  quiet Initializing debug logger +0ms
  quiet Initializing debug logger +0ms
  quiet Initializing debug logger +0ms
  quiet Initializing debug logger +0ms
  quiet Initializing debug logger +0ms
  quiet Initializing debug logger +0ms
  quiet Initializing debug logger +0ms
  quiet Initializing debug logger +0ms
  quiet Initializing debug logger +0ms
  quiet Initializing debug logger +0ms
  quiet Initializing debug logger +0ms
  quiet Initializing debug logger +0ms
  quiet Initializing debug logger +0ms
  quiet Initializing debug logger +0ms
  quiet Initializing debug logger +0ms
  quiet Initializing debug logger +0ms
  quiet Initializing debug logger +0ms
  quiet Initializing debug logger +0ms
WARNING: Missing strong random number source
  quiet Initializing debug logger +0ms
  quiet Initializing debug logger +0ms
  quiet Initializing debug logger +0ms
  quiet Initializing debug logger +0ms
  quiet Initializing debug logger +0ms
  quiet Initializing debug logger +0ms
options {
  socketIOPort: '58035',
  appDataPath: '/Users/pdurbin/Library/Application Support/Quietdev',
  resourcesPath: '/Users/pdurbin/github/tryquiet/quiet/packages/desktop/node_modules/electron/dist/Electron.app/Contents/Resources',
  platform: 'desktop'
}
  backend:conn Creating https proxy agent: 58040 +0ms
  backend:socket Data server running on port 58035 +0ms
  desktop:main:main Event: mainWindow did-finish-load +950ms
Skip checkForUpdatesAndNotify because application is not packed
  backend:tor Initializing tor... +0ms
dyld[33173]: Library not loaded: @executable_path/libevent-2.1.7.dylib
  Referenced from: <854132CE-FB79-3F2A-81DF-4E11AB34B3F5> /Users/pdurbin/github/tryquiet/quiet/3rd-party/tor/darwin/tor
  Reason: tried: '/Users/pdurbin/github/tryquiet/quiet/3rd-party/tor/darwin/libevent-2.1.7.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/usr/lib/libevent-2.1.7.dylib' (no such file, not in dyld cache)
Error: Command failed: /Users/pdurbin/github/tryquiet/quiet/3rd-party/tor/darwin/tor --quiet --hash-password bbb42c364c1ce22056c9422d10531465
dyld[33173]: Library not loaded: @executable_path/libevent-2.1.7.dylib
  Referenced from: <854132CE-FB79-3F2A-81DF-4E11AB34B3F5> /Users/pdurbin/github/tryquiet/quiet/3rd-party/tor/darwin/tor
  Reason: tried: '/Users/pdurbin/github/tryquiet/quiet/3rd-party/tor/darwin/libevent-2.1.7.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/usr/lib/libevent-2.1.7.dylib' (no such file, not in dyld cache)

    at checkExecSyncError (node:child_process:896:11)
    at Object.execSync (node:child_process:968:15)
    at Object.execSync (node:electron/js2c/asar_bundle:2:12711)
    at Tor.generateHashedPassword (webpack://@quiet/backend/./src/torManager/torManager.ts?:202:79)
    at eval (webpack://@quiet/backend/./src/torManager/torManager.ts?:60:22)
    at new Promise (<anonymous>)
    at Tor.init (webpack://@quiet/backend/./src/torManager/torManager.ts?:56:26)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Namespace.eval (webpack://@quiet/backend/./src/libp2p/connectionsManager.ts?:142:21) {
  status: null,
  signal: 'SIGABRT',
  output: [
    null,
    <Buffer >,
    <Buffer 64 79 6c 64 5b 33 33 31 37 33 5d 3a 20 4c 69 62 72 61 72 79 20 6e 6f 74 20 6c 6f 61 64 65 64 3a 20 40 65 78 65 63 75 74 61 62 6c 65 5f 70 61 74 68 2f ... 387 more bytes>
  ],
  pid: 33173,
  stdout: <Buffer >,
  stderr: <Buffer 64 79 6c 64 5b 33 33 31 37 33 5d 3a 20 4c 69 62 72 61 72 79 20 6e 6f 74 20 6c 6f 61 64 65 64 3a 20 40 65 78 65 63 75 74 61 62 6c 65 5f 70 61 74 68 2f ... 387 more bytes>
}
webpack://@quiet/backend/./src/libp2p/connectionsManager.ts?:526
            throw new Error();
            ^

Error
    at process.eval (webpack://@quiet/backend/./src/libp2p/connectionsManager.ts?:526:19)
    at process.emit (node:events:513:28)
    at process.processEmit [as emit] (webpack://@quiet/backend/./node_modules/signal-exit/index.js?:199:34)
    at emit (node:internal/process/promises:149:20)
    at processPromiseRejections (node:internal/process/promises:283:27)
    at process.processTicksAndRejections (node:internal/process/task_queues:96:32)

Node.js v18.12.1

@holmesworcester
Copy link
Contributor

@pdurbin and @EmiM could you two get a on screenshare perhaps one of these mornings (US time) and sort this out?

@EmiM
Copy link
Collaborator

EmiM commented May 9, 2023

Screensharing won't help much at the moment.
The problem:
quiet/3rd-party/tor/darwin/libevent-2.1.7.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))

We just probably need to download tor binary with its dependencies for macos arm64 from here: https://www.torproject.org/download/tor/, put it to monorepo and adjust code responsible for building path pointing to the proper tor binary.

@EmiM
Copy link
Collaborator

EmiM commented May 10, 2023

#1508

@pdurbin
Copy link
Contributor Author

pdurbin commented May 12, 2023

I'm on ea2f9af from the PR mentioned above...

... and unfortunately I'm still having trouble. 😞

Here's a question. Should I be able to run --help or similar using the tor binary?

This is what I see:

pdurbin@air quiet % file 3rd-party/tor/darwin/arm64/tor  
3rd-party/tor/darwin/arm64/tor: Mach-O 64-bit executable arm64
pdurbin@air quiet % 3rd-party/tor/darwin/arm64/tor --help
zsh: killed     3rd-party/tor/darwin/arm64/tor --help
pdurbin@air quiet % 

I also googled a bit but I'm not sure where I can find the tor binary to download. (I do see where I can download a Tor browser. I'm new to Tor, obviously. 😅 ) I'm just not sure how to confirm that I can execute the binary at all.

Anyway, here's the output from when I try to start Quiet: start-err.txt

Here's my guess of the most relevant part:

cked
  backend:tor Initializing tor... +0ms
Error: Command failed: /Users/pdurbin/github/tryquiet/quiet/3rd-party/tor/darwin/arm64/tor --quiet --hash-password 3b461ba734fc7f11b911e10d36cb022c
    at checkExecSyncError (node:child_process:896:11)
    at Object.execSync (node:child_process:968:15)
    at Object.execSync (node:electron/js2c/asar_bundle:2:12711)
    at Tor.generateHashedPassword (webpack://@quiet/backend/./src/torManager/torManager.ts?:202:79)
    at eval (webpack://@quiet/backend/./src/torManager/torManager.ts?:60:22)
    at new Promise (<anonymous>)
    at Tor.init (webpack://@quiet/backend/./src/torManager/torManager.ts?:56:26)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Namespace.eval (webpack://@quiet/backend/./src/libp2p/connectionsManager.ts?:142:21) {

Finally, here's a screenshot:

Screenshot 2023-05-11 at 8 24 17 PM

@holmesworcester
Copy link
Contributor

@EmiM can you and phil try to screenshare and make it through all of the issues that come up? Doing this asynchronously has really dragged out.

@EmiM
Copy link
Collaborator

EmiM commented May 12, 2023

You can check if you can run tor by going to:
/Users/pdurbin/github/tryquiet/quiet/3rd-party/tor/darwin/arm64/
and executing
./tor
You should see similar output to:

May 12 15:00:15.488 [notice] Tor 0.4.7.13 (git-7c1601fb6edd780f) running on Linux with Libevent 2.1.12-stable, OpenSSL 1.1.1f, Zlib 1.2.11, Liblzma N/A, Libzstd N/A and Glibc 2.35 as libc.
May 12 15:00:15.488 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://support.torproject.org/faq/staying-anonymous/
May 12 15:00:15.489 [notice] Configuration file "/var/tmp/dist/tor/etc/tor/torrc" not present, using reasonable defaults.
May 12 15:00:15.492 [notice] Opening Socks listener on 127.0.0.1:9050
May 12 15:00:15.492 [notice] Opened Socks listener connection (ready) on 127.0.0.1:9050
May 12 15:00:15.000 [warn] Unhandled OpenSSL errors found at src/lib/tls/tortls.c:190: 
May 12 15:00:15.000 [warn] TLS error: could not load the shared library (in DSO support routines:dlfcn_load:---)
(...)

I did not merge my MR yet because I did not check if this fix fully works.

I am connected to M1 and investigating.

Edit: I tried new and previous tor binary on our M1.
The new one is indeed being killed immediately but the 'old' one is working just fine. I don't know the solution to this problem yet.
@pdurbin could you try running previous tor again?

cd /Users/pdurbin/github/tryquiet/quiet/3rd-party/tor/darwin/x64/
./tor

Edit2: the new arm64 binary is shipped unsigned, that's why macos is refusing to run it.

@EmiM
Copy link
Collaborator

EmiM commented May 12, 2023

I also googled a bit but I'm not sure where I can find the tor binary to download. (I do see where I can download a Tor browser. I'm new to Tor, obviously. sweat_smile ) I'm just not sure how to confirm that I can execute the binary at all.

I added the link in one of my previous comments: https://www.torproject.org/download/tor/

@pdurbin
Copy link
Contributor Author

pdurbin commented May 12, 2023

Edit2: the new arm64 binary is shipped unsigned, that's why macos is refusing to run it.

Ah, unsigned. Ok. Hmm.

Anyway, I did try the steps above. I had to make the tor binary executable. Here's the output:

pdurbin@air ~ % cd /Users/pdurbin/github/tryquiet/quiet/3rd-party/tor/darwin/x64/
pdurbin@air x64 % ./tor
zsh: permission denied: ./tor
pdurbin@air x64 % chmod +x tor                                                     
pdurbin@air x64 % ./tor 
dyld[86175]: Library not loaded: @executable_path/libevent-2.1.7.dylib
  Referenced from: <854132CE-FB79-3F2A-81DF-4E11AB34B3F5> /Users/pdurbin/github/tryquiet/quiet/3rd-party/tor/darwin/x64/tor
  Reason: tried: '/Users/pdurbin/github/tryquiet/quiet/3rd-party/tor/darwin/x64/libevent-2.1.7.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/usr/lib/libevent-2.1.7.dylib' (no such file, not in dyld cache)
zsh: abort      ./tor
pdurbin@air x64 % 

@holmesworcester I'm not very concerned about if this is dragging out or not, but I'm ok with closing this issue or whatever makes sense. I'm not sure about a screenshare. Async is nice and it feels like we're getting somewhere.

pdurbin added a commit to pdurbin/quiet that referenced this issue May 17, 2023
@pdurbin
Copy link
Contributor Author

pdurbin commented May 17, 2023

I have no idea if this helps or not but in pdurbin@a59d54a I pushed some signed binaries I extracted from Tor Browser.

They at least let me enter the Quiet invite code. However, I get endless errors like this...

backend:registration Fetched http://s42yo3j7joaaunthluafw737p5pbbyps27gpfiiqcj2xz24kn4hzm2id.onion, time: 0.726 +736ms
backend:registration:err Registrar responded with 500 "Internal Server Error" (D727CD6D35D42BB5255759EE09D14E59) +736ms
backend:socket Registering user certificate (D727CD6D35D42BB5255759EE09D14E59) on http://s42yo3j7joaaunthluafw737p5pbbyps27gpfiiqcj2xz24kn4hzm2id.onion +735ms

... and just spinning in the UI:

Screenshot 2023-05-16 at 10 03 39 PM

This is how I'm checking if binaries are signed (this is the tor binary I extracted from Tor Browser):

% codesign -dvv /Users/pdurbin/github/tryquiet/quiet/3rd-party/tor/darwin/arm64/tor                 
Executable=/Users/pdurbin/github/tryquiet/quiet/3rd-party/tor/darwin/arm64/tor
Identifier=tor
Format=Mach-O universal (x86_64 arm64)
CodeDirectory v=20500 size=42351 flags=0x10000(runtime) hashes=1315+5 location=embedded
Signature size=8991
Authority=Developer ID Application: The Tor Project, Inc (MADPSAYN6T)
Authority=Developer ID Certification Authority
Authority=Apple Root CA
Timestamp=May 12, 2023 at 12:05:56 PM
Info.plist=not bound
TeamIdentifier=MADPSAYN6T
Runtime Version=11.0.0
Sealed Resources=none
Internal requirements count=1 size=164

Again, I'm ok with closing this issue. It has gone on and on. Maybe someone else will figure this out in the future. I'm ok with just using Quiet and not being able to develop.

@holmesworcester
Copy link
Contributor

We will have a lot of developers on new macs, so we need to fix this either way and I'd like to do it now.

@rubbingalcoholic
Copy link

On my M1 Ultra I'm getting a different compilation error when going through the Developer setup than what is described here. Using Node 18.12.1 and npm 8.19.2, and a completely clean clone of the quiet monorepo, I get the following output when running npm run lerna bootstrap:

jeff@cube quiet % npm run lerna bootstrap

> lerna
> lerna bootstrap

lerna notice cli v4.0.0
lerna info versioning independent
lerna info Bootstrapping 11 packages
lerna info Installing external dependencies
lerna ERR! npm install exited 1 in 'quiet'
lerna ERR! npm install stderr:
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: react-inspector@5.1.1
npm WARN Found: react@18.1.0
npm WARN node_modules/react
npm WARN   dev react@"18.1.0" from the root project
npm WARN   80 more (@cypress/react18, @emotion/react, @emotion/styled, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"^16.8.4 || ^17.0.0" from react-inspector@5.1.1
npm WARN node_modules/@storybook/addon-actions/node_modules/react-inspector
npm WARN   react-inspector@"^5.1.0" from @storybook/addon-actions@6.5.14
npm WARN   node_modules/@storybook/addon-actions
npm WARN
npm WARN Conflicting peer dependency: react@17.0.2
npm WARN node_modules/react
npm WARN   peer react@"^16.8.4 || ^17.0.0" from react-inspector@5.1.1
npm WARN   node_modules/@storybook/addon-actions/node_modules/react-inspector
npm WARN     react-inspector@"^5.1.0" from @storybook/addon-actions@6.5.14
npm WARN     node_modules/@storybook/addon-actions
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @mdx-js/react@1.6.22
npm WARN Found: react@18.1.0
npm WARN node_modules/react
npm WARN   dev react@"18.1.0" from the root project
npm WARN   80 more (@cypress/react18, @emotion/react, @emotion/styled, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"^16.13.1 || ^17.0.0" from @mdx-js/react@1.6.22
npm WARN node_modules/@storybook/addon-docs/node_modules/@mdx-js/react
npm WARN   @mdx-js/react@"^1.6.22" from @storybook/addon-docs@6.5.14
npm WARN   node_modules/@storybook/addon-docs
npm WARN
npm WARN Conflicting peer dependency: react@17.0.2
npm WARN node_modules/react
npm WARN   peer react@"^16.13.1 || ^17.0.0" from @mdx-js/react@1.6.22
npm WARN   node_modules/@storybook/addon-docs/node_modules/@mdx-js/react
npm WARN     @mdx-js/react@"^1.6.22" from @storybook/addon-docs@6.5.14
npm WARN     node_modules/@storybook/addon-docs
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: react-element-to-jsx-string@14.3.4
npm WARN Found: react@18.1.0
npm WARN node_modules/react
npm WARN   dev react@"18.1.0" from the root project
npm WARN   80 more (@cypress/react18, @emotion/react, @emotion/styled, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"^0.14.8 || ^15.0.1 || ^16.0.0 || ^17.0.1" from react-element-to-jsx-string@14.3.4
npm WARN node_modules/@storybook/react/node_modules/react-element-to-jsx-string
npm WARN   react-element-to-jsx-string@"^14.3.4" from @storybook/react@6.5.14
npm WARN   node_modules/@storybook/react
npm WARN
npm WARN Conflicting peer dependency: react@17.0.2
npm WARN node_modules/react
npm WARN   peer react@"^0.14.8 || ^15.0.1 || ^16.0.0 || ^17.0.1" from react-element-to-jsx-string@14.3.4
npm WARN   node_modules/@storybook/react/node_modules/react-element-to-jsx-string
npm WARN     react-element-to-jsx-string@"^14.3.4" from @storybook/react@6.5.14
npm WARN     node_modules/@storybook/react
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: react-element-to-jsx-string@14.3.4
npm WARN Found: react-dom@18.1.0
npm WARN node_modules/react-dom
npm WARN   dev react-dom@"18.1.0" from the root project
npm WARN   59 more (@cypress/react18, @mui/base, @mui/lab, @mui/material, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react-dom@"^0.14.8 || ^15.0.1 || ^16.0.0 || ^17.0.1" from react-element-to-jsx-string@14.3.4
npm WARN node_modules/@storybook/react/node_modules/react-element-to-jsx-string
npm WARN   react-element-to-jsx-string@"^14.3.4" from @storybook/react@6.5.14
npm WARN   node_modules/@storybook/react
npm WARN
npm WARN Conflicting peer dependency: react-dom@17.0.2
npm WARN node_modules/react-dom
npm WARN   peer react-dom@"^0.14.8 || ^15.0.1 || ^16.0.0 || ^17.0.1" from react-element-to-jsx-string@14.3.4
npm WARN   node_modules/@storybook/react/node_modules/react-element-to-jsx-string
npm WARN     react-element-to-jsx-string@"^14.3.4" from @storybook/react@6.5.14
npm WARN     node_modules/@storybook/react
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: react-swipeable@4.3.0
npm WARN Found: react@18.1.0
npm WARN node_modules/react
npm WARN   dev react@"18.1.0" from the root project
npm WARN   80 more (@cypress/react18, @emotion/react, @emotion/styled, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"^0.14.0 || ^15.0.0-0 || ^16.0.0-0" from react-swipeable@4.3.0
npm WARN node_modules/react-alice-carousel/node_modules/react-swipeable
npm WARN   react-swipeable@"4.3.0" from react-alice-carousel@1.15.3
npm WARN   node_modules/react-alice-carousel
npm WARN
npm WARN Conflicting peer dependency: react@16.14.0
npm WARN node_modules/react
npm WARN   peer react@"^0.14.0 || ^15.0.0-0 || ^16.0.0-0" from react-swipeable@4.3.0
npm WARN   node_modules/react-alice-carousel/node_modules/react-swipeable
npm WARN     react-swipeable@"4.3.0" from react-alice-carousel@1.15.3
npm WARN     node_modules/react-alice-carousel
npm WARN deprecated set-value@2.0.0: Critical bug fixed in v3.0.1, please upgrade to the latest version.
npm WARN deprecated mixin-deep@1.3.1: Critical bug fixed in v2.0.1, please upgrade to the latest version.
npm WARN deprecated @npmcli/move-file@1.1.2: This functionality has been moved to @npmcli/fs
npm WARN deprecated set-value@0.4.3: Critical bug fixed in v3.0.1, please upgrade to the latest version.
npm WARN deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated trim@0.0.1: Use String.prototype.trim() instead
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated redux-devtools-extension@2.13.8: Package moved to @redux-devtools/extension.
npm WARN deprecated w3c-hr-time@1.0.2: Use your platform's native performance.now() and performance.timeOrigin.
npm WARN deprecated source-map-url@0.4.0: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated circular-json@0.3.3: CircularJSON is in maintenance only, flatted is its successor.
npm WARN deprecated electron-notarize@0.2.1: Please use @electron/notarize moving forward.  There is no API change, just a package name change
npm WARN deprecated sane@4.1.0: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated asar@3.2.0: Please use @electron/asar moving forward.  There is no API change, just a package name change
npm WARN deprecated uuid@3.3.2: 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 source-map-resolve@0.5.2: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated electron-osx-sign@0.6.0: Please use @electron/osx-sign moving forward. Be aware the API is slightly different
npm WARN deprecated core-js@2.6.4: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm WARN deprecated core-js@3.21.1: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm WARN deprecated core-js@3.21.1: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm ERR! code 1
npm ERR! path /Users/jeff/htdocs/quiet/packages/desktop/node_modules/utf-8-validate
npm ERR! command failed
npm ERR! command sh -c -- node-gyp-build
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@5.1.1
npm ERR! gyp info using node@18.12.1 | darwin | arm64
npm ERR! gyp info find Python using Python version 3.11.3 found at "/opt/homebrew/opt/python@3.11/bin/python3.11"
npm ERR! (node:1885) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
npm ERR! (Use `node --trace-deprecation ...` to show where the warning was created)
npm ERR! gyp info spawn /opt/homebrew/opt/python@3.11/bin/python3.11
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/Users/jeff/htdocs/quiet/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/jeff/htdocs/quiet/packages/desktop/node_modules/utf-8-validate/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/jeff/htdocs/quiet/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/jeff/Library/Caches/node-gyp/18.12.1/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/Users/jeff/Library/Caches/node-gyp/18.12.1',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/Users/jeff/htdocs/quiet/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/Users/jeff/Library/Caches/node-gyp/18.12.1/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/Users/jeff/htdocs/quiet/packages/desktop/node_modules/utf-8-validate',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! Traceback (most recent call last):
npm ERR!   File "/Users/jeff/htdocs/quiet/node_modules/node-gyp/gyp/gyp_main.py", line 50, in <module>
npm ERR!     sys.exit(gyp.script_main())
npm ERR!              ^^^^^^^^^^^^^^^^^
npm ERR!   File "/Users/jeff/htdocs/quiet/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 554, in script_main
npm ERR!     return main(sys.argv[1:])
npm ERR!            ^^^^^^^^^^^^^^^^^^
npm ERR!   File "/Users/jeff/htdocs/quiet/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 547, in main
npm ERR!     return gyp_main(args)
npm ERR!            ^^^^^^^^^^^^^^
npm ERR!   File "/Users/jeff/htdocs/quiet/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 520, in gyp_main
npm ERR!     [generator, flat_list, targets, data] = Load(
npm ERR!                                             ^^^^^
npm ERR!   File "/Users/jeff/htdocs/quiet/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 136, in Load
npm ERR!     result = gyp.input.Load(build_files, default_variables, includes[:],
npm ERR!              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
npm ERR!   File "/Users/jeff/htdocs/quiet/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 2782, in Load
npm ERR!     LoadTargetBuildFile(build_file, data, aux_data,
npm ERR!   File "/Users/jeff/htdocs/quiet/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 391, in LoadTargetBuildFile
npm ERR!     build_file_data = LoadOneBuildFile(build_file_path, data, aux_data,
npm ERR!                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
npm ERR!   File "/Users/jeff/htdocs/quiet/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 234, in LoadOneBuildFile
npm ERR!     build_file_contents = open(build_file_path, 'rU').read()
npm ERR!                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
npm ERR! ValueError: invalid mode: 'rU' while trying to load binding.gyp
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
npm ERR! gyp ERR! stack     at ChildProcess.onCpExit (/Users/jeff/htdocs/quiet/node_modules/node-gyp/lib/configure.js:351:16)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
npm ERR! gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Darwin 22.3.0
npm ERR! gyp ERR! command "/Users/jeff/.nvm/versions/node/v18.12.1/bin/node" "/Users/jeff/htdocs/quiet/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /Users/jeff/htdocs/quiet/packages/desktop/node_modules/utf-8-validate
npm ERR! gyp ERR! node -v v18.12.1
npm ERR! gyp ERR! node-gyp -v v5.1.1
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/jeff/.npm/_logs/2023-05-25T22_06_36_983Z-debug-0.log
lerna ERR! npm install exited 1 in 'quiet'

@pdurbin
Copy link
Contributor Author

pdurbin commented May 26, 2023

@rubbingalcoholic what commit are you on, please?

@rubbingalcoholic
Copy link

@pdurbin commit 1c08a04 on branch #882

@holmesworcester
Copy link
Contributor

@pdurbin I just looked more closely at your last issue and I don't want to jinx it but I think congratulations are in order: it looks like Quiet is working just fine, but the registrar for the community you are trying to join (our community perhaps) was offline or unreachable.

Instead of trying to connect at first, try creating your own community. Then perhaps try running another production Quiet from the CLI using DATA_DIR="some-other-folder" (or running it on an Android phone) and joining your community with that Quiet.

I think it should work. Let me know if it doesn't!

@holmesworcester
Copy link
Contributor

Also, @rubbingalcoholic you're all set now with this right? since you'll be using linux instead?

@holmesworcester
Copy link
Contributor

holmesworcester commented Jun 5, 2023

@EmiM the remaining things to close this ticket are to either:

  1. put all additional necessary steps in the README and confirm that they work on a fresh setup (fresh user account e.g.)
  2. change build scripts so that there are no additional necessary steps and the instructions are the same for M1

@EmiM
Copy link
Collaborator

EmiM commented Jun 12, 2023

I tried running the project on fresh account on M1 and Intel. I adjusted project files and code instead of readme and after those changes everything went smoothly:
https://github.com/TryQuiet/quiet/pull/1566/files

@pdurbin
Copy link
Contributor Author

pdurbin commented Sep 11, 2023

I adjusted project files and code instead of readme and after those changes everything went smoothly:
https://github.com/TryQuiet/quiet/pull/1566/files

I just tried again even without the files above. I'm on the develop branch as of 8f4e038.

First I was telling @holmesworcester tonight that it's still not working, that I wasn't having trouble joining the #Quiet-team community. He explained that developers using the develop branch shouldn't expect to always be able to join that community. Instead, developers commonly create a community. I just tried this and it seemed to work fine.

In order to create a new community and not join #Quiet-team, I move aside the dev directory, as @holmesworcester suggested:

cd ~/Library/Application\ Support && mv Quietdev Quietdev.moved

Closing. Thanks!

@pdurbin pdurbin closed this as completed Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working user request
Projects
Archived in project
Quiet
Next Sprint
Development

No branches or pull requests

7 participants