question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: Cannot read property 'errors' of undefined

See original GitHub issue

I have used the @openzeppelin/truffle-upgrades@1.5.0 without the package @openzeppelin/upgrades-core when I deploy an upgradable contract some weeks ago。I create a new project with my contracts code and take this errors:

TypeError: Cannot read property 'errors' of undefined
    at /Users/work/allan/node_modules/@openzeppelin/truffle-upgrades/node_modules/@openzeppelin/upgrades-core/src/validate/query.ts:109:58
    at Array.map (<anonymous>)
    at getErrors (/Users/work/allan/node_modules/@openzeppelin/truffle-upgrades/node_modules/@openzeppelin/upgrades-core/src/validate/query.ts:109:26)
    at Object.assertUpgradeSafe (/Users/work/allan/node_modules/@openzeppelin/truffle-upgrades/node_modules/@openzeppelin/upgrades-core/src/validate/query.ts:13:16)
    at deployProxy (/Users/work/allan/node_modules/@openzeppelin/truffle-upgrades/src/deploy-proxy.ts:49:3)
    at processTicksAndRejections (node:internal/process/task_queues:94:5)
    at module.exports (/Users/work/allan/migrations/10_mdxpool_deploy.js:8:24)
    at Migration._deploy (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/Migration.js:80:1)
    at Migration._load (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/Migration.js:61:1)
    at Migration.run (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/Migration.js:218:1)
    at Object.runMigrations (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/index.js:150:1)
    at Object.runFrom (/usr/local/lib/node_modules/truffle/build/webpack:/packages/migrate/index.js:110:1)
    at runMigrations (/usr/local/lib/node_modules/truffle/build/webpack:/packages/core/lib/commands/migrate.js:253:1)
    at Object.run (/usr/local/lib/node_modules/truffle/build/webpack:/packages/core/lib/commands/migrate.js:223:1)
    at Command.run (/usr/local/lib/node_modules/truffle/build/webpack:/packages/core/lib/command.js:147:1)

I have change all the packets to the same version with my old project ,but still occured the same error? how Can I do not use this @openzeppelin/upgrades-core packages? OR fix this errors? Thank you

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Amxxcommented, Jun 28, 2021

Note that you are not using the latest version of the upgrades plugin. Version are backward compatible, and include a manifest migration mechanism.

I would encourage you to save a backup of your .openzeppelin folder, upgrade to the latest version of the plugin (@openzeppelin/truffle-upgrades:1.7.0) and see it that fixes anything.

0reactions
zhangliang7190commented, Jun 29, 2021

Note that you are not using the latest version of the upgrades plugin. Version are backward compatible, and include a manifest migration mechanism.

I would encourage you to save a backup of your .openzeppelin folder, upgrade to the latest version of the plugin (@openzeppelin/truffle-upgrades:1.7.0) and see it that fixes anything.

I think that is my contracts’s problem. I have to try it. tks

Read more comments on GitHub >

github_iconTop Results From Across the Web

[SOLVED] Cannot Read Property of Undefined in JavaScript
The “cannot read property of undefined” error occurs when you attempt to access a property or method of a variable that is undefined...
Read more >
Cannot read property 'errors' of undefined in angular 2
I am validating my template using angular2, but meanwhile it shows this error: Cannot read the ...
Read more >
Uncaught TypeError: Cannot read property of undefined In
JavaScript TypeError is thrown when an operand or argument passed to a function is incompatible with the type expected by that operator or...
Read more >
[Solved] Cannot read Properties of Undefined in JavaScript
The "Cannot read properties of undefined" error occurs when you try to access a property or a method on a variable that stores...
Read more >
Fix: “Cannot Read Property of Undefined” Error in JavaScript
To fix the “cannot read property of undefined” error, use the optional chaining operator on the variable before accessing a property. If the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found