Internal Error  Invalid compiler output.  An item with the same key has already been 

Internal Error  Invalid compiler output.  An item with the same key has already been 

  

Hi,

I am doing one of the GuidedTours. Yesterday my environment was upgraded to version 10.

Today I get the following error while publishing one of the labs. I do not know if there is a connection between these events, 

The error log provides no further clues, unfortunately. Does anyone have an idea what to do?


Internal Error

Invalid compiler output.

An item with the same key has already been added.

Exception Details:

[1] System.ArgumentException: An item with the same key has already been added.

   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)

   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)

   at OutSystems.HubEdition.Compiler.Reference.CompiledReference.StoreCurrentOriginalName(IUserVisibleReferenceElement obj)

   at OutSystems.HubEdition.Compiler.Variables.ReferenceGenericOutputParameter.set_CurrentOriginalName(String value)

   at OutSystems.HubEdition.Compiler.References.SignatureUtils.FillChildrenCurrentOriginalNames(AbstractObject currentObj, XElement currentObjSignature)

   at OutSystems.RuntimeCommon.CollectionsExtensions.Apply[Type](IEnumerable`1 collection, Action`1 action)

   at OutSystems.HubEdition.Compiler.References.SignatureUtils.ForEachProducerElement(Dictionary`2 allReferenceElementsForThisReference, List`1 currentProducerElements, Action`2[] actions)

   at OutSystems.HubEdition.Compiler.References.SignatureUtils.CheckReferencesAfterLoad(ESpace eSpace, Boolean updateDB, Int32 consumerVersionId)

   at OutSystems.HubEdition.Compiler.ESpace.AfterLoad()

   at OutSystems.HubEdition.Compiler.ESpace..ctor(Oml oml, Int32 eSpaceVersionId, CompilationContext context)

   at OutSystems.HubEdition.Compiler.Compiler.InnerCompile(CompilationContext context)

   at OutSystems.HubEdition.Compiler.Compiler.Compile(CompilationContext context)

Hi Dimitri,

From the stack trace I can only see that it has something to do with the references of that module.

Which lab were you publishing? Can you post the oml in this thread for me to try it out?

Hi Carlos,

Thank you for you reply. I have attached the OML.

This is the start of Lab 22 (Scaffolding and RichWidgets). Because of the error I used the Quickstart-version of the lab (attached here), but I still got the same error.

Solution

Hi Dimitri,

If you refresh the module references it will publish ok.

I'll alert the team responsible for the tutorial to update the module so it doesn't have this problem.

Thanks!

Solution

That did the trick !

Thank you for your help, Carlos !

I am having the same issue - but don't know what you mean by "reference the module references." For me the error is occurring back in the Style Sheets section of the tutorial. Thanks!

[UPDATE- I worked it out. On the Development tab you need to click Add Dependencies then Refresh All in the dialog that appears]

Had the same problem, solved by following above suggestions. Thanks folks