Navigate to design view of a template in the web editor
What I’ve tried and what’s not working:
On a page I have inserted a custom component that makes a server call in the custom component’s form_show. It seems that the call to that server function is throwing an error in the designer only (running in debug works fine).
Bug:
Designer output: anvil.server.SessionExpiredError: Session expired <running on the server>
The culprit client code in the custom component is here:
def form_show(self, **event_args):
"""This method is called when the form is shown on the page"""
with anvil.server.no_loading_indicator:
self.data_table = anvil.server.call('get_data_view')
the designer loads fine when commenting that particular server call. It’s not the only server call I have in show methods but is the only one causing the issue.
I should also mention, the designer view of the custom component itself loads fine. The error only appears when inserting the component in another page. The page in which the component is inserted has no client code beyond instantiation.
You typically don’t want that code to run in the IDE, at Design time. For a way to prevent that code from running, at this wrong time, see the “as-yet-undocumented but useful feature” here: