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
737 stars 243 forks source link

Build Error #4154

Closed markjinx closed 5 years ago

markjinx commented 5 years ago

Hit CTRL+F5 and get this error:

I added a boolean variable to control a page objects editable property.

Microsoft (R) AL Compiler version 0.12.16641 Copyright (C) Microsoft Corporation. All rights reserved

[Error - 2:19:02 PM] Please report this issue to https://github.com/microsoft/al/issues including information on how to reproduce it, if possible. Processing of message 'al/createPackage' failed with error: 'Token StartAttribute in state Element Content would result in an invalid XML document.' StackTrace: at System.Xml.XmlWellFormedWriter.ThrowInvalidStateTransition(Token token, State currentState) at System.Xml.XmlWellFormedWriter.AdvanceState(Token token) at System.Xml.XmlWellFormedWriter.WriteStartAttribute(String prefix, String localName, String namespaceName) at System.Xml.XmlWriter.WriteAttributeString(String localName, String value) at Microsoft.Dynamics.Nav.CodeAnalysis.Emit.ObjectMetadataEmitHelper.WritePropertyValueMetadata(XmlWriter xmlWriter, PropertySymbol property) in C:\Agent_work\41\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Emitter\ObjectMetadataEmitHelper.cs:line 101 at Microsoft.Dynamics.Nav.CodeAnalysis.Emit.ObjectMetadataEmitter.WritePropertyValueMetadata(XmlWriter xmlWriter, PropertySymbol property) in C:\Agent_work\41\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Emitter\ObjectMetadataEmitter.cs:line 54 at Microsoft.Dynamics.Nav.CodeAnalysis.Emit.ObjectMetadataEmitHelper.WriteAttributeProperties(XmlWriter xmlWriter, IEnumerable1 properties, Action2 writePropertyMetadata) in C:\Agent_work\41\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Emitter\ObjectMetadataEmitHelper.cs:line 69 at Microsoft.Dynamics.Nav.CodeAnalysis.Emit.ObjectMetadataEmitHelper.WriteProperties(XmlWriter xmlWriter, Symbol declaringSymbol, IEnumerable1 properties, Action2 writePropertyMetadata, Boolean shouldOutputDefaultProperties) in C:\Agent_work\41\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Emitter\ObjectMetadataEmitHelper.cs:line 38 at Microsoft.Dynamics.Nav.CodeAnalysis.Emit.PageMetadataEmitter.<>cDisplayClass3_0.b__1() in C:\Agent_work\41\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Emitter\PageMetadataEmitter.cs:line 87 at Microsoft.Dynamics.Nav.CodeAnalysis.Emit.ObjectMetadataEmitHelper.WriteStartEndElement(XmlWriter xmlWriter, String elementName, Action action) in C:\Agent_work\41\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Emitter\ObjectMetadataEmitHelper.cs:line 25 at Microsoft.Dynamics.Nav.CodeAnalysis.Emit.ObjectMetadataEmitHelper.WriteStartEndElement(XmlWriter xmlWriter, String elementName, Action action) in C:\Agent_work\41\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Emitter\ObjectMetadataEmitHelper.cs:line 25 at Microsoft.Dynamics.Nav.CodeAnalysis.Emit.PageMetadataEmitter.b1_0(XmlWriter xmlWriter) in C:\Agent_work\41\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Emitter\PageMetadataEmitter.cs:line 33 at Microsoft.Dynamics.Nav.CodeAnalysis.Emit.ObjectMetadataEmitter1.EmitMetadata(Action1 content) in C:\Agent_work\41\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Emitter\GenericObjectMetadataEmitter.cs:line 37 at Microsoft.Dynamics.Nav.CodeAnalysis.MethodCompiler.CompileObject(ObjectTypeSymbol containingType) in C:\Agent_work\41\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Compiler\MethodCompiler.cs:line 248 at Microsoft.Dynamics.Nav.CodeAnalysis.MethodCompiler.<>cDisplayClass17_0.b__0() in C:\Agent_work\41\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Compiler\MethodCompiler.cs:line 216 at Microsoft.Dynamics.Nav.CodeAnalysis.Utilities.UICultureUtilities.<>cDisplayClass5_0.b0() in C:\Agent_work\41\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Utilities\UICultureUtilities.cs:line 152 at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Dynamics.Nav.CodeAnalysis.MethodCompiler.WaitForWorkers() in C:\Agent_work\41\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Compiler\MethodCompiler.cs:line 161 at Microsoft.Dynamics.Nav.CodeAnalysis.MethodCompiler.CompileMethodBodies(Compilation compilation, ModuleBuilder moduleBeingBuiltOpt, Boolean hasDeclarationErrors, DiagnosticBag diagnostics, Predicate1 filterOpt, CancellationToken cancellationToken) in C:\Agent\_work\41\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Compiler\MethodCompiler.cs:line 145 at Microsoft.Dynamics.Nav.CodeAnalysis.Compilation.CompileImpl(ModuleBuilder moduleBuilder, Boolean emittingPdb, DiagnosticBag diagnostics, Predicate1 filterOpt, CancellationToken cancellationToken) in C:\Agent_work\41\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Compilation\Compilation.cs:line 810 at Microsoft.Dynamics.Nav.CodeAnalysis.Compilation.Compile(ModuleBuilder moduleBuilder, Boolean emittingPdb, DiagnosticBag diagnostics, Predicate`1 filterOpt, CancellationToken cancellationToken) in C:\Agent_work\41\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Compilation\Compilation.cs:line 787 at Microsoft.Dynamics.Nav.CodeAnalysis.CommandLine.CommonCompiler.PackageTheModule(Compilation compilation, CompilerTextWriter consoleOutput, CancellationToken cancellationToken, ErrorLogger errorLogger, AnalyzerDriver analyzerDriver) in C:\Agent_work\41\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\CommandLine\CommonCompiler.cs:line 531 at Microsoft.Dynamics.Nav.CodeAnalysis.CommandLine.CommonCompiler.RunCore(CompilerTextWriter consoleOutput, ErrorLogger errorLogger, CancellationToken cancellationToken) in C:\Agent_work\41\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\CommandLine\CommonCompiler.cs:line 413 at Microsoft.Dynamics.Nav.CodeAnalysis.CommandLine.CommonCompiler.Run(CompilerTextWriter consoleOutput, CancellationToken cancellationToken) in C:\Agent_work\41\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\CommandLine\CommonCompiler.cs:line 312 at Microsoft.Dynamics.Nav.EditorServices.Protocol.LanguageServer.Extensions.CreatePackageRequestHandler.d3.MoveNext() in C:\Agent_work\41\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\LanguageServer\Extensions\CreatePackageRequestHandler.cs:line 32 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Dynamics.Nav.EditorServices.Protocol.RequestRegistry.d__6.MoveNext() in C:\Agent_work\41\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\Endpoints\RequestRegistry.cs:line 59

