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
Error handling #637
Comments
Hi @metaraja, thanks for the clear description and the zip file with your code. I was able to reproduce the problem and have confirmed that it is a bug with single-spa. One thing to note is that to reproduce the issue, you must first go to the home page before going to pvt, and then go back to the home page. The bug was a regression caused by this performance-related refactor that was released in single-spa@5. I will put together a fix today for it. |
Thanks for the quick response, waiting for the fix :-) |
#638 fixes this - we'll review it probably today and release a new patch. |
Fix released in https://github.com/single-spa/single-spa/releases/tag/v5.6.1 |
I'm still facing the same issue. Please find the dependencies as below: "single-spa": "^5.9.3",
"single-spa-layout": "^2.1.0" I fixed this the following way: window.addEventListener('single-spa:before-app-change', evt => {
let el = document.getElementById("content");
errorMsg = ''
el.innerHTML = errorMsg;
}); |
Hi Anand raja,@actionanand I am trying to catch the error if the module not loading ,so i try to use your code ,like direct copy and paste .But it is showing the error,Can you please share the complete code ,I am trying to use in angular.Please help. |
we use the code in angular to load the parcel. |
Whenever a App is down - catch the exception and display friendly message to users.
To Reproduce
Sample -- Portal.zip
Apps -- Navbar, Home, Pvt
Root app is the bridge between these 3 apps and navbar has link to Home and Pvt apps.
Run the apps locally,
Root app: yarn start --port 9000
NavBar app: yarn start --port 8500
Home app: yarn start --port 8600
Pvt App: DO NOT RUN IT
Steps:
Expected behavior
Once we move to a working app, error message should go away.
Screenshots and/or console output
Step 1. Loading home page/app first time
Step 2. Navigating to Pvt app first time
Step 3. Navigating back to home page/app
Additional context
I have created these projects using create-single-spa.
Exception is caught again after redirecting to home page - PFA console log.
Appreciate your inputs. I would like to know whether it is a problem with my code or Single-SPA to proceed further.
The text was updated successfully, but these errors were encountered: