openmct icon indicating copy to clipboard operation
openmct copied to clipboard

Cannot read properties of undefined (reading 'openmct')

Open ghost opened this issue 10 months ago • 2 comments

Summary

When using the "Import From JSON" action, validation throws an uncaught error if an improperly formatted/non-JSON text file is selected.

Image

Expected vs Current Behavior

Expected: An error notification should appear in the UI like in this image below.

Image

Actual: No error notification appears.

Steps to Reproduce

  1. From the action menu, click "Import From JSON"
  2. In the Import From JSON pop-up dialog, select a non-JSON text file
  3. A red X should now appear next to the select-file button.
  4. Close the import dialog. There's no error notification.

Environment

  • Open MCT Version: 4.1.0-next
  • Deployment Type: np m dev
  • OS: Ubuntu 22.04
  • Browser: Firefox 134.0 64-bit, Chromium 131.0.6778.264, Brave 1.73.105

Impact Check List

  • [ ] Data loss or misrepresented data?
  • [ ] Regression? Did this used to work or has it always been broken?
  • [ ] Is there a workaround available?
  • [ ] Does this impact a critical component?
  • [X] Is this just a visual bug with no functional impact?
  • [ ] Does this block the execution of e2e tests?
  • [ ] Does this have an impact on Performance?

Additional Information

ghost avatar Jan 14 '25 21:01 ghost

Code update complete. Opening PR soon.....

ghost avatar Jan 14 '25 21:01 ghost

Associated PR: https://github.com/nasa/openmct/pull/7984

ghost avatar Jan 14 '25 21:01 ghost