Since Friday, several user from our CS team get this message while using Forest
Expected behavior
When we want to search for a user, I want to find him quickly with his name for example
Actual behavior
As a result, we get : Your server encountered an error
What is the current behavior?
Failure Logs
Inspecting the console, we get 3 errors :
Failed to load resource: net::ERR_BLOCKED_BY_CLIENT
Failed to load resource: the server responded with a status of 404 ()
Failed to load resource: the server responded with a status of 500 (Internal Server Error)
On network, we get few errors from
You can check the loom below : Loom | Free Screen & Video Recording Software
Context
I’m not dev, but CS lead. Will ask Pierre Megret about theses infos
Please provide any relevant information about your setup.
- Package Version:
- Express Version:
- Sequelize Version:
- Database Dialect:
- Database Version:
- Project Name:
Hello @Marc_Antoine,
I am sorry to read you have some issues with ForestAdmin.
This looks like an issue with the server deployed on your side, as the 500
error comes from it.
Let’s try to understand what’s going on 
In order to troubleshoot it, I would need some information.
Does it happen for all the collections or just this particular one?
Does it happen for the same CS users or it occurs randomly?
Does it happen only when searching or also when using the filter?
I would also require some technical information. As I understood you’re not a tech person, but it would be cool if you can ask your tech team to answer those questions.
Do you have any custom code added for retrieving the list of users?
Do you have any errors in the server console?
Is the communication between the server and the database stable?
Thank you
Hi @anon90145840 !
Thanks for your quick answer !
It’s no working again… but could be great to know what happened.
- While testing, it was only on
Users collections
- It was randomly impacting our CS
- Only when searching (we don’t use a lot filters)
I ask a tech to answers others questions
See you
Hi @anon90145840 !
To follow up on @Marc_Antoine and answer your questions:
- Do you have any custom code added for retrieving the list of users? Yes, when searching for a user name, we actually search through a Smart Field
fullname
built from firstname
and lastname
.
- Do you have any errors in the server console? We did not spot any errors from our servers.
- Is the communication between the server and the database stable? Yes, no latency there.
Could it be that our backend takes time to process the answer and Forest’s frontend considers the request as having timed out ?
2 Likes
Hello @Pierre_Megret
Thank you for those details!
The timeout error is definitely generated by your server since it’s in the network response with a 500
error. If it would be a frontend timeout the request response would look differently.
Would you like to share with me the code of the search function you use? So I can have a look at it and see if I spot any issues. (If it contains any sensible information, you can share it in private message.)
1 Like
Here’s a screenshot of the code we use to create our Smart Field “Fullname”:
And our version of forest:
pierre@luko-pierre ~/forest (dev) $ npm -v sequilize
6.14.10
1 Like
well, I am not sure what is causing the issue, but maybe you could replace this code by
search(query, search) {
const s = models.sequelize;
const split = search.split(' ');
const searchCondition = s.and(
{ user_firstname: { [Op.iLike]: `%${split[0]}%` } },
{ user_lastname: { [Op.iLike]: `%${split[1]}%` } },
);
query.where.$and[0].$or.push(searchCondition);
},
We have this code running in our production and no timeouts noticed. So maybe you can give it a try?
Let me know if it helps
1 Like