I created a CEP extension for Illustrator and signed and zxp file as it worked fine in debug mode. I disabled debug mode, installed zxp and checked the operation again. This does not work.
I had the impression that the process in hostscript.jsx was not being executed, so I added an alert statement in hostscript.jsx in the installed extension and watched the behavior. This time it worked fine.
I then removed the alert statement and saved it. In other words, I reverted to the syntax before the change. It still works fine.
I am confused by the title (not working) and the end of your post where you say that after the alert removal, it's working fine. In the case, where suddenly everything works, I can't tell but if you are still in trouble (not working without alert), let us know.