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

LOAD_ERROR state does not exist in version 4.4.0 #397

Closed
tscislo opened this issue Dec 2, 2019 · 4 comments · Fixed by #412
Closed

LOAD_ERROR state does not exist in version 4.4.0 #397

tscislo opened this issue Dec 2, 2019 · 4 comments · Fixed by #412

Comments

@tscislo
Copy link

tscislo commented Dec 2, 2019

Describe the bug or question
According to release note there should be LOAD_ERROR app state in version 4.4.0:
https://github.com/CanopyTax/single-spa/releases/tag/v4.4.0

To Reproduce
LOAD_ERROR app state is not available in the code in single-spa.d.ts (from npm):

  export const {
    NOT_LOADED = "NOT_LOADED",
    LOADING_SOURCE_CODE = "LOADING_SOURCE_CODE",
    NOT_BOOTSTRAPPED = "NOT_BOOTSTRAPPED",
    BOOTSTRAPPING = "BOOTSTRAPPING",
    NOT_MOUNTED = "NOT_MOUNTED",
    MOUNTING = "MOUNTING",
    MOUNTED = "MOUNTED",
    UPDATING = "UPDATING",
    UNMOUNTING = "UNMOUNTING",
    UNLOADING = "UNLOADING",
    SKIP_BECAUSE_BROKEN = "SKIP_BECAUSE_BROKEN"
  }

Expected behavior
LOAD_ERROR app state should be available according to docs

@joeldenning
Copy link
Member

👍 would you like to submit a pull request that adds this to the typescript definitions?

@tscislo
Copy link
Author

tscislo commented Dec 2, 2019

@joeldenning
I do not think this is just case of typings.
In scenario in which my app's module was not reachable and SystemJS gave up on fetching it I didn't get this status in error handler. I just got LOADING_SOURCE_CODE status and nothing more. I consider this to be the real problem here and not the fact that it is not available in typings.

@joeldenning
Copy link
Member

LOAD_ERROR was added recently in #342. I checked out the minified published version of the code and it looks like it's missing the check for UserError which is weird. Will look into this more later.

@joeldenning
Copy link
Member

joeldenning commented Dec 18, 2019

I just looked at this again and I was wrong about the published code having a problem. The published code appears to be totally fine.

The typescript definitions are out of date, but other than that I see no problems here. I'll submit an update to the typescript definitions.

See https://unpkg.com/single-spa@4.4.0/lib/esm/single-spa.min.js and search for LOAD_ERROR - you will see it is in there. If you'd like to report a different bug about your scenario where the application maybe did not go into LOAD_ERROR status when it should have, please do that as a separate bug. I'm going to treat this github issue as only the typescript definitions being out of date.

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

Successfully merging a pull request may close this issue.

2 participants