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

Error while executing the Tezos client command. #104

Open
nfillion21 opened this issue Jan 31, 2019 · 7 comments
Open

Error while executing the Tezos client command. #104

nfillion21 opened this issue Jan 31, 2019 · 7 comments
Assignees

Comments

@nfillion21
Copy link

nfillion21 commented Jan 31, 2019

Hello,
I got this error when I configure the default tezos client in Languages & Frameworks > Tezos.
Any advice?

screenshot 2019-01-31 at 18 16 44

@jansorg
Copy link
Owner

jansorg commented Feb 5, 2019

Hi @nfillion21 , apologies for the late feedback.
Have you configured a default client in the settings?
Are you using the docker scripts or the standalone client?
Could you post the output of alphanet.sh client typecheck script text:"parameter unit; storage unit; code {}" --emacs -v ? (adapt this to the script you're using, i.e. mainnet.sh, zeronet.sh, ...)

@jansorg jansorg self-assigned this Feb 5, 2019
@nfillion21
Copy link
Author

Hello @jansorg, I configured the docker scripts as a default client.

$ ./alphanet.sh client typecheck script text:"parameter unit; storage unit; code {}" --emacs -v
Warning:

             This is NOT the Tezos Mainnet.

 The node you are connecting to claims to be running on the
           Tezos Alphanet DEVELOPMENT NETWORK.
      Do NOT use your fundraiser keys on this network.
      Alphanet is a testing network, with free tokens.

((types . ((35 37 (((pair (unit @parameter) (unit @storage)))) (((pair (unit @parameter) (unit @storage)))))
))
(errors . ((36 38 "Ill typed contract.\nAt line 1 characters 35 to 37,\n wrong stack type at end of body:\n - expected return stack type:\n [ pair (list operation) unit ],\n - actual stack type:\n [ pair (unit @parameter) (unit @storage) ].\nType pair unit unit is not compatible with type pair (list operation) unit.\nType unit is not compatible with type list operation.")
)))

@nfillion21
Copy link
Author

The typecheck does work well

./alphanet.sh client typecheck script container:contract.tz --emacs -v

((types . ((53 121 (((pair (unit @parameter) (string @storage)))) (((pair (list operation) string))))
(54 58 (((pair (unit @parameter) (string @storage)))) ())
(66 92 () ((string)))
(100 113 ((string)) (((list operation)) (string)))
(115 119 (((list operation)) (string)) (((pair (list operation) string))))
))
(errors . (
)))

@jansorg
Copy link
Owner

jansorg commented Feb 5, 2019

@nfillion21 Hm, that's a bit strange. The client itself and typechecking seems to be fine.
Which OS are you using?
Could you check if this dummy contract is showing up properly for you?

storage unit;
parameter unit;
code {
       CDR;
       NIL operation;
       PAIR;
     }

That should be displayed like this:
screenshot_20190205_143128

If that doesn't help, could run run the contract (on alpha or zeronet, of course)? That should print out errors if there are any.
If that doesn't help then I'll have to publish an update which either displays or logs the errors.

@nfillion21
Copy link
Author

screenshot 2019-02-05 at 14 47 13

I am on a macbook using IntelliJ IDEA Ultimate 2018.3
An update with log errors could be useful.

$ ./alphanet.sh client typecheck script container:dummy.tz --emacs -v

((types . ((35 90 (((pair (unit @parameter) (unit @storage)))) (((pair (list operation) (unit @storage)))))
(44 47 (((pair (unit @parameter) (unit @storage)))) ((@storage unit)))
(56 69 ((@storage unit)) (((list operation)) (@storage unit)))
(78 82 (((list operation)) (@storage unit)) (((pair (list operation) (unit @storage)))))
))
(errors . (
)))

@nfillion21
Copy link
Author

Okay, looks like the stack works when I open IntelliJ in the terminal from the same directory where the script is :)

screenshot 2019-02-05 at 14 56 18

@jansorg
Copy link
Owner

jansorg commented Feb 22, 2019

@nfillion21 Hm, this might be the case if you've configured the client without an absolute path and if alphanet.sh isn't in $PATH. Is this possible?

I've uploaded a version with more logging. I'm not sure though if it helps in this case, though. https://github.com/jansorg/tezos-intellij#logfile has a few instructions how to use it.
The update has to be approved by JetBrains before it is made public (early next week probably)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants