Import/export from json

I used to export an app as a json file on my dev environment and then import json on production environment, which works well.

However, now this flow is not working, because resource uuid is not same. It still works if I create a new app from scratch, but update an existing app from json doesn't work any more.

1 Like

Hi there! I'm glad the export import flow is working.

Resources will need to exist in both environments with exactly the same name for them to connect to imported apps.

And as a quick, general note, this doesn't work well if you import from inside an app, so definitely try to import from the home page instead!


1 Like

Hi @victoria ,

this issue could be linked to this one where apps are linked with resource IDs and not name.

Ah, it certainly could be!

I took a look at that thread and dug around our old conversations to see if I could find any additional context, and found this solution that was discussed with the user (not sure how relevant it is to your specific setup, however):

The solution there was to make a trivial change to the affected apps in dev on a new branch, merge into the main branch, and let Protected App sync propagate the changes to the higher environments.

The reason being is that we made a change a while ago to resource references and making an edit on these applications will trigger the migrations needed for the resources to be referenced correctly. You should be able to see a resourceName field being added to the query inside of the git diff view after making the change in dev.

Are you able to give this a shot and see if it fixed your resource references? If not, happy to take a closer look and determine what might be causing this issue.

Here are also a few links to relevant docs:

Let me know how it all goes or if you have any other questions!

Thanks for your comment, I've been able to figure it out as stated in my answer on this post

That is super good to know, thank you for sharing in both this thread and the other! I, and other users running into a similar issue, truly appreciate you taking the time! 🙏