Error: This Extension cannot be published as it has the same Publisher, Name, and Version...
I have a recently created Docker container with image mcr.microsoft.com/businesscentral/sandbox:pt and i'm developing a new Extension in VS Code. No other extensions exist and a first deploy of the extension is successful.
However, after 3 or 4 publish operations it stops working and i get this error:
This Extension cannot be published as it has the same Publisher, Name, and Version as a previously published Extension.
I've tried everything from creating a new container to creating a new extension from scratch, changing the publisher and extension name and nothing worked, and if it works it stops working, again, after a few publish operations. I have no dependencies and i can't even unpublish the extension because it doesn't show up on the Extension Management page, nor does running UnpublishApp on Powershell work either.
Any ideas? Because i'm clueless.
Edit: Changing the version on app.json does nothing on its own and it doesn't seem to matter what schemaUpdateMode i use.
Routing to our AL repo, as this isn't application related. Hope they can help you!
Thanks @sonicadv27 for posting this issue. Can you post your AL language version (VS Code extension version) and your BC version?
My AL version is 2.1.69331 and i've tried with containers running images mcr.microsoft.com/businesscentral/sandbox:pt (which is runtime 2.2) and microsoft/bcsandbox:base (which is runtime 1.0, i believe)
Hi again @sonicadv27, I need your BC version. Open the web client, search for "System Information", and then post your version. It should look something like: "US Dynamics NAV 13.1 (26534)" for example.
The latest image i tried this with had BC version W1 13.0 (24844).
Open the Powershell of the container. Use command "Get-NAVAppInfo" to verify all the extensions in your container and uninstall any if you find anything.
When i run the Get-NAVContainerAppInfo only Microsoft extensions get returned. But i still can't publish my extension.
I have the same issue on the OnPrem version. It is solved by deleting the record in the Nav App table in SQL. Don't know if you can access sql on your docker but hope it helps.
I did that but i got another error, which i would get from time to time, trying to get this to work:
"Could not install the extension [name] on tenant default due to the following error: Error code: 85132273"
Is there any additional information about this because I have a similar issue? Mine is maybe related to dependency package because I've noticed that behaviour when I was uninstalling the depended package and updating the "base" package. Sometimes happens that the process of publishing (I'm using webdeploy.exe to publish app to container on Azure VM. ) does not finish and must be interrupted. In this case, repeating the process of publishing will result in an error described here.In this case app is uninstalled / unpublished and record of that app remains in table "NAV app". To continue using updated app I have to delete record from "NAV app" table - "local" container. In Azure container I have to publish app with increased version.
"vscode extension": "al-2.1.99743"
"platform": "14.0.28496.0"
"version": "14.0.28630.0"
"bcinsider.azurecr.io/bcsandbox-master:rs-ltsc2019
=> "sha256:f7288dea8671ab3640ca3b11a3ff5ec777e78805bd4c32f5c52df576ce1d0e9f"
BR, Bojan
Ok, i've figured out a solution for this, although i'm not exactly sure as to why this is needed to resolve this issue.
Whenever you get error code 85132273, it means you got the real error right before that and you tried to publish it again.
Access the database using SQL Server Management Studio and execute the following query:
DELETE
FROM [<your_database_name>].[dbo].[NAV App Installed App]
Where Name = [<your_app_name>]
You should be able to publish it again.
@sonicadv27 seems you have unblocked yourself. We are in the process of adding more telemetry and investing heavily in making this process more robust. Please comment here if there are any more issues, but for now I will close this issue.
Ok, i've figured out a solution for this, although i'm not exactly sure as to why this is needed to resolve this issue.
Whenever you get error code 85132273, it means you got the real error right before that and you tried to publish it again.
Access the database using SQL Server Management Studio and execute the following query:
DELETE FROM [<your_database_name>].[dbo].[NAV App Installed App] Where Name = [<your_app_name>]You should be able to publish it again.
I have the same error "Error code: 85132273" in a cloud sandbox when i try to publish an app. How can i solve this in a cloud instance?
@JohnnyUndercover ensure you don't have any extensions installed or published in your extension management page that can conflict with the one you are publishing. If you still experience issues reach out to our support. Thanks
We are still seeing this error. It may be due to the fact that in our dev environment with the same (now multi) tenant we were publishing Extensions of Scope 'Dev' and now are using 'Global'. Below is our temporary workaround (OnPrem BC18.5):
Write-Host -ForegroundColor Cyan "Publishing '$AppName' on instance '$ServerInstance', Scope 'Global': $AppPath"
Try {
Publish-NAVApp -Force -SkipVerification -Scope Global -ServerInstance $ServerInstance -Path $AppPath
} Catch {
if ($_.Exception.Message -eq 'This Extension cannot be published as it has the same Publisher, Name, and Version as a previously published Extension.') {
$SQLString = "DELETE FROM [dbo].[Published Application] WHERE [Name] = '$AppName'"
$null = Invoke-Sqlcmd -Username $UserName -Password $Password -Query $SQLString -ServerInstance $DatabaseServer -Database $DatabaseName
Write-Host -ForegroundColor Magenta "Warning: Publishing (second attempt) '$AppName' on instance '$ServerInstance', Scope 'Global': $AppPath"
Publish-NAVApp -Force -SkipVerification -Scope Global -ServerInstance $ServerInstance -Path $AppPath -ErrorAction Stop
} else {
# Re-Throw error
throw $_.Exception
}
}