markjinx commented 5 years ago

Solved, here: https://github.com/Microsoft/AL/issues/1582

JohanStenberg100 commented 5 years ago

Hi,

I'm using AL extension version: 2.0.48254 BC cloud sandbox: US Dynamics NAV 13.0 (25251)

Using this sample AL code:

page 50150 MyPage
{
    PageType = Card;
    ApplicationArea = All;
    UsageCategory = Administration;
    SourceTable = Customer;
    Editable = true;

    layout
    {
        area(Content)
        {
            group(GroupName)
            {
                field(Name; Balance)
                {
                    ApplicationArea = All;

                }
            }
        }
    }
}

This does not produce any error. Could you perhaps try upgrading your extension and if this still reproduces, please post a comment attaching a zip file with a reproducing app?

StanislawStempin commented 5 years ago

Our apologies for still having the instructions in the stack trace that tell to report NAV 2018 issues on this forum. We have changed that in the latest CU - you should instead contact the support team.

This GitHub repository is dedicated to handling issues and feedback for the latest Developer Preview releases of the AL development tools for Dynamics 365 Business Central.

If you can reproduce the problem on the latest Business Central Developer preview version we will be happy to look further into it. Otherwise please contact the regular support channel.

You can open Support Request to CSS through PartnerSource portal or contact your Service Account Manager (SAM) in the local subsidiary to understand what is included in your contract as of support incident and PAH (Partner Advisory Hours). Your SAM might also step by step direct you how to open a support request or how to get credentials if this is the first time for you / your company.

For more details please read: https://blogs.msdn.microsoft.com/nav/2018/05/03/al-developer-previews-multiple-releases-and-github/ https://github.com/Microsoft/AL/wiki/Frequently-Asked-Questions#i-found-an-issue-on-nav-2018-what-do-i-do