When using APM JavaScript extension UI to add or edit JavaScript extensions by using Choose File option to select a local file to be uploaded, after file has been chosen but before Upload (for new extension) or Save (for existing extension) is clicked, the selected code is displayed with some syntax errors noted:
However, if Choose File is clicked again to selected updated copy of same file, the updated code is not displayed.
Above example (MinimalExtension.js) which contains a single typo (closing round bracket on line 28 which should have been closing curly bracket).
Once selected, the above x messages are displayed, however after fixing line 28, and again using Choose File, the fixed code is NOT displayed.
Also - even though errors are noted in the UI, the Upload or Save button remains active and if clicked will then re-display the dialog with an appropriate error message. The Select File button allows fixed code to again be selected but again the updated code is not displayed.
DX APM SaaS
DX APM onpremise 2x
The problem is related to defect DE604266. Analysis by Development:
"The upload event is not causing the editor window to reload the content. Whether the a new file or modified file with same name the functionality is same. So we need to make the editor window to reload whenever the upload event trigger."
To be fixed in a future 24.x release, for an update contact Broadcom Support.
Workaround:
The only way to upload/save the "updated code" is to click Cancel and repeat the Create New Extension or Edit process.