Edit an app which contains a module with a published (i.e. Live) version and have both the Edit mode and View/Preview mode reference it properly.
Steps:
Have a module with a published Live release.
Delete one or more resource queries (they may need to be of the auto-run variety)
Create a draft release but don't publish it.
Reload the parent app in Edit mode, and note error messages for the deleted queries.
Details:
From my experience, the parent app is supposed to reference only the Live version of the module, if one is published, regardless of being in Edit mode or View mode. In my case, View mode works just fine, with no module query errors. Edit mode and View mode appear to be behaving differently.
Strangely, the components of the Live version are the ones the parent app is using — in my example, my unpublished module draft releases contain changes to, say, input labels, that correctly show as they exist in the Live version. So it seems like there are some hanging references to just the query resources.
This began maybe 3–4 weeks ago for us, and confirmed by another Retooler on my team independently.
I remember reading Retool documentation on how parent apps use the Live version of a module, if one is published; if no release is published, it should use the latest working version. Lightly scouring the docs page and forums, I cannot find any such mention of this scheme, including in the official Module docs.
Screenshots:
Missing module query errors on load of parent app:
The missing queries above are still present in Live version (v0.12.3 ); they were only removed across the two releases highlighted in orange. It appears that, only in Edit mode, the resources of module version v0.14.2 are attempting to be referenced.
The module's release history:
If I have time I can try to setup a lightweight example and include exports, but at the moment I'm tight on time. Just wanted to get this on the books in case others began encountering it, or if I'm misinterpreting how things should work.
The behavior you're experiencing could be related to how Retool handles references to modules within parent apps. Here’s a step-by-step approach to resolve and clarify the issue:
Live Version Behavior: When a module has a published "Live" version, the parent app should always reference the Live version during both View and Edit modes.
Draft Version Behavior: If no Live version exists, the parent app defaults to referencing the latest saved (Draft) version of the module.
Query Behavior in Edit Mode: Errors in Edit mode could occur due to a mismatch between deleted resources in the Draft version of the module and how Retool validates these resources in Edit mode.
2. Steps to Verify the Issue
Confirm that the Live version of the module does not contain references to the deleted queries.
Ensure the parent app is explicitly using the Live version of the module (not Draft).
Test whether duplicating the module and re-linking it to the parent app resolves the issue.
3. Recommended Fix
Re-publish the Module: Publish the current working version of the module (with deleted queries removed). This ensures consistency in both View and Edit modes.
Re-link the Module: In the parent app, re-add the module to reset references.
Check for Stale References: Verify the parent app's query list for any legacy references to the deleted queries. Remove or replace them as needed.
4. Best Practices to Prevent Future Issues
Always publish the module after significant changes to ensure the Live version reflects the intended state.
Use naming conventions or version control for modules to track changes easily.
Regularly test modules in both View and Edit modes before publishing changes to the parent app.
Live Version Behavior: When a module has a published "Live" version, the parent app should always reference the Live version during both View and Edit modes.
^ Yes, that is precisely what I'm saying is not happening in my example, whereas it previously used to work this way.
Confirm that the Live version of the module does not contain references to the deleted queries.
^ The Live version does have references to the later-deleted resources, as well as the resources themselves— this is how releases work: subsequent releases add, remove, and modify components and resources. The Live version has all the resources, components, and code needed to work, which is why it's published. And why it works as expected in the parent app's View mode.
If any given Live version of any app had to only use resources that would be available forever in perpetuity it'd be a whole different paradigm and basically nothing in Retool would work as it does now.
(The only alternative would be to have it incumbent on Retool devs to never have unpublished draft releases with differing resources, which would be a severe limitation.)
Re-link the Module: In the parent app, re-add the module to reset references.
^ At best this would be a bandaid and wouldn't fix the underlying issue.
You have also check documentation once
I've read that and the module documentation I linked, neither of which mention the behavior you're alluding to, though the docs should. Can you let me know where you found those references?
Your post reads to me as an AI collation, and it'd be great to know how it was compiled and what docs it is referencing. @WidleStudioLLP was your response compiled by AI? If so, which model and at what time? I appreciate that it's somewhat clarifying the problem, but it's not offering any steps to resolution, aside from the "reset everything" suggestion about re-linking.
This is the only thing that sticks out to me in Retool's changelog.
And while it's a bit further back (2 months) than when I first began noticing the issue (~1 month ago, I think for a different app + module combo of ours), it could have easily passed unnoticed by us because the module in question here didn't have draft (i.e. unpublished) releases with removed queries until Jan 14 '25.
Not conclusive, but maybe a clue for Retool support
Delete the query entirely. Change the text component's text to give us some idea of the version we expect to be looking at in the parent app. Release this now as a draft—do not publish it.
Go into Edit mode of the parent app. Note the query reference error (bad), but also that the text component properly has the Live version's text!
(Double whammy of what the heck because Edit mode seems to be mixing the Live version module's components yet using the unpublished (draft) release's resource manifest!)
I consider this is a rather bad regression on Retool's end—this was not always a problem. It effectively makes it confusing if not unworkable to edit parent apps which contain modules with newer draft releases than the Live, published release.
Thanks for reaching out, and than you for those repro steps. This does seem like a bug, though it seems longstanding as I can reproduce this behavior going back to our 3.33 stable release. I've logged this internally and we'll post back here when it's been resolved!