Skip to content

appStatusChange observer changed status but not sync to planet.appsStatus #212

@Alex4Yang

Description

@Alex4Yang

Describe the bug
appStatusChange observer changed status but not sync to planet.appsStatus

To Reproduce

  1. Invoke the following code
this.planet.appStatusChange.subscribe((status: AppStatusChangeEvent) => {
    if (status.app.name === 'key' && status.status === 4) {
        (this.planet as any).planetApplicationLoader.reroute({ url: this.router.url });
    }
});

raise following error

app.component.ts:305 Failed to load resource, error: Error: app(key)'s status is 3, can't be show or bootstrap
    at worktile-planet.js:745
    at Array.forEach (<anonymous>)
    at MapSubscriber.project (worktile-planet.js:712)
    at MapSubscriber.push../node_modules/rxjs/_esm5/internal/operators/map.js.MapSubscriber._next (map.js:35)
    at MapSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next (Subscriber.js:53)

After debug, found that

this.appsStatus.get(app); // value is 3

Expected behavior
not show error log

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

Desktop (please complete the following information):

  • OS: windows
  • Browser edge
  • Version 95

Additional context
na

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions