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

Remote clock throws an error if time system is set before remote clock object resolved #6062

Closed
3 of 7 tasks
akhenry opened this issue Dec 16, 2022 · 1 comment · Fixed by #6063
Closed
3 of 7 tasks

Comments

@akhenry
Copy link
Contributor

akhenry commented Dec 16, 2022

Summary

When initializing Open MCT the time system tends to be set synchronously. The remote clock registers a time system change listener that assumes that the remote clock object has been resolved, but this resolution happens asynchronously, resulting in an error.

Expected vs Current Behavior

Registering the time system event handler handler should be deferred until after the remote clock object has been resolved.

Steps to Reproduce

  1. Install the remote clock plugin (or use a system where it's already installed)
        openmct.install(openmct.plugins.RemoteClock(/* some object identifier */));
  1. Configure the time conductor so that the remote clock is the default
openmct.install(openmct.plugins.Conductor({
    menuOptions: [
        {
            name: "Remote",
            timeSystem: 'utc',
            clock: 'remote-clock',
            clockOffsets: {
                start: - FIFTEEN_MINUTES,
                end: FIFTEEN_SECONDS
            }
        },
        {
            name: "Realtime",
            timeSystem: 'utc',
            clock: 'local',
            clockOffsets: {
                start: - FIFTEEN_MINUTES,
                end: FIFTEEN_SECONDS
            }
        },
        {
            name: "Fixed",
            timeSystem: 'utc',
            bounds: {
                start: Date.now() - FIFTEEN_MINUTES,
                end: Date.now() + FIFTEEN_SECONDS
            }
        }
    ]
}));
  1. Load Open MCT
  2. Observe that it fails to load and an error is shown in the JavaScript console

Environment

  • Open MCT Version: 2.1.4
  • Deployment Type: viper local proxy

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?
  • 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

@michaelrogers
Copy link
Contributor

michaelrogers commented Dec 28, 2022

Fix verified during testathon on 12/28/2022 locally against release/2.1.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants