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

Front end loads before backend causing a page refresh to be required #27

Open
joncodo opened this issue Jan 9, 2023 · 6 comments
Open

Comments

@joncodo
Copy link
Contributor

joncodo commented Jan 9, 2023

There seems to be a problem with the frontend calling /integrations.

I am hitting an issue where the network tab shows an error on integrations after log in and fails to render the list in the UI. Then if you refresh, it just works.

Maybe this is a race condition from when the UI is running to when the backend is running?
GET http://localhost:3001/dev/api/integrations net::ERR_CONNECTION_REFUSED

@seanspeaks
Copy link
Contributor

seanspeaks commented Jan 9, 2023 via email

@sheehantoufiq
Copy link
Contributor

sheehantoufiq commented Jan 9, 2023

@joncodo @seanspeaks Does the skeleton loader show up? Or show up then disappear? It might be something on the frontend related to this MR and the removal of redux for the integration components

@joncodo
Copy link
Contributor Author

joncodo commented Jan 9, 2023

Well once the backend service is running, the page either needs to auto reload or to show a spinner with a message in the front end.

This also fixes the user experience if the application ever goes down on the backend and not the front end.

The other thing to do is to just run the backend first and then the front end fro local development from the script. I am fine with anything that fixes this bug 😄

@sheehantoufiq
Copy link
Contributor

@joncodo Yeah, it worked before. It showed a skeleton loader until the backend was initialized. It most likely isn't working now because redux for those components seem to have been removed with the last MR. @seanspeaks @fbsis

@joncodo
Copy link
Contributor Author

joncodo commented Jan 9, 2023

Yes I do see that skeleton (I understand what you mean now). We just need to match that up with redux data listeners I guess so when the data is populated, the component renders. Which I think is what you are saying here too 👍

@sheehantoufiq
Copy link
Contributor

sheehantoufiq commented Jan 9, 2023

Yeah, it should do that automatically if we add this code back in lines 190 for this 150 for this

Essentially the props aren't being mapped to the redux state, after rendering the page it listens from there, but instead gets added to reacts overall state so it shows up with the refresh. From the notes of that MR, I'm guessing it's unfinished with plans to move to react's context api or redux-toolkit

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

No branches or pull requests

3 participants