AL icon indicating copy to clipboard operation
AL copied to clipboard

The extension could not be deployed because it is already deployed on another tenant

Open Luca-Costamagna-EOS opened this issue 8 years ago • 14 comments

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?

Luca-Costamagna-EOS avatar Nov 23 '18 16:11 Luca-Costamagna-EOS

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.

StanislawStempin avatar Nov 26 '18 10:11 StanislawStempin

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).

GreatScott000 avatar Nov 30 '18 10:11 GreatScott000

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.

atoader avatar Dec 11 '18 16:12 atoader

@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.

atoader avatar Dec 19 '18 06:12 atoader

Thank you @atoader. Do you think anything will change about the deployment system?

Luca-Costamagna-EOS avatar Dec 19 '18 07:12 Luca-Costamagna-EOS

Yes, we are working on improving this, but I cannot provide a timeline for when improvements will roll out.

atoader avatar Dec 19 '18 09:12 atoader

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?

kylehardin6 avatar May 15 '19 18:05 kylehardin6

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 :(

NAVFreak avatar May 28 '19 15:05 NAVFreak

Hi, it's happening to me too. Have you take a look on this?

Thanks

jbakach avatar Jun 05 '19 08:06 jbakach

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.

freddydk avatar Jun 06 '19 21:06 freddydk

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.

sonicadv27 avatar Jun 14 '19 10:06 sonicadv27

@freddydk I wonder how can I publish to the dev endpoint without the NavContainerHelper?

papillon avatar Jun 21 '19 17:06 papillon

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.

kylehardin6 avatar Jun 24 '19 12:06 kylehardin6

after years, this problem appears again...even on version 16.0.13440.13772

albgen avatar Sep 30 '20 15:09 albgen