Skip to content

[BUG] "2sxc app is unhealthy" #3668

@enfJoao

Description

@enfJoao

Bug Affects...

[x] other / unknown

Current Behavior / Expected Behavior

After using an app for some time, I got this error:
"2sxc app is unhealthy. Error while building App state in memory, probably during initial load. trying to add entity, but not in loading state. set that first!"
The app refused to start. Cleared cache and restarted server, it worked again.

There has to be a more gracious way to deal with this type of errors, possibly restarting the app/server automatically.

To Reproduce (Steps, Videos, Screenshots, Apps)

const someSvc = sxc.data('someDataType');
someSvc.update(someId, someData)
.then(clientsSvc.update(someOtherId, someOtherData)
.then(() => location.reload()));

This was probably caused by this type of code and two api calls very close.
Adding a simple 500ms setTimeout between them seems to prevent the issue.

Your environment

  • 2sxc version(s): 20.03
  • DNN / Oqtane: DNN 10.01

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