Skip to content
This repository has been archived by the owner on Jan 31, 2023. It is now read-only.

Upgrade from palette without contracts - Cannot read property 'data' of undefined #1970

Closed
lquintai opened this issue Feb 21, 2020 · 0 comments · Fixed by #2009
Closed

Upgrade from palette without contracts - Cannot read property 'data' of undefined #1970

lquintai opened this issue Feb 21, 2020 · 0 comments · Fixed by #2009
Assignees
Labels
bug Something isn't working
Milestone

Comments

@lquintai
Copy link
Contributor

Problem:
When running the upgrade command from the command palette, if there are no contracts, we get the following errors:

  1. Local runtime has no instantiated chaincodes
  2. Cannot read property 'data' of undefined

Cause
initialSmartContract is assumed to be valid in the upgrade command.

Possible fix
Error number 1 is not thrown, so we can't catch it. We can evaluate if initialSmartContract is undefined, and if so do something appropriate (possibly abort).

@cazfletch cazfletch added the bug Something isn't working label Feb 24, 2020
@cazfletch cazfletch added this to the Sprint 26 milestone Feb 24, 2020
@cazfletch cazfletch self-assigned this Feb 28, 2020
cazfletch added a commit that referenced this issue Feb 28, 2020
Fixed the error so it will exit out of the command when no smart contracts
Fixed the message as it mentioned Local runtime rather than environment name
Fixed erorr message when no contracts in a gateway to choose from as that also mentioned local runtime

closes #1970
Signed-off-by: Caroline Fletcher <cazfletch@gmail.com>
@cazfletch cazfletch added the next label Mar 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants