[Bug]: Deployments to BC online sandbox fail
AL-Go version
7.2
Describe the issue
Since a few weeks our deployments are always failing on the first run. When we re-run the failed jobs a minute later, they run successfully and the apps are installed.
An upgrade of the extension "app name" from version 100.7.344.0 to 100.7.349.0 cannot be performed by "publisher" for tenant msweua5608t86**** and company CRONUS NL due to the following error: The current permissions have prevented the action. (TableData 11260722)......** Followed by a whole bunch of objects in our object ranges.
Permissions haven't changed. Same behaviour after upgrading AL-Go to latest (7.2). It seems to have happened without an obvious change. Just from one run to another and the consistently fail on the first one and succeed on the second.
Expected behavior
Successfully published and installed apps.
Steps to reproduce
Unknown to me
Additional context (logs, screenshots, etc.)
@erikrijn can you share the logs for the workflow?
@erikrijn can you share the logs for the workflow?
Of course (sorry that it's in Dutch). It seems to be a permissions issue while running OnInstallAppPerCompany. The instance only contains 2 evaluation companies. The entra app has 'ADMINISTRATOR' and 'EXTEN. MGT. - ADMIN' permissions.
Publiceren mislukt vanwege De extensie Commerce 365 for Magento - B2B Module kan niet worden geïnstalleerd door NVision Commerce Solutions B.V. (versie 100.7.365.0) in tenant msweua5608t86209138 en bedrijf CRONUS NL vanwege de volgende fout: De huidige machtigingen hebben de actie voorkomen. (TableData 11260722 NC365 Feature Feature Read: Commerce 365 for Magento) en AL-stacktracering: "NC365 Feature Management"(CodeUnit 11260778).FeatureEnabled line 4 - Commerce 365 for Magento by NVision Commerce Solutions B.V. version 100.7.368.0 "NC365RQ Integration Events"(CodeUnit 11261405).NC365IntegrationMgt_OnAfterInitIntegrationTables line 4 - Commerce 365 for Magento - Request a Quote Module by NVision Commerce Solutions B.V. version 100.7.365.0 "NC365 Integration Events"(CodeUnit 11260720).OnAfterInitIntegrationTables(Event) line 2 - Commerce 365 for Magento by NVision Commerce Solutions B.V. version 100.7.368.0 "NC365 Integration Mgt."(CodeUnit 11260900).IsIntegrationTable line 48 - Commerce 365 for Magento by NVision Commerce Solutions B.V. version 100.7.368.0 "NC365 Event Subscribers"(CodeUnit 11260699).GlobalTriggerManagement_OnAfterGetDatabaseTableTriggerSetup line 8 - Commerce 365 for Magento by NVision Commerce Solutions B.V. version 100.7.368.0 GlobalTriggerManagement(CodeUnit 49).OnAfterGetDatabaseTableTriggerSetup(Event) line 2 - Base Application by Microsoft version 26.1.33404.35312 GlobalTriggerManagement(CodeUnit 49).GetDatabaseTableTriggerSetup line 8 - Base Application by Microsoft version 26.1.33404.35312 "Global Triggers"(CodeUnit 2000000002).GetDatabaseTableTriggerSetup(Event) line 2 "NC365B2B Sales Doc. Field Mgt."(CodeUnit 11261224).MarkExistingRecordsObsolete line 6 - Commerce 365 for Magento - B2B Module by NVision Commerce Solutions B.V. version 100.7.365.0 "NC365B2B Sales Doc. Field Mgt."(CodeUnit 11261224).Update line 7 - Commerce 365 for Magento - B2B Module by NVision Commerce Solutions B.V. version 100.7.365.0 "NC365B2B Sales Doc. Field Mgt."(CodeUnit 11261224).Update line 2 - Commerce 365 for Magento - B2B Module by NVision Commerce Solutions B.V. version 100.7.365.0 "NC365B2B Installation"(CodeUnit 11261225).InitB2BSyncIncludedFields line 4 - Commerce 365 for Magento - B2B Module by NVision Commerce Solutions B.V. version 100.7.365.0 "NC365B2B Installation"(CodeUnit 11261225).OnInstallAppPerCompany line 2 - Commerce 365 for Magento - B2B Module by NVision Commerce Solutions B.V. version 100.7.365.0 "Extension Triggers"(CodeUnit 2000000010).OnInstallAppPerCompany(Event) line 2 . De oorspronkelijke extensies konden niet worden hersteld vanwege De extensie Commerce 365 for Magento by NVision Commerce Solutions B.V. 100.7.365.0 kan niet worden geïnstalleerd omdat er al een nieuwere versie, 100.7.368.0, is geïnstalleerd.. Extensies die eerder zijn geïnstalleerd, maar niet opnieuw kunnen worden geïnstalleerd. Deze extensies moeten handmatig opnieuw worden geïnstalleerd. Als ze deel uitmaken van uw huidige werkruimte, kunt u daarvoor de opdracht 'Volledige afhankelijkheid publiceren' gebruiken:
Publishing failed because the extension Commerce 365 for Magento - B2B Module cannot be installed by NVision Commerce Solutions B.V. (version 100.7.365.0) in tenant msweua5608t86209138 and company CRONUS NL due to the following error: The current permissions have prevented the action. (TableData 11260722 NC365 Feature Feature Read: Commerce 365 for Magento) and AL stack trace: "NC365 Feature Management"(CodeUnit 11260778).FeatureEnabled line 4 - Commerce 365 for Magento by NVision Commerce Solutions B.V. version 100.7.368.0 "NC365RQ Integration Events"(CodeUnit 11261405).NC365IntegrationMgt_OnAfterInitIntegrationTables line 4 - Commerce 365 for Magento - Request a Quote Module by NVision Commerce Solutions B.V. version 100.7.365.0 "NC365 Integration Events"(CodeUnit 11260720).OnAfterInitIntegrationTables(Event) line 2 - Commerce 365 for Magento by NVision Commerce Solutions B.V. version 100.7.368.0 "NC365 Integration Mgt."(CodeUnit 11260900).IsIntegrationTable line 48 - Commerce 365 for Magento by NVision Commerce Solutions B.V. version 100.7.368.0 "NC365 Event Subscribers"(CodeUnit 11260699).GlobalTriggerManagement_OnAfterGetDatabaseTableTriggerSetup line 8 - Commerce 365 for Magento by NVision Commerce Solutions B.V. version 100.7.368.0 GlobalTriggerManagement(CodeUnit 49).OnAfterGetDatabaseTableTriggerSetup(Event) line 2 - Base Application by Microsoft version 26.1.33404.35312 GlobalTriggerManagement(CodeUnit 49).GetDatabaseTableTriggerSetup line 8 - Base Application by Microsoft version 26.1.33404.35312 "Global Triggers"(CodeUnit 2000000002).GetDatabaseTableTriggerSetup(Event) line 2 "NC365B2B Sales Doc. Field Mgt."(CodeUnit 11261224).MarkExistingRecordsObsolete line 6 - Commerce 365 for Magento - B2B Module by NVision Commerce Solutions B.V. version 100.7.365.0 "NC365B2B Sales Doc. Field Mgt."(CodeUnit 11261224).Update line 7 - Commerce 365 for Magento - B2B Module by NVision Commerce Solutions B.V. version 100.7.365.0 "NC365B2B Sales Doc. Field Mgt."(CodeUnit 11261224).Update line 2 - Commerce 365 for Magento - B2B Module by NVision Commerce Solutions B.V. version 100.7.365.0 "NC365B2B Installation"(CodeUnit 11261225).InitB2BSyncIncludedFields line 4 - Commerce 365 for Magento - B2B Module by NVision Commerce Solutions B.V. version 100.7.365.0 "NC365B2B Installation"(CodeUnit 11261225).OnInstallAppPerCompany line 2 - Commerce 365 for Magento - B2B Module by NVision Commerce Solutions B.V. version 100.7.365.0 "Extension Triggers"(CodeUnit 2000000010).OnInstallAppPerCompany(Event) line 2 The original extensions could not be restored because the extension Commerce 365 for Magento by NVision Commerce Solutions B.V. 100.7.365.0 cannot be installed because there is already a newer version, 100.7.368.0, installed. Extensions that were previously installed but cannot be reinstalled. These extensions must be manually reinstalled. If they are part of your current workspace, you can use the command 'Publish full dependency' for that purpose.
Sorry, I mean the log archive. Could I get you to share that? :) https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/monitoring-workflows/using-workflow-run-logs#downloading-logs
In the logs you shared here it mentions:
The original extensions could not be restored because the extension Commerce 365 for Magento by NVision Commerce Solutions B.V. 100.7.365.0 cannot be installed because there is already a newer version, 100.7.368.0, installed.
We have a PR on the way to display a warning for this more prominently. The recommendation would be to uninstall the newer version before proceeding with publishing from AL-Go. Could you try that?
Sorry, I mean the log archive. Could I get you to share that? :) https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/monitoring-workflows/using-workflow-run-logs#downloading-logs
In the logs you shared here it mentions:
The original extensions could not be restored because the extension Commerce 365 for Magento by NVision Commerce Solutions B.V. 100.7.365.0 cannot be installed because there is already a newer version, 100.7.368.0, installed.We have a PR on the way to display a warning for this more prominently. The recommendation would be to uninstall the newer version before proceeding with publishing from AL-Go. Could you try that?
The thing is that 100.7.368.0 is the new build that was being installed by the action. 100.7.365.0 was the previous build.
@erikrijn I've created a ticket for our Developer Tools team to help investigate this. Both why the publishing fails in the first place but also why can't restore version 100.7.365.0 of the app after the install fails.
Internal ID: 647206998