Hey Forest,
So up until recently dashboards worked fine but recently we realized that all of our charts that are written as SQL throw the ‘Forbidden’ error. The Simple charts work normally. How do we solve this?
Thank you.
Hey Forest,
So up until recently dashboards worked fine but recently we realized that all of our charts that are written as SQL throw the ‘Forbidden’ error. The Simple charts work normally. How do we solve this?
Thank you.
Hello @Arda_Yurdakul,
Can you give me more details so that I can try to reproduce your error on my end please?
What type of charts are you using?
Do you have scopes or segments in place?
All the written queries throw a Forbidden error
? Even simple queries?
Thank you in advance,
Mia
Hi @anon23361380 ,
We use Single Value and Time Based charts. They both produce the same error if written in SQL. Simple queries we make through the Forest UI work normally. We have scopes in place for most tables generally to filter out soft deletes. We don’t use segments currently.
Thank you.
Hello again @Arda_Yurdakul,
I will try to reproduce this regression on my end, and will get back to you as soon as I have more details on this point
Hello @anon23361380,
Thank you. I’m happy to give more info if needed, the issue is a big deal to us, so I appreciate it.
Hello @Arda_Yurdakul,
I’m taking the relay on this thread. We need some information to try to dig into the issue.
forest-express-sequelize 8.0.9
?Thank in advance. Sorry for the inconvenient.
Morgan
Hello @morganperre ,
Thank you for the response.
We are indeed running 8.0.9
Here are the logs. It seems the route is not being called correctly for the failing charts:
I created the simplest sql chart possible as a test:
Here is the request info for that chart:
Hi again,
Thank you for your detailed response.
SELECT count(*) as value FROM stats;
I think we need to have some clear log to understand the problem. I will come back to you tomorrow with more information.
Thank for your patience.
Morgan
Hey @morganperre ,
Ah sorry I forgot to add the ‘as value’ as I was trying to quickly create a new one, all the other charts do have it but the problem persists unfortunately.
Looking forward to it. Thank you so much.
One last thing, can you give me your project name ? It could be helpful to double check some information to reproduce the issue.
Thanks.
Kind regards,
Morgan
Yes of course, the project name under package.json is ‘monta-server-test’. It has since been renamed to Monta Admin Panel in the Forest UI though. I’m not sure which one you actually need
Hello @Arda_Yurdakul,
The right one is Monta Admin Panel, I wasn’t sure either to be honest.
After a long digging, I think we found the culprit… You have a collection named stats am I right ? This create a conflict between the express routes /forest/stats (used by your stats collection and our internal route stats used for the charts).
If you don’t use the creation of stats records, just comment the post in your stats route.
// Comment the following lines
// Create a Stats
/* router.post('/stats', permissionMiddlewareCreator.create(), (request, response, next) => {
// Learn what this route does here: https://docs.forestadmin.com/documentation/v/v6/reference-guide/routes/default-routes#create-a-record
next();
}); */
We will create a ticket on our side to make a fix but it could take some time in order to have the ressources to find a solid solution.
Really sorry for this hassling issue. We will update this thread once we release the fix. Thank again for your patience.
Kind regards,
Morgan
PS: Tell me if the workaround works for you.
Hello @morganperre ,
Thank you so much for your help, that indeed did the trick!