The extension could not be deployed because it is already deployed on another tenant
I get this error when i try to modify an extension that has already been published: "The extension could not be deployed because it is already deployed on another tenant".
The only workaround I found is to uninstall, unpublish and sync with clean the old extension in order to publish the new one. Of course this is not a solution because it causes loss of data.
Anyone know why this error happens?
Could you provide more details about your problem? Which environment are you using (Docker, online sandbox?), which version of the server and which version of AL Langauge? Does this happen for all of your extensions or only for a specific one? What is the app.json and launch.json content and can you provide sample AL code which is sufficient to reproduce the problem.
I experience the same message if I try to publish an extension from VS Code that was published/installed using PowerShell. I have to uninstall/unpublish the app from the client (web/rtc) and then when I publish again from VS Code it works. I don't have to do a sync with clean.
The database is a default demo database (no app/tenant split) running on-premise GB Dynamics NAV 13.0 (24630). VS Code 1.29.1, AL Language 2.0.56865 (also happens with RTM version of AL Language extension VSIX on DVD).
It is not currently possible to switch between the “normal”(PowerShell) and “dev”(VSCode) contexts. Any publish outside the dev flow puts the thing either into the “normal” scope, meaning either the global scope or the tenant scope. The dev flow expects to be able to publish a thing only when it is either: • Not there • Published into my dev scope
We are considering improving this experience, but for now, try to not mix them.
@lucacostamagnaeos If you publish an extension from the command line, and then you want to publish it from VSCode, you will need to increment the version of the extension in the app.json.
Thank you @atoader. Do you think anything will change about the deployment system?
Yes, we are working on improving this, but I cannot provide a timeline for when improvements will roll out.
We are still experiencing this issue with BC14 onprem build 14.0.29530. If I publish the app using powershell, then VSC can no longer publish with the error given when this issue was opened. Is there any update as to when this problem might be fixed?
Any news on this? I did a script that automatically downloads the symbols, compiles the app and publish it in one go to speed up things. But after that I get the already mentioned scenario that I have to unpublish the app via powershell before I can compile/publish it via VS Code.
It is freakin annoying :(
Hi, it's happening to me too. Have you take a look on this?
Thanks
The reason for this is, that the PowerShell cmdlet Publish-NavApp (which is called from Publish-NavContainerApp) is publishing in "production mode". I have just published a new version of NavContainerHelper (0.6.1.2), where Publish-NavContainerApp has an additional switch:
-useDevEndpoint
Which causes the app to be published using the dev endpoint. Note, when you use the dev endpoint, the app is always installed. You can specify syncmode to clean or forcesync if you do not want the standard synchronize behavior. If you are running multi-tenancy, you must specify -Scope Tenant and -Tenant tenantname -install and -skipverification parameters are ignored when using the devendpoint.
So, update NavContainerHelper and use -useDevEndpoint - then you should be able to publish using VSCode afterwards.
What's the point of deploying using VS Code if there are such issues as this one and we can't even start the upgrade process from there when deploying to On-Prem?
It's honestly baffling how we still have to resort to Powershell to perform operations like these and they don't come with the AL language extension.
@freddydk I wonder how can I publish to the dev endpoint without the NavContainerHelper?
Clone the NavContainerHelper project in GIT and take apart the code. It's pretty complicated what he has to do to make the dev endpoint publish work. Also keep in mind that it has to run in the context of the docker container, not your host.
after years, this problem appears again...even on version 16.0.13440.13772