-
Notifications
You must be signed in to change notification settings - Fork 88
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
Comments
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 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. |
@holmesworcester just encouraged me to try again with the latest in develop so that's what I'll do when I get a minute. |
I'm on 07e08ae on develop. I'm just noting that I'm getting warnings but I think these are safe to ignore:
Also, the next step seems fine:
Running the next command... |
The next command seems to be failing with (as before)
Here's the log file mentioned above: 2023-03-26T12_12_48_312Z-debug-0.log |
@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. |
Is this easy to do? f8da704 has the following note:
I only went looking because it's mocked:
If someone pushes a branch, I'm happy to try it. 😄 |
I see the path that fails is As you already noticed we don't actually use go-ipfs so it shouldn't cause such problems. |
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. @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. |
Do we have an open issue for this in orbitdb? |
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 |
I think we might as well make the issue. |
@kowalski sorry, same thing (I'm on 6a3ae12 now):
|
This is weird. I'm not sure why it does it. Something to try is that I can see this on the top of your pasted output.
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. |
@kowalski we use node 18.12.1 |
we do? I can see this in
Perhaps we need to update it then. |
Yeah, we must update that, weird because npm 8.19.2 is default npm version for 18.12.1 |
This still leaves open the question of how come it installs go-ipfs on pdurbin laptop. It must be ignoring overrides somehow. |
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? |
@pdurbin
Alternatively you can check on a fresh clone of the repository. Please let me know the outcome |
Is it of interest that if I...
... 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: The output from the terminal on launch:
And when I quit Quiet I see this: |
@pdurbin The logs you pasted are perfectly fine, I'm 99.5% sure that there were another logs on frontend console with meaningful errors. |
Pdurbin i think it's f12 on Mac to open the developer tools. Can you send a screenshot of any console errors? |
I just tried a fresh clone but I'm still having trouble, unfortunately. Here's the output of the setup commands:
Here's a screenshot of what I see when I try to run Quiet: Here's the error in the screenshot:
Full output here: start.txt |
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? |
What permissions does tor binary have? What is the output of If it's lacking the executable permission try |
@EmiM ah, good catch. I changed it to executable...
This is the next error:
The full error:
|
Screensharing won't help much at the moment. 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. |
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 This is what I see:
I also googled a bit but I'm not sure where I can find the Anyway, here's the output from when I try to start Quiet: start-err.txt Here's my guess of the most relevant part:
Finally, here's a screenshot: |
@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. |
You can check if you can run tor by going to:
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.
Edit2: the new arm64 binary is shipped unsigned, that's why macos is refusing to run it. |
I added the link in one of my previous comments: https://www.torproject.org/download/tor/ |
Ah, unsigned. Ok. Hmm. Anyway, I did try the steps above. I had to make the
@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. |
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 ... and just spinning in the UI: This is how I'm checking if binaries are signed (this is the
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. |
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. |
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
|
@rubbingalcoholic what commit are you on, please? |
@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! |
Also, @rubbingalcoholic you're all set now with this right? since you'll be using linux instead? |
@EmiM the remaining things to close this ticket are to either:
|
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: |
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:
Closing. Thanks! |
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:When I run
node -e "console.log(process.arch)"
I getarm64
.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#L131That 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
The text was updated successfully, but these errors were encountered: