EOS Studio - Contract helloworld and and account helloworld missing after reload

I had the error you described in part two add pet and so I reloaded EOS Studio but while my helloworld project was still there, the drop down menu for the contract and account only had eosio as an option and somehow the helloworld is missing on both the dropdowns. Any suggestions as to what happened and how to get them back? When I start myinstance the program stops after a couple of seconds. I can build the project but it won’t deploy presumably because of the missing contract and account.

image

1 Like

Hey @Dougal, hope you are ok.

Are you using EOS Studio from their website of did you install it locally? The website tool is not working as expected long ago.

have you try to create a new accounts? maybe there is a permission issue on your system that does not allow EOS Studio to create or manage new files (like creating accounts), which Operating System are you using ?

Carlos Z

Thanks Carlos

Rebooted studio again and this time I got my helloworld contract and account back. Weird shit goin on.

However my remaining problem is when I call up myinstance on the local node it ends up with a two part message with first succeeding with the message

“myinstance is running now”

immediately followed by this failure message,

“myinstance stops to run”

Yes I am running EOS Studio on a local node on the latest Linux Ubuntu 20.04.2 LTS

I noticed one thing on the EOS Studio setting up video that filip used a mac to download studio and was able to immediately save it as an application. I used my VirtualBox Chrome or Firefox browser to download it and I’m wondering if I need to somehow convert it from an appImage file into something else?

image

But depending on your reply I think I will try removing EOS Studio and reinstalling it with a new helloworld contract and account and see if I get the same errors.

Tks
Don

the format of the program is good, what you need to do is just to allow the file to be executable on linux.

You can do that by going into the terminal and type the following.
First you navigate into the download folder, which is the one that contain the file.

cd downloads

then you need to upgrade the files permissions:

sudo chmod +x EOSStudio-0.13.3.AppImage

then you can either double click on the file to executed or:

./EOSStudio-0.13.3.AppImage

That should start running the EOS Studio program properly, then you must follow the setup intructions to install it properly.

Carlos Z

1 Like

Tks Carlos

I’m getting quite fed up with trying to get this environment working.

I’ll give this one more try before I move on to another course.

When I try to create the helloworld account the create key is greyed out for some reason. I have myinstance running and I have created a key pair but I can’t create the account because it’s greyed out.

As well do you have the full uninstall instructions for EOS Studio because when I deleted and reinstalled it per your instructions it remembered the old myinstance account and another account I had created earlier. What I want is a clean install with no previous info/file carry over.

image

1 Like

You can try reseting the entire App by going into the Application > Clear All App Data.

Try that and let me know, some times the EOS Studio goes buggy and even when you have all properly installed, it does not let you create new accounts.

Carlos Z

Getting this error now when I reconstituted pet and build it. As far as I can tell my syntax is correct and the build should work. Pls advise.

image

image

image

image

1 Like

Hey @Dougal, hope you are ok.

Please provide your code in the following way so i can try to replicate the issue.

FAQ - How to post code in the forum

Carlos Z

Helloworld.hpp

#ifndef HELLOWORLD

#define HELLOWORLD

#include <eosio/eosio.hpp>

#include <pet.hpp>

**CONTRACT** helloworld : *public* eosio::contract

{

*public* :

using eosio::contract::contract;

**ACTION** hi(eosio:: **name** *const* & nm);

**ACTION** addpet( *uint64_t* *const* id, eosio:: **name** *const* & owner, eosio:: **name** *const* & pet_name, *uint64_t* *const* age, eosio:: **name** *const* & type);

};

#endif

Pet.hpp

#ifndef PET

#define PET

*class* [[eosio::table, eosio::contract("helloworld")]] pet_t

{

*private* :

*uint64_t* id;

eosio:: **name** owner;

eosio:: **name** pet_name;

*uint64_t* age;

eosio:: **name** type;

*public* :

pet_t(){}

pet_t( *uint64_t* *const* _id,

eosio:: **name** *const* & _owner,

eosio:: **name** *const* & _pet_name,

*uint64_t* _age,

eosio:: **name** *const* _type) : id(_id), owner(_owner), pet_name(_pet_name), age(_age), type(_type) {}

*uint64_t* get_id() *const* { return id; }

eosio:: **name** get_owner() *const* { return owner; }

eosio:: **name** get_pet_name() *const* { return pet_name; }

*uint64_t* get_age() *const* { return age; }

eosio:: **name** get_type() *const* { return type; }

*uint64_t* primary_key() *const* { return get_id (); }

**EOSLIB_SERIALIZE** ( pet_t, (id)(owner)(pet_name)(age)(type) )

};

*typedef* eosio::multi_index< "pets"_n, pet_t > pets_table;

#endif

helloworld.cpp

#include <helloworld.hpp>

*void* helloworld::hi(eosio:: **name** *const* & nm)

{

eosio:: **print** ("Hello ", nm);

}

