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: Left over bytes invoking getDeploy #380

Open
3 tasks
meywood opened this issue Jan 3, 2024 · 0 comments
Open
3 tasks

Error: Left over bytes invoking getDeploy #380

meywood opened this issue Jan 3, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@meywood
Copy link

meywood commented Jan 3, 2024

TypeError: Cannot read properties of undefined (reading 'toBytes') when calling getDeploy against node with valid Deploy

The following exception was thrown when readlng the attached deploy from a node

deploy_causing_error_Left_over_bytes.json

Error: Tried to unwrap Error: Left over bytes
    at ErrImpl.unwrap (/Users/imills/casper/cspr-typescript-sdk-standard-tests/node_modules/src/result.ts:123:15)
    at Function.fromJSON (webpack://casper-js-sdk/./src/lib/CLValue/Abstract.ts:70:67)
    at from (webpack://casper-js-sdk/./src/lib/RuntimeArgs.ts:49:34)
    at Function.from (<anonymous>)
    at Object.l [as deserializer] (webpack://casper-js-sdk/./src/lib/RuntimeArgs.ts:48:11)
    at /Users/imills/casper/cspr-typescript-sdk-standard-tests/node_modules/typedjson/src/deserializer.ts:301:50
    at Map.forEach (<anonymous>)
    at convertAsObject (/Users/imills/casper/cspr-typescript-sdk-standard-tests/node_modules/typedjson/src/deserializer.ts:294:36)
    at Deserializer.convertSingleValue (/Users/imills/casper/cspr-typescript-sdk-standard-tests/node_modules/typedjson/src/deserializer.ts:132:20)
    at TypedJSON.parse (/Users/imills/casper/cspr-typescript-sdk-standard-tests/node_modules/typedjson/src/parser.ts:411:40)

TypeError: Cannot read properties of undefined (reading 'toBytes')
    at toBytes (webpack://casper-js-sdk/./src/lib/DeployUtil.ts:690:37)
    at e.toBytes (webpack://casper-js-sdk/./src/lib/DeployUtil.ts:757:29)
    at serializeBody (webpack://casper-js-sdk/./src/lib/DeployUtil.ts:1285:54)
    at validateDeploy (webpack://casper-js-sdk/./src/lib/DeployUtil.ts:1570:26)
    at Object.deployFromJson (webpack://casper-js-sdk/./src/lib/DeployUtil.ts:1502:17)
    at webpack://casper-js-sdk/./src/lib/CasperClient.ts:277:28
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

To Reproduce

See casper standard test: https:/stormeye2000/cspr-sdk-standard-tests-typescript/blob/main/src/step-definitions/cl-values.steps.ts line 83

Identify if any Prequisites:

Steps to reproduce the behavior:

  1. Go to '...'
  2. ..

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
deploy_causing_error_Left_over_bytes.json

This was executed against "casper-js-sdk": "2.15.3"

Defect Type

  • Regression
  • New
  • Escape
@meywood meywood added the bug Something isn't working label Jan 3, 2024
@meywood meywood changed the title Exc Error: Left over bytes invoking getDeploy Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant