[ID-4265726]Error during shutdown UXP plugin (InDesign 20.4.1)
If you try to access indesign.app when shutting down a plugin, an error is thrown and causes InDesign to freeze. Specifically, in the lifecycle hook »hide« and »destroy«.
The error occurred with version 20.4.1
Exception: Error: Shutting down in progress, can't process! at Object.cleanup (/Users/<username>/Desktop/UXP-Panel-Dummy/pkg/panel/hide.js:26:24) at ./main.js:58:31 at new Promise (<anonymous>) at e.exports.hide (./main.js:57:16) at e.exports.destroyPanel (uxp://uxp-internal/pluginmanagerscripts.js:2:38052)
app: Application {conditionalTextPreferences: undefined}
docCount: <unreadable>
this: Object
A dummy plugin can be downloaded here:
https://kdrive.infomaniak.com/app/share/1606376/3efc4813-cd2e-40a1-9844-193d31807628
How to reproduce the error:
1: Load plugin in UDT
2. Unload plugin in UDT
Here is a report from another user: https://forums.creativeclouddeveloper.com/t/indesign-20-4-1-issue-with-the-destroy-lifecycle-hook/11133

Hi,
Thank you for reporting the issue. We have been able to reproduce the issue and it is currently under investigation.
—
Adobe InDesign Team
-
Roland Dreger commented
The same behavior occurs when you uninstall the plugin via the Creative Cloud app. InDesign froze and you can no longer close the app.
A video is attached. You can't see the spinning beach ball in the video, but it spins continuously.
In the link above you can download a sample plugin that shows this behavior. You can neither attach a ZIP file nor a ccx file here. How can I send you the plugin file?
-
Naina Bhandari commented
Thank you for reporting this issue.
Could you please confirm whether the freezing occurs when the user disable the plugin from the Creative Cloud App?
If the issue also happens with a UDT as well, please provide the plugin that includes the manifest.json file and video illustrating the issue.
Thanks,
Naina
(Adobe Team)