-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Query: Deploying hello world to solana-test-validator on M1 fails #18033
Comments
Any update on this? I have the same problem. |
Similar issue, I'm on a Mac with an M1 Chip. I've tried different demos and all of them have the same issue when I try to deploy my program. Basically it just gets stuck at
I've tried building + deploying with my terminal running Rosetta and run into the same problem regardless, so not sure if this is related. |
I found my issue: I had installed almost everything under Rosetta. Checking my rustup toolchain via |
@gxxcastillo okay but that isn't really fixing the issue it's avoiding it. I'm getting the same issue on M1 - funny thing is, it was deploying perfectly earlier - but I can't confirm if this was the x86 version. I get the feeling this occurs when part of your toolchain is x86 and some is arm, but can't confirm yet. I'll keep digging. |
I also use M1 mac and I have Error: Account address has insufficient funds for spend (0.4265436 SOL) + fee (0.001355 SOL) Does it look like the same issue? 🤔 Although |
@Qumeric, make sure 1) You're connected to the right cluster and 2) That you've got enough SOL in your account |
I have found my issue. I built Solana from sources (because otherwise, I faced another M1 related issue) and used (Also I tried to do |
pretty sad the fastest blockchain doesn't work on the fastest laptops :( |
Similar issue even am facing while requesting airdrop Error: unable to confirm transaction. This can happen in situations such as transaction expiration and insufficient fee-payer funds |
|
Did you resolve this issue? |
Hello, I tried following:
But still I get this damn error:
I'm really stuck, any pointers are how to move forward? |
There is a Docker image dedicated to mac-m1 - https://github.com/metaspan/solana-docker-mac-m1
|
Seems this is linked: qmonnet/rbpf#48 |
If you are ok to use the terminal with Intel architecture, you can refer to this blog post How to make Solana Test Validator work with a Macbook with M1 chip instead. |
I have the same issue with an M1 mac and found a workaround starting the validator with the "--bpf-program" option. solana-test-validator --bpf-program ADDRESS target/deploy/PROGRAM.so |
From perusing the discord, I've figured out what was up (as alluded to in other threads):
|
#21215 should help to run test validator without explicit |
Also heads up that as you try to get the hello world to actually work you'll run into further issues due to BPF parameter alignment as mentioned here: #21269 |
Did you find a solution to this? |
I build Solana tool suite from source and add Before that, I can't even run $ solana program deploy dist/program/helloworld.so
===========================================================================
Recover the intermediate account's ephemeral keypair file with
`solana-keygen recover` and the following 12-word seed phrase:
===========================================================================
gas tiger plastic knife speak uncle monkey rebel boat suspect agree concert
===========================================================================
To resume a deploy, pass the recovered keypair as the
[BUFFER_SIGNER] to `solana program deploy` or `solana write-buffer'.
Or to recover the account's lamports, pass it as the
[BUFFER_ACCOUNT_ADDRESS] argument to `solana program close`.
===========================================================================
Error: Deploying program failed: unable to confirm transaction. This can happen in situations such as transaction expiration and insufficient fee-payer funds I resume the failed deployment but it still stuck and finally reach maximum retries. $ solana program deploy --buffer ~/.config/solana/id.json ./dist/program/helloworld.so
Blockhash expired. 5 retries remaining
Blockhash expired. 4 retries remaining
Blockhash expired. 3 retries remaining
Blockhash expired. 2 retries remaining
Blockhash expired. 1 retries remaining
Error: Data writes to account failed: Custom error: Max retries exceeded |
Did you get through this? $ solana program deploy and $anchor deplay are both getting stuck at: |
did you manage to solve this problem? also facing the same even when trying to do a devnet airdrop |
So, I think might be a network error. I switched to a different network and since the devnet wallet is currently drained, I tried using testnet and it totally worked. |
thanks mate, I think you're exactly right - plus looks like the devnet issue is resolved now, too |
I have a reverse setup and similar issue on v1.9.2, I build on a Mac x86_64 and deploy to a Raspberry Pi test validator, it never succeeds but retries to send transactions and then times out, requiring me to close the buffer.
How can I debug this? |
This is a network issue and you're probably facing this now because the Solana network is down. Check at status.solana.com and try again later. If it still happens, switch your network. |
They're obviously running a private cluster. None of the public clusters will influence it, congestion or otherwise
Have you tried to deploy from the rPi directly to rule out network configuration issues. |
if I scp the binary to the rpi I can deploy it from there without issues. Networking is fine otherwise. It appears some issue with the tooling crossing the architectures (?) but I don't know how to debug this further. |
After upgrade to latest tools I have a different issue, and google leads me back here... (I forgot about this issue). Running Ubuntu 18.04 arm64 in Docker on Mac M1root@04598e084504:~/test# anchor --version
anchor-cli 0.22.1
root@04598e084504:~/test# rustc --version
rustc 1.59.0 (9d1b2106e 2022-02-23)
root@04598e084504:~/test# rustup --version
rustup 1.24.3 (ce5817a94 2021-05-31)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.59.0 (9d1b2106e 2022-02-23)`
root@04598e084504:~/test# solana --version
solana-cli 1.9.9 (src:devbuild; feat:3246413280)
root@04598e084504:~/test# yarn --version
1.22.17
root@04598e084504:~/test# uname -a
Linux 04598e084504 5.10.76-linuxkit #1 SMP PREEMPT Mon Nov 8 11:22:26 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux $ anchor init test
yarn install v1.22.17
warning package.json: No license field
info No lockfile found.
warning No license field
[1/4] Resolving packages...
warning @project-serum/anchor > @solana/web3.js > rpc-websockets > [email protected]: CircularJSON is in maintenance only, flatted is its successor.
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning " > [email protected]" has incorrect peer dependency "mocha@^3.X.X || ^4.X.X || ^5.X.X || ^6.X.X || ^7.X.X || ^8.X.X".
[4/4] Building fresh packages...
success Saved lockfile.
Done in 16.56s.
test initialized
More info:
It seems related to the toolchain for aarch64 |
Same issue here, can't get test validator to successfully receive programs in docker container running on m1 mac. Native mac binary works fine. |
Deploys are working fine for me now with |
@dcolley I have the same issue of |
@shawnwang0715 no, I switched to ubuntu on x64 instead |
Could you please describe how do you build on ubuntu x64? I used your dockerfile and tried to run |
@shawnwang0715 |
I'm going to close this issue, but in doing so we're going to lose all of this valuable investigation and solution-finding. Can someone please re-post the question and a summary of the answer to https://solana.stackexchange.com/questions/ask so that people who have these sorts of problems in the future can find their way to it? Thanks! |
Problem
I'm running Solana master with the example Hello World program and on OSX x86 things run as expected. I can deploy the hello world program to the test validator. However, when doing the exact same on M1, it fails at the "Finalize transaction" step:
I was hoping if anybody would have a hint where I should look to try and resolve this.
This is what I did to get my environment started:
Edit the
example-helloworld/src/program-rust/Cargo.toml
to match $PROJECT_ROOT deps, and then:$ git clone https://github.com/solana-labs/example-helloworld $ cd example-helloworld $ npm install $ npm run build:program-rust
Everything compiles ok and seems to run fine except for the "Finalize transaction" part which fails on M1. In the
validator.log
I see no errors, only a warning:I do not see this warning when running on OSX x86.
Any hints where I should look to try and fix this?
Proposed Solution
None - just a query.
The text was updated successfully, but these errors were encountered: