Form editor doesnt work and app wont load (only for a group of apps that share tables and dependencies)

We were copying our production data to our development apps. To do this we cloned our production API app, then updated data to remove PII, then removed the datatables from our development apps then linked the clone API app’s datatables to the development apps. Some development apps had their own tables that werent in the clone API app datatables, so we had to relink some linked rows to the clone datatables.

Now when we are trying to run the apps in the IDE, about 9/10 times nothing happens except an endless spinner without throwing any errors. The forms wont even load in the form editor. Strange enough, every so often it loads and works fine.

Has anyone else experienced this before and know a solution?

I experienced something like this yesterday. One of my components triggered the spinner in its form_show() handler, and also using a timer. That wasn’t always enough to run the spinner continuously, but once it did run continuously, there was no going further.

I figured it was my screw-up, and so changed my code to prevent the spinner from appearing. See https://anvil.works/docs/server#suppressing-the-spinner

I’m not sure it really fixed my underlying problem, but it did get rid of the spinner.

thanks for the response. i dont think it’s a spin loader issue. I think the problem is something with the app not knowing where to get its own forms from. The code on the forms is visible and editable, but the editor doesnt work.

In the absence of a debugger, with breakpoints et al, I usually insert print() calls (with unique outputs) so I can work out the sequence of events.

If it’s not even reaching line 1 of your startup form or module, even that information is useful. It is information you can give to the Anvil techs.

good idea. this print doesn’t even run on the startup form.


The 1/10 times that it happens to load, it points to a syntax error on a blank line of code. This is what makes me think it is having a hard time finding it’s own forms.

Try to put the print after the import.
Perhaps anvil redefines print so it can do its magic of printing in white/yellow background when it comes from the client/server side.

Hi @joinlook,

Just a suspicion, but did you mess with any of the YAML files during the move? If you’ve introduced a syntax error into one of the YAML files, Anvil can’t safely load the app to fix it, so you’ll have to fix it via Git.

I can second that, having done it a few times by mistake!

no i didnt do anything with the YAML file itself. what should i look for in there? Maybe something in yaml got messed up when i was linking the columns that were previously linked to tables that were removed?

Hmm. Can you PM me a link to the app? (Not the clone link, the link from the Publish dialog)

Thanks @joinlook for PMing me a link to reproduce.

It turns out that this issue was caused by a third-party JS library he had included in his Native Libraries, which was corrupting the Javascript environment.