It works with the linux subsystem for Windows. I had to change my docker.
I have found 2 issues:
Don’t trust the GetApps if you are an admin user or admin client, because of performance reasons there are some cases where I do not show all the apps (imaging I would have to provide all the apps for the cloud).
You can fix it for now by making a fix in the DB. If you to the collection States_Index_AppsByUser you will see an entry for your app client (“admin”) which has an ID to the old app, but not to the new one. It is a bug that the old is still there but it does not really matter. If you replace it with the id of the new app your script should work.
BUT: I have no idea what it has to do with the cache.
Thanks for your analysis, that sounds interesting.
No problem. The setup container is only for local development against the Squidex Api, in order to set up the cms with the same infrastructure as online. I can use GET /app/<<myapp>> directly to check whether the specified app already exists.
Good catch!
Yes, really interesting, why does it not happen without cache?
Can you also reproduce the correlation of refreshing the Squidex UI in the Browser and the Response status in Postmen?
In my opinion, it seems to be related to the caching on the one hand and to the authentication on the other hand, because I believe you return 404 if the authentication of the request fails?! Maybe it would be interesting whether this also happens with an authenticated client.
I can confirm with dev-550 fixes the issue for the anonymous client, even with the corrupt mongo-db state.
I tested also the Archive App -> Import App workflow and did not find any problems anymore.
One last question: I still have the problem that the admin client gets 404 for the “Get an app by name” /api/app/<<myapp>> request. I already copied the id of the new (not archived) app into States_Index_AppsByUser for the admin client and restarted docker-compose. I think the problem is now, that the new App is not “created-by” the admin client and that’s why I get 404. Is this correct and can I fix this anyhow?