Open vikasrohit opened 5 years ago
@maxceem could you please take a look when you have time? It is not that urgent but good to have fixed as soon as possible because we are seeing such errors now too often.
@vikasrohit sure, would you like it to be fixed before form wizard/dependant question is done or after?
If it does not take more than 30 minutes, I would like to get it first as we are seeing issues on production.
@vikasrohit I cannot reproduce the issue.
I simulate the timeout error by throwing error inside getNotifications
in 30
seconds:
const getNotifications = () => {
return new Promise(() => {
setTimeout(() => {
throw new Error('error loading getNotifications')
}, 30000)
})
// return axios.get(`${TC_NOTIFICATION_URL}/list?read=false&limit=${NOTIFICATIONS_LIMIT}`)
// .then(resp => prepareNotifications(resp.data.items))
}
But both project listing and project details pages are loaded without any issues:
I guess both these pages could fail to be loaded if metadata
requrests is failed due to timeout. It would help a lot if someone who next time experince such issue will share the screenshot of the browser console.
@vikasrohit have seen this issue lately or maybe we can close it for now?
Yes, I have seen it yesterday. Console just says timeout because list notifications call took more than 20 seconds.
I think to simulate you need to pass lesser timeout not greater. Try setting it to 100ms to simulate the timeout.
@maxceem could we take this in our next bug bash?
@vikasrohit I haven't yet managed to reproduce it, but will include it to the CF pipeline and will try one more time.
To properly fix this issue we should do two things:
[REQUIRED]
Find a way to reproduce it. (we may need to simulate network error or something like that).[REQUIRED]
Fix it.Just to confirm @maxceem, this is still happening on production and latest error occurred couple of days back on May 8, 2019.
@maxceem can you please assign it to me ?
sure
@maxceem
is it possible that due to the network delay other api calls are also timing out and hence it seems that page is not loading ...i had set the network throttling to (a custom) very slow and saw this
@sumitdaga as per report, the issue is that when loading notifications is failed, nothing is shown. So as I understand from report other requests works good, and the issue is that one failed request for notifications breaks the app.
In the way you suggest not only notifications request is failed, but others also. Here we try to understand how if only loading notifications is failed the whole app got broken.
This is as per report, unfortunately I don't have more information.
@maxceem @vikasrohit
ok so to just mock timeout the notifications (or any call) i added another axiosInterceptor code block in this file https://github.com/appirio-tech/connect-app/blob/dev/src/api/requestInterceptor.js
and then i imported this in https://github.com/appirio-tech/connect-app/blob/dev/src/routes/notifications/services/notifications.js
so this i guess handles first part of the issue - how to mock failure of notifications due to network delay
but i still couldn't reproduce the main issue as you can see in the screenshot below
@maxceem is this becoming open again?
@sumitdaga yeah, this reproduces the delay and makes notifications requests failed, but doesn't reproduce the issue as projects are still shown.
Here I also tried another way to fail notifications request https://github.com/appirio-tech/connect-app/issues/2715#issuecomment-448142481, but it didn't break loading projects. But as per the report, there is only notifications timeout error in the console and everything is broken https://github.com/appirio-tech/connect-app/issues/2715#issuecomment-455044596.
So we have to find a way how failing loading notifications can break showing projects.
@gautam1168 as @sumitdaga is actively working on the issues and issue indeed may take more time due to its research nature, the issue would stay for @sumitdaga for now.
@maxceem can you.please release me from this one and assign the other issue to me ..I don't know what else to do here
Ok, @sumitdaga, thanks for giving a try.
This issues now open for pick up. The one who first comment can start working on it.
ill give it a shot
sure, it's on you
A couple of queries:
Maybe it only happens in the when env is production. I tried to set the --env=production in the start script in package.json but the website didn't load even though it compiled with no errors. Do you know how to build and deploy in prod mode locally?
Maybe it only happens in the when env is production. I tried to set the --env=production in the start script in package.json but the website didn't load even though it compiled with no errors. Do you know how to build and deploy in prod mode locally?
When we build website locally it builds and gzips files. So files in the dist folder are zipped. You can use this small server to run in PROD, download from here.
connect-app
next to folder local-prod-server
local-prod-server
run npm install
local-prod-server
run npm start
The connect app should be run on port 3000
in production mode.By throwing an error in getNotifications in the prod build I can get the load of project list to delay a bit but I can't get it to crash. Even on production I was not able to reproduce the error. I have only tried on chrome.
I don't want to work on this anymore. Consider this issue released from me.
Thanks for giving a try for it @gautam1168.
This issue is now open for pickup.
I would like to give it a try.
sure @amitpatra
@maxceem @gautam1168 @amitpatra just to reiterate, on production there is no specific way to reproduce it and this error occurs randomly and once it appeared it stays that way for some time. I mean after first occurance, even after multiple page refresh, it just dont load. Also, I didnt notice any other error in console apart from timeout for notifications call.
Hi, even I wasn't able to reproduce the issue, hence leaving it for pickup.
Thanks for checking it @amitpatra.
This issue is now open for pickup.
The prize for this issue is increased to $150
. As we still cannot find a way to reproduce it, everybody may give it a try.
@maxceem i would like to try, please assign me. Thanks!
Sure, thanks.
Hi everybody.
Please, don't forget to submit the list of issues you've been working on during this challenge with your Github and Topcoder handle. No matter if your PR is already approved or not yet.
This would speed up the payment process.
Thank you.
cc @akumar1503 @PrakashDurlabhji @sumitdaga @rashmi73 @applehit16
Expected behavior
Should load the app as normal, only thing that should not be working is the notifications panel
Actual behavior
It does not render any thing if there is a timeout in /notifications call
Steps to reproduce the problem
Screenshot/screencast
--
Environment