Can't update layout

Expected behavior

When trying to select display widget as image in the layout it should work
I have same problem for any change in the layout

Actual behavior

For updating the widget i get a “Bad request error…”

Failure Logs

{isAdapterError: true, stack: “Error: Ember Data Request PATCH https://api.forest…dor-870628f6ae0d518ac849280db6a1965e.js:13829:19)”, description: undefined, fileName: undefined, lineNumber: undefined, …}
description: undefined
errors: Array(1)
0:
detail: “[Thu Jul 16 2020 23:02:16 GMT+0000 (Coordinated Universal Time)] Unexpected Error”
status: 500
proto: Object
: (…)
firstObject: (…)
hasArrayObservers: (…)
lastObject: (…)
length: 1
proto: Array(0)
fileName: undefined
isAdapterError: true
lineNumber: undefined
message: “Ember Data Request PATCH https://api.forestadmin.com/api/layout returned a 500↵Payload (application/json; charset=utf-8)↵[object Object]”
name: “Error”
number: undefined
stack: "Error: Ember Data Request PATCH https://api.forestadmin.com/api/layout returned a 500↵Payload (application/json; charset=utf-8)↵[object Object]↵ at r (https://app.forestadmin.com/assets/vendor-870628f6ae0d518ac849280db6a1965e.js:13745:19)↵%E2%86%B5) at


proto: Error

Context

The same manipulation works in stagging but not in production (they have the same codebase)

Hello @Benjamin_Marquis,

Thank you for sharing this with us.
We are investigating the issue.

Could you please add the content of the http request made by your action here?

Hi, thanks for the help so this is one of the payload failing exemple:

0: {path: "/collections/c130fa40-9a38-11ea-996f-51473970f120/displayFieldName", op: "replace",…}
op: "replace"
path: "/collections/c130fa40-9a38-11ea-996f-51473970f120/displayFieldName"
value: "nameEn"

the error been

{"errors":[{"status":500,"detail":"[Fri Jul 17 2020 15:27:55 GMT+0000 (Coordinated Universal Time)] Unexpected Error"}]}

Hello @anon79585656, any news ?

Hi @Benjamin_Marquis,

Sorry for the delay, the problem you encounter is really tough to reproduce. We are still trying though!

Did the problem appear suddenly?
I have the feeling you updated your models just before.
Do you remember what changes did you make?

Thanks for your patience!

@anon34731316 Hello thanks for the response, yes the problem appear suddently.

The very odd thing is that all the environments have the same code base and deployed on the same Kubernetes cluster.
but only the production environment is experiencing trouble with updating the layout. I am stil able to acces my data (and I can see the request in the app’s log but there is nothing appearing in the log when updating the layout so I am not sure the problem is the deployed app. ( But i am no forest admin expert, the layout options are stored in your end ? )

Hi @Benjamin_Marquis,

I’ve finally been able to reproduce your issue!

There is an issue on our end but I’ve manage to find something to potentially fix your issue for now.
From what I can see in our logs, It seems like you currently have a badly defined dashboard chart in your app. Your app should work after a delete + recreate of this chart (From the logs I’ve seen it should be the second one, but without your project name I can’t get the name of the chart)

If that not possible on your side for any reason, just let us know. We will still work on a fix but this simple manipulation should allow you to keep using your backend.

Let me know if that helps :pray:

2 Likes

Deleting one of the chart did fix the issue!

Thanks a lot for your assistance @jeffladiray & @anon79585656 & @anon34731316 !!

3 Likes

Hi @jeffladiray, sorry to be back again haha but it seems that my issue was only half fixed.
It did fix the reference by name instead of id error.
But when I wish to have a display widget by file on one of my models it fails.
(I have deleted all charts)

Hi @Benjamin_Marquis,

From what I see, this is a different type of issue. The error does not seems to call the same service (/api/layout vs /api/fields/<something that does not look like a guid to me>).
Still, I’m currently digging throught your new issue, but wouldn’t you mind opening a new thread for that one?

Thanks in advance :pray: