Hello,
I have self-hosted Retool installation 3.75.11-stable.
I have retool app with multiple releases. When trying to revert to previously released version of the app I'm an getting error:
"Error retrieving page".
App is not reverted and stays on the same page. How can I troubleshoot the issue?
{"endpoint":{"criticalityTier":"tier1","path":"/api/pages/lookupPageByUuid","service":"backend","team":"@tryretool/building-ui-platform"},"error":{"level":"warn","msg":"Page with uuid "d4298921-a680-4b90-b9e5-e18ce25bea8d" not found","stack":"Error: Page with uuid "d4298921-a680-4b90-b9e5-e18ce25bea8d" not found\n at qke (/retool_backend/bundle/main.js:5829:5145)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async bDt (/retool_backend/bundle/main.js:6154:205143)\n at async /retool_backend/bundle/main.js:6154:204684","type":"CAUGHT_ERROR"},"level":"info","message":{"http":{"method":"GET","request":{"time":0.011855616999790073},"status_code":404,"url_base":"https://XXXXXXXXX","url_path":"/lookupPageByUuid?pageUuid=d4298921-a680-4b90-b9e5-e18ce25bea8d&showLatest=false&mode=view&isPageWithinEmbeddedPage=false"},"type":"REQUEST_FINISH"},"organization":{"id":1,"name":"XXXXXXXXXXXX"},"pid":72,"requestId":"c41fff55-cadf-4eff-8fd7-13d5f6948321","retoolClientVersion":"3.75.11","timestamp":"2024-11-07T00:34:24.778Z","user":{"email":"XXXXXXXXXXX","sid":"user_bdb9954365437645726543434"}}
I'm seeing this error even with new releases I'm creating in the app.
Even if I create release and immediately try to revert to it - that fails with error message:
Page with uuid "d4298921-a680-4b90-b9e5-e18ce25bea8d" not found
I've tried to compare the version as you suggested - no modules have been deleted.
Same time the "preview" version works fine by adding ?_releaseVersion=0.1.4 to the url.
What would be the next step to troubleshoot the issue?
More context:
This app has been migrated from cloud version to self-hosted. Could that be that id of the app has changed during migration, but DB still referring it by old ID?
Do you have access to query the database that powers your Retool instance? It might be helpful to query the pages table (select * from pages where uuid='d4298921-a680-4b90-b9e5-e18ce25bea8d') to see what app it is trying to reference.
I've ran the query you provided - there is a module with this ID, I found this module in the interface and it has different ID. How do I update reference to correct one for the app?
the results of the query:
id | 2
name | address_input
createdAt | 2024-10-01 00:55:35.127+00
updatedAt | 2024-10-08 22:43:39.627+00
organizationId | 1
folderId | 2
uuid | d4298921-a680-4b90-b9e5-e18ce25bea8d
releasedTagId |
photoUrl |
deletedAt | 2024-10-15 00:01:39.506+00
lastEditedBy |
isGlobalWidget | t
protected | f
synced | f
clonedFromTemplateName |
isMobileApp |
tempReleasedTagId |
blueprintMetadata |
isFormApp | f
shortlink |
sourceControlUuid |
guidedTourUserId |
Here is correct module:
id | 9
name | address_input
createdAt | 2024-10-09 23:44:55.855+00
updatedAt | 2024-10-22 02:00:08.827+00
organizationId | 1
folderId | 6
uuid | 3cfee704-4ddc-11ee-a0af-9f5e1715c193
releasedTagId |
photoUrl |
deletedAt |
lastEditedBy | 1
isGlobalWidget | t
protected | f
synced | f
clonedFromTemplateName |
isMobileApp | f
tempReleasedTagId |
blueprintMetadata |
isFormApp | f
shortlink |
sourceControlUuid |
guidedTourUserId |
One potential workaround I can think of here is to run a few more database queries to track down the app state of the release you're looking to revert to.
Releases are stored in the 'tags' table which you can filter by pageId found from the 'pages' table.
SELECT t.* FROM tags t LEFT JOIN pages p ON t."pageId" = p.Id WHERE p.name = 'pageName'
From here, you can then find the pageSaveId for the release tag you are looking for. This can then be found in the page_saves table by filtering on ID for the located pageSaveId. From here, you could take the data from the page_saves table and manipulate this to an importable state. Wrap the data from the table like so: {"page": {"data":{ DATA FROM TABLE }}} and download it as a JSON file. Once you've downloaded the file, you can swap out the module id.
The json file, which could then be imported back into Retool, should have this structure: {"page":{"data":{"appState": ...}}}
To clarify, this would be imported back to Retool as any other json file. It couldn't be imported with the original release tag.
Thank you Tess.
As I mentioned even new releases are not "revertable", that means even if I create release right now - I cannot revert back to it immediately with the same error message. How can I fix the app so new releases are created “revertable”? In other words how do I fix this incorrect module reference in the app?