Production not working with Rails feature

Hello. So, I had this issue with installing Rails feature in my project, and I managed to do it and work in development mode. However, I’m having issues with the production part.

Expected behavior

It is expected that the production environment works well and the Dashboard has no errors.

Actual behavior

In production, I already put all the correct keys and auth in my ENV variables. This morning, the project was not working and I was getting

Howevere, and I don’t know how, it start working and I don’t know why! But, when I start designing my Dahsboard, I get the next thing:

Failure Logs

This are some Logs and Network Tab screenshots about the calls:

Context

  • Package Version: The gem forest_liana@6.3.1 and rails@6.1.0
  • Project Name: Arkangel AI Rails

Deployed in GCP App Engine Feature.

Can you give more info on the chart you are trying to setup ?

It could be also nice to have more information on the origin of the error 400. Why is your server not responding to this url and etc…

Thanks for the new thread creation by the way ! :slight_smile:

So now is not working. It appears is, again, disconnected.

![Captura de pantalla de 2021-04-23 10-11-55|690x387]
(upload://k2vcGbzpUTUIFPaHyH5uQmP9df.png)

Hi @Santiago_Giraldo,

It seems there are issues with authentication.
To provide us a complete log of what happened, can you please export a HAR of the network calls?
This can be done with Chrome, in the dev tools, under the network tabs, right-click on the network calls stack and select “export as HAR”.

Thank you

Hi again @Santiago_Giraldo,

After discussion with my teammates, a possible cause is that you have multiples instances of your production server.
Please note that (if it is the case) all instances should share the same client-id, to do this it is required to define a static client-id.

Documentation about how to set up a static client-id can be found here.
If this does not fix your case, please consider providing HAR as mentioned in my first message

Regards

Hi @Sliman_Medini,

I tried the client_id thing, but it didn’t work, still with the same problem. As you told me, here is the HAR file you were asking for

I wasn’t able to upload it directly, so I generate a drive link so you can download it.

Ok @Santiago_Giraldo,

Do you have multiple instances for your production server?

Thank you

Since I’m deploying in GCP, it has a load balancer which creates more instances if necessary. But I just have 1 App Engine project where I deploy it.

Hi @Santiago_Giraldo,

Thanks for the HAR file.
We can see the following error message in it:

"{\"errors\":[{\"status\":400,\"detail\":\"The redirect uri must be one of https://app.arkangel.ai/forest/authentication/callback. Received \\\"https://app-live-287415.uc.r.appspot.com/forest/authentication/callback\\\"\",\"meta\":{},\"name\":\"InvalidRedirectUriError\"}]}"

Can I ask you:

  • which value you defined for your APPLICATION_URL environment variable in production?
  • the forest_client_id you have setup in production using the documentation.

It looks like there is something inconsistent in your production environment between the endpoint defined on Forest Admin and the clientId URL.

Thanks for your help

Hi @arnaud

So you are right. I changed the APPLICATION_URL when creating the static cilent_id. Now is working. However, I still have errors in my dashbord. I can’t create new dashboard or values. I get this:

I don’t know if I have to create something inside my app for it to work. In my app logs I get the next thing:

I think it can be a bug, since the filter method is not defined inside my project

And do those similar charts work in your local environment?
Does it work if you recreate those charts in the production UI?

Nope, it doesn’t work either.

This is the log I get in my local machine

Hello @Santiago_Giraldo,

I have a quick question regarding the last error you faced. filter_map has been added from ruby 2.7.
What is your version of ruby in development and on your production servers?

Let me know :slight_smile:

Thanks @Guillaume_Cisco !! I had the 2.6, and I installed the 2.7 and is working! Thank you so much :smiley:

1 Like