Cannot access environment after layout copy

Expected behavior

Development environment is accessible after layout is copied to remote environment.

Actual behavior

Development environment is throwing error after layout has been copied from it to one of the remote environments.

Failure Logs

VM20:1 PATCH https://api.forestadmin.com/api/layout 422 (Unprocessable Entity)

Context

  • Project Name: Leadtime App

Hi @Vasilii and welcome in our community :wave:!

So let me rephrase it to make sure I understand you.
You copied your layout from Development to a Remote environment.
And since you can’t access your Development environment, right ?

Could you also share what is sent /api/layout and the response that goes with it :pray: ?

Hi, @vince! Thanks)

Yes, you are absolutely correct.

Here’s the payload:

[{"path":"/collections/customers/layout/actions/customers-Import@@@customer@@@own@@@leads/restrictedTo","op":"replace","value":{"users":[],"roles":[]}},{"path":"/collections/customers/layout/actions/customers-Import@@@customer@@@own@@@leads/approvedBy","op":"replace","value":{"users":[],"roles":[]}},{"path":"/collections/customers/layout/actions/customers-Import@@@customer@@@own@@@leads/users","op":"remove"},{"path":"/collections/customers/layout/actions/customers-Import@@@customer@@@own@@@leads/approvers","op":"remove"},{"path":"/collections/campaign/layout/actions/campaign-Finish@@@campaign/restrictedTo","op":"replace","value":{"users":[],"roles":[]}},{"path":"/collections/campaign/layout/actions/campaign-Finish@@@campaign/approvedBy","op":"replace","value":{"users":[],"roles":[]}},{"path":"/collections/campaign/layout/actions/campaign-Finish@@@campaign/users","op":"remove"},{"path":"/collections/campaign/layout/actions/campaign-Finish@@@campaign/approvers","op":"remove"},{"path":"/collections/sales_process/layout/actions/sales_process-Terminate@@@processes/restrictedTo","op":"replace","value":{"users":[],"roles":[]}},{"path":"/collections/sales_process/layout/actions/sales_process-Terminate@@@processes/approvedBy","op":"replace","value":{"users":[],"roles":[]}},{"path":"/collections/sales_process/layout/actions/sales_process-Terminate@@@processes/users","op":"remove"},{"path":"/collections/sales_process/layout/actions/sales_process-Terminate@@@processes/approvers","op":"remove"}]

Here’s the response:

{"errors":[{"status":422,"detail":"Can't apply a change on layout 70036: /collections,3,layout,actions does not contain key customers-Import@@@customer@@@own@@@leads","meta":{}}]}

Hmm strange, did you rename your actions ? Import customer own leads to Import customer's own leads ?
I refreshed your cache it should I think fix your issue. Tell me if that works

Indeed we did rename the action.

Unfortunately, I still get the same error on /api/layout.

payload

[{"path":"/collections/customers/layout/actions/customers-Import@@@customer@@@own@@@leads/restrictedTo","op":"replace","value":{"users":[],"roles":[]}},{"path":"/collections/customers/layout/actions/customers-Import@@@customer@@@own@@@leads/approvedBy","op":"replace","value":{"users":[],"roles":[]}},{"path":"/collections/customers/layout/actions/customers-Import@@@customer@@@own@@@leads/users","op":"remove"},{"path":"/collections/customers/layout/actions/customers-Import@@@customer@@@own@@@leads/approvers","op":"remove"},{"path":"/collections/campaign/layout/actions/campaign-Finish@@@campaign/restrictedTo","op":"replace","value":{"users":[],"roles":[]}},{"path":"/collections/campaign/layout/actions/campaign-Finish@@@campaign/approvedBy","op":"replace","value":{"users":[],"roles":[]}},{"path":"/collections/campaign/layout/actions/campaign-Finish@@@campaign/users","op":"remove"},{"path":"/collections/campaign/layout/actions/campaign-Finish@@@campaign/approvers","op":"remove"},{"path":"/collections/sales_process/layout/actions/sales_process-Terminate@@@processes/restrictedTo","op":"replace","value":{"users":[],"roles":[]}},{"path":"/collections/sales_process/layout/actions/sales_process-Terminate@@@processes/approvedBy","op":"replace","value":{"users":[],"roles":[]}},{"path":"/collections/sales_process/layout/actions/sales_process-Terminate@@@processes/users","op":"remove"},{"path":"/collections/sales_process/layout/actions/sales_process-Terminate@@@processes/approvers","op":"remove"}]

response

{"errors":[{"status":422,"detail":"Can't apply a change on layout 70036: /collections,3,layout,actions does not contain key customers-Import@@@customer@@@own@@@leads","meta":{}}]}

Okey can you try to remove the special character “” from your action name :thinking: ? Does it work like that ?

I’m not sure, that “’” is the core issue. As on other environments apostrophe doesn’t bring any disturbances.

I’ve tried changing name in smart action definition (removing special character), but it doesn’t affect neither payload, nor response of /api/layout :man_shrugging:

It really looks like a cache issue, I do have the right values on my side :thinking:. Could you hard refresh your page :thinking: ?
It’s on Development and team Operation right ?

Everything’s correct: it’s on Development and Operations is team.

Ever since you mentioned cache, I’ve been using hard reload.

Maybe the second error in console is the one to blame?

Error while processing route: rendering.index The adapter rejected the commit because it was invalid Error: The adapter rejected the commit because it was invalid
    at r (http://app.forestadmin.com/assets/vendor-c0cf12c33394e8b0175ed60967f4b83c.js:13745:19)
    at new r (http://app.forestadmin.com/assets/vendor-c0cf12c33394e8b0175ed60967f4b83c.js:13749:54)
    at p.handleResponse (http://app.forestadmin.com/assets/vendor-c0cf12c33394e8b0175ed60967f4b83c.js:13813:33)
    at p.handleResponse (http://app.forestadmin.com/assets/vendor-c0cf12c33394e8b0175ed60967f4b83c.js:16831:171)
    at p.r (http://app.forestadmin.com/assets/vendor-c0cf12c33394e8b0175ed60967f4b83c.js:3462:9)
    at p.handleResponse (http://app.forestadmin.com/assets/client-bb12436b792bd854c3b9aba59853b240.js:162:314)
    at p.r [as handleResponse] (http://app.forestadmin.com/assets/vendor-c0cf12c33394e8b0175ed60967f4b83c.js:3462:9)
    at s (http://app.forestadmin.com/assets/vendor-c0cf12c33394e8b0175ed60967f4b83c.js:13786:14)
    at http://app.forestadmin.com/assets/vendor-c0cf12c33394e8b0175ed60967f4b83c.js:13829:8
    at p.Ember.RSVP.Promise.h.error (http://app.forestadmin.com/assets/vendor-c0cf12c33394e8b0175ed60967f4b83c.js:13829:19)

We are actually working on it ! We’ll keep you in touch :wink:
The ticket is here:

2 Likes

Great news, thanks, Vince!

@Vasilii it should be good by now!
Can you please try again and let us know if everything is working fine?

Thanks!

Yeap, Dev environment is back to running.
Thanks for help! :handshake:

2 Likes