Closed leventatbjss closed 5 years ago
The issue is that /home/levent/eos/contracts/eosio.bios/eosio.bios.wasm is an invalid path as viewed inside your docker container. you can solve this by making mounting from the host to the docker (using -v).
I know what the issue is. It just took me a day to understand what the issue was. What I am trying to say is that the documentation is not clear/complete about docker based setup and it should have notes for those who chose the docker path. After all, using docker, instead of building from source is supposed to be easier or for "most people" who does not necessarily want to go into details. The following excerpt is from https://developers.eos.io/eosio-nodeos/docs/docker-quickstart
This guide is best for most people, but advanced developers may prefer to build from source
I agree the documentation is not consistent with all boot versions. @leventatbjss how did you solve the problem?
Also agree and I am stuck. Using Ubuntu and Docker. Has someone come across this problem found a solution?
blake@T5500:/eos/contracts/hello$ eosio-cpp -o hello.wasm hello.cpp --abigen blake@T5500:/eos/contracts/hello$ ls hello.abi hello.cpp hello.wasm
blake@T5500:~/eos/contracts$ cleos set contract hello /home/blake/eos/contracts/hello -p hello@active Reading WASM from /home/blake/eos/contracts/hello/hello.wasm... Error 3160009: No wast file found Error Details: no wasm file found /home/blake/eos/contracts/hello/hello.wasm
If you have cleos set as an alias for a docker container such as alias cleos='docker exec -it eosio /opt/eosio/bin/cleos
, then the easiest way to deploy is to deploy from within the docker container (docker exec -it eosio bash
) otherwise the path will not be found
@tradexy you should not put the host's path of your contracts, but you should put the mapped path of your contracts inside the docker container instead.
I agree that these things need to be emphasized more in the documentation. Things might be simpler for the developer who is not familiar with docker with the release of the binary now. Since the original issue is solved, I'm closing this issue.
Using the docker, cleos (version: f9a3d023).
Without the alias of cleos. I run docker exec -it nodeos bash
after start up the nodeos.
I also encountered this problem. And the strange point is:
Deploy the contract in /contracts/eosio.bios/ Success
cleos set contract ${accountName} /contracts/eosio.bios/ -p ${accountName}@active
Deploy the contract in ${Account_Dir} Error
cleos set contract ${accountName} ${Account_Dir} -p ${accountName}@active
There are all the ${Account_Source} (wasm, wast, abi) in the ${Account_Dir}.
Still finding the solution to solve this~ Is anyone meet the same problem?
@taokayan Thanks! Put the contract directory in the docker volume can work
I am facing the same issue, but as you suggested what do i do now? my cleos is on container and im accessing files from root
can anyone provide me steps to deploy my contract? i been following https://developers.eos.io/eosio-home/docs/your-first-contract this guide but no luck the same error occurs over and over again
I am still struggling. Getting the same 316009 error again and again. @miguelmota - using docker exec -it eosio bash also produces failed to connect to nodeos plus error 316009 @adriantolie - "with the release of the binary now" are you saying that docker should not be used?
You can still use docker if you like, you just have more options now :)
I am facing the same issue, but as you suggested what do i do now? my cleos is on container and im accessing files from root
The issue is that /home/levent/eos/contracts/eosio.bios/eosio.bios.wasm is an invalid path as viewed inside your docker container. you can solve this by making mounting from the host to the docker (using -v).
@shikhars371 Pay attention to the docker option -v, and put your contract source file in the local drive other than the container.
@ray-learn my contract file is in my local drive, not in container , when i tried to use cleos set contract hello CONTRACTS_DIR/hello -p hello@active this command it tells me no wast file found
@ray-learn my contract file is in my local drive, not in container , when i tried to use cleos set contract hello CONTRACTS_DIR/hello -p hello@active this command it tells me no wast file found
Provide your step about the nodeos
and cleos
, do not alias the cleos
first. Also you can check the .wasm and .abi file cause the compile tool may be affect.
An update - I deleted the older version and uploaded the docker Ubuntu image $ docker pull eosio/eos:v1.4.0. Now following the developers tutorial https://developers.eos.io/eosio-home/docs/your-first-contract and I am not getting the error anymore :-)
However I am now stuck on "Step 5:Create the token" here https://developers.eos.io/eosio-home/docs/token-contract and getting the error below (note that I have followed the tutorial step by step).
Error 3015004: The type defined in the ABI is invalid Error Details: account
Please disregard my last comment. For some reason the eosio.token.abi file was not being uploaded properly (or if it was it is incorrect). I fixed it manually and now I can create, issue and transfer tokens.
I am writing this to point out to some confusion in the documentation. I have chosen not to build from sources but used docker to set nodeos and keosd up. The documentation at some stage mentions deploying system contracts such as eosio.token and that is where it starts to become misleading. Since, I have not built them manually I don't have a cleos executable. Instead, I have the "cleos" alias which in fact connects to docker and runs the cleos within the container. So, when documentation says something like:
cleos set contract eosio.token build/contracts/eosio.token -p eosio.token@active
the build directory is not there on my host machine but in the container. As a workaround I tried mounting the container folder to host and getting a full absolute path to eosio.token. That way it gets me thisThat eventually drove me crazy because the wasm file was right there sitting in that exact path! I tried manually compiling the contract, re-building the eosio_cdt from scratch etc. but was still getting the same error no matter. Then I realised the cleos was actually an alias in it was meant to run the command within the container and therefore what I pass as an absolute directory path from my host would not make any sense to the container. The directory path mentioned should have been an absolute path within container. Therefore I think, in general, the documentation within the developer portal assumes that the nodeos was built from source and this can be misleading for those who are running nodeos on docker. The docs should be revised and tutorials/statements should be rephrased with additional/alternative instructions for docker based users. Thanks.