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

addBlock crashes with TypeError on ReadOnlyMode #34

Open
dckc opened this issue Nov 8, 2018 · 2 comments
Open

addBlock crashes with TypeError on ReadOnlyMode #34

dckc opened this issue Nov 8, 2018 · 2 comments
Assignees

Comments

@dckc
Copy link
Collaborator

dckc commented Nov 8, 2018

The real issue is:

$ rnode propose
Response: Error while creating block: ReadOnyMode

but using rchain-api, I get:

$ rclient propose -v
options: { '--help': false,
  '--host': 'localhost',
  '--port': '40401',
  '--verbose': true,
  RHOLANG: null,
  deploy: false,
  propose: true }
failed to propose to localhost:40401: Cannot read property 'blockHash' of undefined
TypeError: Cannot read property 'blockHash' of undefined
    at Type.BlockMessage$fromObject [as fromObject] (eval at Codegen (/home/connolly/projects/RChain-API/node_modules/@protobufjs/codegen/index.js:50:33), <anonymous>:7:8)
    at Type.fromObject (/home/connolly/projects/RChain-API/node_modules/protobufjs/src/type.js:538:25)
    at serialize (/home/connolly/projects/RChain-API/node_modules/@grpc/proto-loader/build/src/index.js:55:27)
    at Object.final_requester.sendMessage (/home/connolly/projects/RChain-API/node_modules/grpc/src/client_interceptors.js:802:37)
    at InterceptingCall._callNext (/home/connolly/projects/RChain-API/node_modules/grpc/src/client_interceptors.js:418:43)
    at InterceptingCall.sendMessage (/home/connolly/projects/RChain-API/node_modules/grpc/src/client_interceptors.js:460:8)
    at InterceptingCall._callNext (/home/connolly/projects/RChain-API/node_modules/grpc/src/client_interceptors.js:424:12)
    at InterceptingCall.sendMessage (/home/connolly/projects/RChain-API/node_modules/grpc/src/client_interceptors.js:460:8)
    at ServiceClient.Client.makeUnaryRequest (/home/connolly/projects/RChain-API/node_modules/grpc/src/client.js:498:21)
    at apply (/home/connolly/projects/RChain-API/node_modules/lodash/lodash.js:478:17)
@dckc
Copy link
Collaborator Author

dckc commented Nov 8, 2018

@JoshOrndorff is unable to reproduce

he started a node without casper (rnode run -s -n) and tried to deploy (by running node rhopm.js --package exampleProject/powers.rho)

It failed with a reasonable diagnostic:

(node:6644) UnhandledPromiseRejectionWarning: Error: Error while creating block: ReadOnyMode
    at responseP.then (/home/joshy/ProgrammingProjects/rhopm/node_modules/rchain-api/rnodeAPI.js:156:38)

version: It's the same rhopm that's the tip of master on my github and rchain-api 0.7.1-beta.2

@JoshOrndorff
Copy link
Contributor

Was this actually using addBlock or was it createBlock? I believe createBlock is the equivalent service of rnode propose.

@dckc dckc self-assigned this Nov 13, 2018
@dckc dckc transferred this issue from another repository Nov 17, 2018
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