microsoft / navcontainerhelper

Official Microsoft repository for BcContainerHelper, a PowerShell module, which makes it easier to work with Business Central Containers on Docker.
MIT License
379 stars 243 forks source link

Error in CI - Publish/Sign-App: "application" instead of Dependencies #996

Closed aptMattKoe closed 4 years ago

aptMattKoe commented 4 years ago

Describe the issue After some changes for other processes there appears an error in the build: image

But the signing step was successfull: image

Additional context I have also have the reason (like in the title announced). I have changed the manuall dependencies to the "application" property: From: image

To: image

Docs to that: image https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-json-files

After step back to manual dependecies all works fine again.

Could you reproduce that? Or did I get something wrong?

Kind regards, Matthias

freddydk commented 4 years ago

My app.json looks like this

https://dev.azure.com/businesscentralapps/_git/BingMaps?path=%2Fapp%2Fapp.json

and works fine - not sure what could be the cause of this.

aptMattKoe commented 4 years ago

mh, I'll try that in another project later! I could reproduce it in that one. I've more than this dependency. Could it be that?

freddydk commented 4 years ago

That is very normal - I think the not-normal thing is to have none. I will wait to see if other people have experienced the same.

freddydk commented 4 years ago

Did you resolve the issue?

aptMattKoe commented 4 years ago

Currently I could not check another repo :/ sorry. I will do this this week! :)

aptMattKoe commented 4 years ago

I wanted to do it this week. But the week was a bit stressful so I couldn't test it. Sorry for that. I think it will be a problem with my repo :/ If you want, I could close it.

rvanbekkum commented 4 years ago

This was an issue with the "application" property: if your app uses the "application" property, then BC will complain about the app not being signed even though it is. This bug is present in the 16.0 version of Business Central and is resolved with 16.1 and up.

See also this yammer topic for further info: https://www.yammer.com/dynamicsnavdev/threads/598313698058240

I noticed that for some apps there was no issue during the publish step, but for others there was. The difference appeared to be the use of the "application" property instead of a "dependencies" property to declare the dependencies on the "Base Application" and "System Application".

As soon as you change your app.json file to use the "application" property instead of the "dependencies" property (like seen in the attached screenshot), you will run into the issue (N.B., BC will say your app is not signed even though it is).

You can easily reproduce this with a Hello World app: just change your app.json to use the "application" property and set "dependencies" to [].

aptMattKoe commented 4 years ago

wow, thanks for your help! :) good to know!