Thanks, @hugetim. I’m not inherently interested in having the logs for when the app is offline; I just mentioned that because the fact that nothing is showing up in the logs prevents me from debugging further. I’m mostly just interested in having the app up and running, which it currently is not (and I’m not sure why).
For anyone who is interested or encounters this themselves, I (apparently) resolved this by switching to a private link and then switching back to a custom domain and waiting for Anvil to do its thing.
Any idea how I could have prevented this from happening?
Did you link an environment to a custom url, then you unliked it, then linked it again?
If yes, then that’s the problem. Assigning a custom domain to an app is a slow process and it should never be undone. If you need to temporarily put the app offline, you can just create a form with a label that says “The app is offline” and set that form as startup form.
Thanks for helping me to debug @stefano.menci. I think that I was not clear enough about what happened. I never intended to put the app offline. Yesterday, my app just suddenly and inexplicably started getting the AppOfflineError. I had not made any changes to the code or any configuration. I tried various things including running the app in the IDE (worked fine) and accessing a different version of the app (with the same code, because the master and development branches were in sync) using a private link (also worked fine). So, at that point, my app, which had been working the day before and for which I made no changes to the code or the configuration was suddenly not working, but only for the custom domain. It was only then that I decided trying to switch it back to a private link to see if that helped, and indeed it did. And then, when I reapplied the custom domain, it started working again as expected.
This definitely feels like some kind of bug or outage on the Anvil side. I don’t see how it could have been anything that I did if all I changed was to switch to a private link and then switch back to a custom domain. I am wondering whether anyone knows what, if anything, I can do to prevent this from happening again because, as @stefano.menci noted, switching between a private link and a custom domain takes time, which would result in significant downtime for any users of the app.