microsoft / AL

Home of the Dynamics 365 Business Central AL Language extension for Visual Studio Code. Used to track issues regarding the latest version of the AL compiler and developer tools available in the Visual Studio Code Marketplace or as part of the AL Developer Preview builds for Dynamics 365 Business Central.
MIT License
733 stars 243 forks source link

Error: Message <ii>(ArgumentException): <ii>Requested value '"[Label of a Report]"' was not found. #988

Closed MaKnauer closed 6 years ago

MaKnauer commented 6 years ago

My Extension could be published, but during installation the following error occured in the eventlog. The object causing the problem is a Report. Is there a problem with "ä,ö,ü" in source expressions of labels in a Report?:

Server instance: NAV Category: Extensions ClientSessionId: 00000000-0000-0000-0000-000000000000 ClientActivityId: 00000000-0000-0000-0000-000000000000 ServerSessionUniqueId: 393cb285-1033-4654-912b-87bf1d545dc8 ServerActivityId: de25b3eb-5d57-41ee-9d49-5d29092140db EventTime: 11/24/2017 15:33:50 Message (ArgumentException): Requested value '"Warenanhänger_VDA_4902Version_4CaptionLbl"' was not found. ExceptionStackTrace: at System.Enum.EnumResult.SetFailure(ParseFailureKind failure, String failureMessageID, Object failureMessageFormatArgument) at System.Enum.TryParseEnum(Type enumType, String value, Boolean ignoreCase, EnumResult& parseResult) at System.Enum.Parse(Type enumType, String value, Boolean ignoreCase) at Microsoft.Dynamics.Nav.Types.Metadata.MetaDataItemColumn. .ctor(XmlNode dataItemFieldNode, Int32 parentId, Int32 languageAppGroupId) at Microsoft.Dynamics.Nav.Types.Metadata.MetaDataItem..ctor( XmlNode dataItemNode, Int32 parentId, Dictionary2 uniqueDataItemNames, Int32 languageAppGroupId) at Microsoft.Dynamics.Nav.Types.Metadata.MetaReport..ctor(Xm lElement root, CreateRequestForm createRequestForm, Int32 metadataAppGroupId, Int32 languageAppGroupId, RemoveItemsOnPageBasedOnLicenseAndApplicationArea removeItemsOnPageBasedOnLicenseAndApplicationArea) at Microsoft.Dynamics.Nav.Runtime.NCLMetaReport.LoadMetadata() at Microsoft.Dynamics.Nav.Runtime.NCLMetaApplicationObject.P opulate() at Microsoft.Dynamics.Nav.Runtime.NCLMetadata.InitializeAppG roupNewObject(NavAppGroup appGroup, NavAppGroupObjectMetadataSummary newObjectSummary) at Microsoft.Dynamics.Nav.Runtime.NCLMetadata.InitializeNewA ppObjectsExceptQueries(NavAppGroup appGroup, PerformanceLog perfLog, IReadOnlyList1 newObjectsFromApps) at Microsoft.Dynamics.Nav.Runtime.NCLMetadata.InitializeAppG roup(NavAppGroup appGroup) at Microsoft.Dynamics.Nav.Runtime.NCLMetadata.InitializeAppG roup(NavAppGroup appGroup) at Microsoft.Dynamics.Nav.Runtime.Apps.NavAppGroupUpdater.Pr epareAppGroups(NavAppGroups groups, PerformanceLog performanceLog) at Microsoft.Dynamics.Nav.Runtime.NavManagementTasks.Prepare AllAppGroupsForInstallChain(NavAppInstallPreCheckHelper precheckResult, PerformanceLog outerPerfLog) at Microsoft.Dynamics.Nav.Runtime.NavManagementTasks.Interna lInstallNavApp(NavAppInstallPreCheckHelper precheckResult, String name, NavTenant tenant, Boolean doNotLoadData, String activityId, PerformanceLog outerPerfLog) at Microsoft.Dynamics.Nav.Runtime.NavManagementTasks.<>c__Di splayClass25_0.b1(NavTenant tenant, NavSession session) at Microsoft.Dynamics.Nav.Runtime.NavTenant.Microsoft.Dynami cs.Nav.Runtime.ITenantSessionHandler.RunTenantActionInSystemSes sion(Action2 action, Boolean throwExceptions, Boolean useCurrentCulture, Boolean allowAppsDisabledMode) at Microsoft.Dynamics.Nav.Runtime.NavManagementTasks.<>c__Di splayClass25_0.<InstallNavApp>b__0() at Microsoft.Dynamics.Nav.Runtime.NavManagementTasks.Install NavApp(InstallNavAppArguments installNavAppArguments, Boolean async) at Microsoft.Dynamics.Nav.Service.NSAdminService.<>c__Displa yClass54_0.<Microsoft.Dynamics.Nav.Types.INCLAdminService.Insta llNavApp>b__0(NavSession session) at Microsoft.Dynamics.Nav.Runtime.Apps.NavAppDiagnosticSessi on.<>c__DisplayClass1_01.b0() at Microsoft.Dynamics.Nav.Runtime.Apps.NavAppDiagnosticSessi on.SendTraceTagOnFailure(Action operation, String additionalInfo, String callerName) CallerStackTrace: at Microsoft.Dynamics.Nav.Runtime.Apps.NavAppDiagnosticSessi on.SendTraceTagOnFailure(Action operation, String additionalInfo, String callerName) at Microsoft.Dynamics.Nav.Runtime.Apps.NavAppDiagnosticSessi on.SendTraceTagOnFailure[T](Func`1 operation, String additionalInfo, String callerName) at Microsoft.Dynamics.Nav.Service.NSAdminService.Microsoft.D ynamics.Nav.Types.INCLAdminService.InstallNavApp(InstallNavAppA rguments installNavAppArguments) at Microsoft.Dynamics.Nav.Service.Dev.DevService.<>cDispla yClass5_1.b0() at Microsoft.Dynamics.Nav.Service.Dev.DevService.PublishAndI nstallExtension(NavSession session, Stream packageStream, PerformanceLog performanceLog) at Microsoft.Dynamics.Nav.Service.Dev.Web.Controllers.AppsCo ntroller.d0.MoveNext() at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Mo veNextRunner.Run() at Microsoft.Dynamics.Nav.Runtime.NavSynchronizationContext. <>c__DisplayClass1_0.b__0(Obje ct state) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.QueueUserWorkItemCallback.System.Threadi ng.IThreadPoolWorkItem.ExecuteWorkItem() at System.Threading.ThreadPoolWorkQueue.Dispatch()

            </ii></ii>
            ProcessId: 3776
            Tag: 00000GR
            ThreadId: 61
            CounterInformation:
bwdeleeuw commented 6 years ago

Adding to this error, but in my case, there are no strange characters in the name of the label:

image

bwdeleeuw commented 6 years ago

Moving the labels to the label section didn't work, I ended up with an AL0999 error, but when I changed the Label to TextConst ENU this resolved for me:

image

Hope that helps somewhat.

doivosevic commented 6 years ago

Could you try getting a small repro for us? Also, something copy-pasteable so that I don't have to rewrite everything :) I tried your example but it doesn't crash for me. Could you try adding a / to the ReportCaptionLbl and see if it reproes? Are you saying this happens when you F5 or in some other step?

MaKnauer commented 6 years ago

I will try to reproduce this error with a small Report. Publishing the app works fine. The error occurs during installation of the app. If I press F5 in VS Code, "A Task was canceled" message occurs. When I publish and install the app with powershell commands, the error occurs during installation and can be found in the event log.

MaKnauer commented 6 years ago

I could not publish the package as well. The error occurs during Publishing the package, sorry for that.

You are right, if I change the type of Label to TextConst, the error message is gone. Here a small Report to reproduce the Error:

report 50010 "TestRpt" { DefaultLayout = RDLC;

dataset { dataitem("Test";Integer) { column(gTest;testlabel) { } } }

var testlabel : Label 'Test Txt'; }

doivosevic commented 6 years ago

Thank you for the clear repro. I have identified a bug and will address it

doivosevic commented 6 years ago

This bug has been fixed and will be available in the next update

bwdeleeuw commented 6 years ago

Did this fix not make it into CU1?

doivosevic commented 6 years ago

Hi @bwdeleeuw We are working on backporting it to CU2