*void* helloworld::addpet( *uint64_t* *const* id, eosio:: **name** *const* & owner, eosio:: **name** *const* & pet_name, *uint64_t* *const* age, eosio:: **name** *const* & type)

{

pets_table pets( **get_self** (), **get_self** ().value);

pets. **emplace** ( **get_self** (), [&]( *auto* & entry){

entry = pet_t(id, owner, pet_name, age, type);

});

}
1 Like

I did not have any issue when compiling your code, it works perfect.

So I dont really dont know why the code you show in the last post is failing, i just copy/pasted the code you gave me (remove the *) and compile on my EOS Studio and it works.

Even the error message provide in your console does not have too much of a sense to me, because your syntax is written correctly. :face_with_monocle:

image

Carlos Z

Hi Carlos

Tried removing all data, deleting and reinstalling EOSStudio and still got the error but then I added a new account helloworld2 with new key and tried it and it seemed to work!

So I will continue on to see if the add/modify pet works and we’ll see what happens. One thing the EOSStudio doesn’t seem to have the option for is to delete instances. You can either start or stop it but not delete it. Is that right?

you can delete your projects by going into the EOS Studio folder, there you can see multiple folders with the name of each project, if you delete them from there, it will be removed from EOS Studio. :nerd_face:

Carlos Z

Can you advise - whenever I save and close my project and exit EOSStudio and call it up again it doesn’t show my helloworld contract and account in the dropdown. Only shows eosio contract and account. The save doesn’t seem to work for additional accounts and contracts. Yet when I try and add using the name helloworld or helloworld2 I can’t because it already exists. If it already exists then where the hell is it?

1 Like

Ok I did some more investigation and found that the only way to save contracts is to use the quit button on the Application drop down menu and it saved the name of my new contract and account. The X button on the top right of EOSStudio doesn’t save accounts or contracts.

My new question is do you have a list of errors for both the build and deploy functions and suggestions as to what the problem might be? I looked on google and didn’t see any error listings.

For example, when I deploy the helloworld project I get the error
"deploy failed’
“serialization time limit 15000us exceeded”

My other question is which parts of the pet contract we’re building require the project name and which require the contract name. I want to get a correctly working project and contract so I can study it.

#ifndef HELLOWORLD

#define HELLOWORLD

#include <eosio/eosio.hpp>

#include <pet.hpp>

CONTRACT helloworld : public eosio::contract

{

public :

using eosio::contract::contract;

ACTION hi(eosio:: name const & nm);

ACTION addpet( uint64_t const id, eosio:: name const & owner, eosio:: name const & pet_name, uint64_t const age, eosio:: name const & type);

};

#ifndef PET

#define PET

class [[eosio::table, eosio::contract(“helloworld”)]] pet_t

{

private :

uint64_t id;

eosio:: name owner;

eosio:: name pet_name;

uint64_t age;

eosio:: name type;

public :

pet_t(){}

pet_t( uint64_t const _id,

eosio:: name const & _owner,

eosio:: name const & _pet_name,

uint64_t _age,

eosio:: name const _type) : id(_id), owner(_owner), pet_name(_pet_name), age(_age), type(_type) {}

uint64_t get_id() const { return id; }

eosio:: name get_owner() const { return owner; }

eosio:: name get_pet_name() const { return pet_name; }

uint64_t get_age() const { return age; }

eosio:: name get_type() const { return type; }

uint64_t primary_key() const { return get_id (); }

EOSLIB_SERIALIZE ( pet_t, (id)(owner)(pet_name)(age)(type) )

};

typedef eosio::multi_index< “pets”_n, pet_t > pets_table;

#endif

#endif

#include <helloworld.hpp>

void helloworld::hi(eosio:: name const & nm)

{

eosio:: print ("Hello ", nm);

}

void helloworld::addpet( uint64_t const id, eosio:: name const & owner, eosio:: name const & pet_name, uint64_t const age, eosio:: name const & type)

{

pets_table pets( get_self (), get_self ().value);

pets. emplace ( get_self (), [&]( auto & entry){

entry = pet_t(id, owner, pet_name, age, type);

});

}

Tks
Don

It should be saved on a folder which name is EOS Studio, if is not saving, could be an issue on EOS Studio does not have the permissions to save/modify that folder, try to create a new contract and check if its folder is being generated.

Also please share your code in the following way, so i can copy/pasted easily:

Carlos Z

#ifndef HELLOWORLD

#define HELLOWORLD

#include <eosio/eosio.hpp>

#include <pet.hpp>

**CONTRACT** helloworld : *public* eosio::contract

{

*public* :

using eosio::contract::contract;

**ACTION** hi(eosio:: **name** *const* & nm);

**ACTION** addpet( *uint64_t* *const* id, eosio:: **name** *const* & owner, eosio:: **name** *const* & pet_name, *uint64_t* *const* age, eosio:: **name** *const* & type);

};

#ifndef PET

#define PET

*class* [[eosio::table, eosio::contract("helloworld")]] pet_t

