AL icon indicating copy to clipboard operation
AL copied to clipboard

Can't publish to Business Central

Open Dreckiger-Dan opened this issue 8 years ago • 9 comments

We recently switched from developing on a local Nav18 server to developing on Business Central. When I try to publish the app to the sandbox I get the following error: [2018-09-05 12:49:59.05] The request for path /v1.0/sandbox/dev/apps?SchemaUpdateMode=synchronize failed with code 422. Reason: This Extension cannot be published as it has the same Publisher, Name, and Version as a previously published Extension.

The error also shows up after resetting the sandbox.

  • AL Extension Version: 0.16.19969
  • Server Version: DE Dynamics NAV 12.3 (23918)

launch.json:

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "al",
            "request": "launch",
            "name": "Microsoft cloud sandbox",
            "startupObjectId": 22,
            "startupObjectType": "Page"
        }
    ]
}

Dreckiger-Dan avatar Sep 05 '18 12:09 Dreckiger-Dan

Unpublish your app from Business central search for "Extensions", and unpublish your app.

Publish your app again.

ashik-ivor avatar Sep 05 '18 13:09 ashik-ivor

The app is not listed in the extension menu.

Dreckiger-Dan avatar Sep 05 '18 13:09 Dreckiger-Dan

Increase the version in the app.json file

ashik-ivor avatar Sep 05 '18 13:09 ashik-ivor

Increasing the Z value of the version by one resulted in the following error: [2018-09-05 15:12:44.66] The request for path /v1.0/sandbox/dev/apps?SchemaUpdateMode=synchronize failed with code 422. Reason: Mehrere veröffentlichte Erweiterungen passen zu den angegebenen Parameterwerten. Sie müssen weitere Informationen zur verwendeten Erweiterung angeben.

Dreckiger-Dan avatar Sep 05 '18 13:09 Dreckiger-Dan

Try to Unpublish it with PowerShell.

dNsl9r avatar Sep 05 '18 13:09 dNsl9r

I can't use PowerShell since I'm using the SaaS sandbox hosted by Microsoft.

Dreckiger-Dan avatar Sep 05 '18 13:09 Dreckiger-Dan

  1. Clear the cache from your VS Code

AL:Clear credentials cache

  1. add this "schemaUpdateMode": "Recreate" in the launch.json.

Note: Recreate will delete your data from the table.

ashik-ivor avatar Sep 06 '18 10:09 ashik-ivor

This didn't help either. I get the same message as in my first post.

Dreckiger-Dan avatar Sep 06 '18 11:09 Dreckiger-Dan

What that error means is that another tenant on the application service that hosts your sandbox tenant has an extension published that has the same name, publisher, and version as the extension you are attempting to publish. Extensions are identified by their name/publisher/version combination so we cannot allow multiples as it would prevent us from being able to uniquely identifying an extension. In addition, the publish process used by VSCode uses the AppID to remove an existing instance of the extension (if one exists) so in sandbox tenants that needs to be unique as well.

We recognize that these limitations are problematic for many development scenarios, so this has been addressed for the next release.

The best way for you to work around this error today is to change the Name and AppID of the extension that you are publishing. This is temporary and will no longer be necessary after the next release.

RobAnderson42 avatar Sep 06 '18 20:09 RobAnderson42