{

*private* :

*uint64_t* id;

eosio:: **name** owner;

eosio:: **name** pet_name;

*uint64_t* age;

eosio:: **name** type;

*public* :

pet_t(){}

pet_t( *uint64_t* *const* _id,

eosio:: **name** *const* & _owner,

eosio:: **name** *const* & _pet_name,

*uint64_t* _age,

eosio:: **name** *const* _type) : id(_id), owner(_owner), pet_name(_pet_name), age(_age), type(_type) {}

*uint64_t* get_id() *const* { return id; }

eosio:: **name** get_owner() *const* { return owner; }

eosio:: **name** get_pet_name() *const* { return pet_name; }

*uint64_t* get_age() *const* { return age; }

eosio:: **name** get_type() *const* { return type; }

*uint64_t* primary_key() *const* { return get_id (); }

**EOSLIB_SERIALIZE** ( pet_t, (id)(owner)(pet_name)(age)(type) )

};

*typedef* eosio::multi_index< "pets"_n, pet_t > pets_table;

#endif

#endif

#include <helloworld.hpp>

*void* helloworld::hi(eosio:: **name** *const* & nm)

{

eosio:: **print** ("Hello ", nm);

}

*void* helloworld::addpet( *uint64_t* *const* id, eosio:: **name** *const* & owner, eosio:: **name** *const* & pet_name, *uint64_t* *const* age, eosio:: **name** *const* & type)

{

pets_table pets( **get_self** (), **get_self** ().value);

pets. **emplace** ( **get_self** (), [&]( *auto* & entry){

entry = pet_t(id, owner, pet_name, age, type);

});

}`Preformatted text`

You should split your contracts, you paste all the contracts and is hard to identify which one start and end on which line.

Carlos Z

While the project is named helloworld, the new contract and account I had to create is named helloworld3. Pls advise where in the below programming helloworld3 should be used, if anywhere.

HELLOWORLD.HPP

#ifndef HELLOWORLD
#define HELLOWORLD

#include <eosio/eosio.hpp>
#include <pet.hpp>

CONTRACT helloworld : public eosio::contract
{
public:
  using eosio::contract::contract;
  ACTION hi(eosio::name const & nm);
  ACTION addpet(uint64_t const id, eosio::name const & owner, eosio::name const & pet_name, uint64_t const age, eosio::name const & type);
  
};

#endif

PET.HPP

#ifndef PET
#define PET

class [[eosio::table, eosio::contract("helloworld")]] pet_t
{
    private:
        uint64_t id;
        eosio::name owner;
        eosio::name pet_name;
        uint64_t age;
        eosio::name type;
    public:
        pet_t(){}

        pet_t(uint64_t const _id,
        eosio::name const & _owner,
        eosio::name const & _pet_name,
        uint64_t _age,
        eosio::name const _type) : id(_id), owner(_owner), pet_name(_pet_name), age(_age), type(_type) {}

        uint64_t get_id() const { return id; }
        eosio::name get_owner() const { return owner; }
        eosio::name get_pet_name() const { return pet_name; }
        uint64_t get_age() const { return age; }
        eosio::name get_type() const { return type; }

        uint64_t primary_key() const { return get_id (); }

        EOSLIB_SERIALIZE( pet_t, (id)(owner)(pet_name)(age)(type) )

    };

    typedef eosio::multi_index< "pets"_n, pet_t > pets_table;

    #endif

HELLOWORLD.CPP

#include <helloworld.hpp>

void helloworld::hi(eosio::name const & nm)

{

  eosio::print("Hello ", nm);

}

void helloworld::addpet(uint64_t const id, eosio::name const & owner, eosio::name const & pet_name, uint64_t const age, eosio::name const & type)

{

  pets_table pets(get_self(), get_self().value);

  pets.emplace(get_self(), [&](auto & entry){

    entry = pet_t(id, owner, pet_name, age, type); 

});

}
1 Like

Here are some pics of results and settings that you asked me to look into as you mentioned I should see all my contracts somewhere but I only see eosio contract and my project helloworld. No other contracts anywhere except in the application.

When I deploy contract to either eosio or helloworld3 I get the error message “unknown action setcode in contract eosio”

image

Here is my eos studio folder

image

and contents

image

contract folder

image

contracts properties

image

I don’t see my new contract helloworld3 in any of my folders but it shows in the application EOSStudio.

As well, when I try and add a pet even when contract deploy fails I get the below result.

image

Project settings

I tried changing contract here to helloworld3 to see if deploy would work here but got the error message "ENOENT: no such file or directory, open ‘/home/don/EOSStudio/helloworld/helloworld3.wasm’

image

1 Like

This might be an issue with EOS Studio, you should ask in their support group.

https://t.me/eosstudio

Every time i had errors with EOS Studio I just remove it completely and then start installing everything again, You might have miss an step in the config, because your EOS Studio is not able to store data on its folder (is not creating your new helloworld3 project).

Carlos Z