6 Replies Latest reply on Dec 2, 2016 4:32 PM by pthivierge

    Error Coresight [ngRepeat:dupes]

    JGonzalez

      Hi,

       

      I've created Coresight symbols. I use them inside displays. The symbols contain repeaters:

      <span ng-repeat="item in Details track by $index">{{item}}<br></span>

      It's not possible to have duplicated items. If I drag the same attribute inside my symbol more than once, it will be taken once into account (duplicates not allowed by code).

       

      Sometimes, I have an error and I loose all the display (like a crach) !!!

      The error is:

      Error: [ngRepeat:dupes] Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: sym in dispCtrl.display.Symbols track by sym.Name, Duplicate key: Symbol23, Duplicate value:

      {"Datasources":["af:\\\\EUD3-PR-SCAPIAF\\COOD\\Ville\\Gas|Pressure",

      "af:\\\\EUD3-PR-SCAPIAF\\COOD\\Ville\\Gas|Product",

      "af:\\\\EUD3-PR-SCAPIAF\\COOD\\Ville\\Gas|Pressure",

      "af:\\\\EUD3-PR-SCAPIAF\\COOD\\Ville\\Gas|Product",

      ...

      at angular.js:68

      at ngRepeatAction (angular.js:26913)

      ar Object.$watchCollectionAction [as fn] (angular.js:15423)

      at Scope.$digest (angular.js:15556)

      at Scope.$apply (angular.js:15824)

      at done (angular.js:10263)

      at completeRequest (angular.js:10435)

      at XMLHttpRequest.requestLoaded (angular.js:10376)

       

      I cannot reproduce the problem, because it appears randomly.

      How can I solve that problem?

        • Re: Error Coresight [ngRepeat:dupes]
          pthivierge

          Bonjour Julie,

           

          For internal use, this issue is also tracked as technical support case 754718.  I will send you an email shortly so this can be another communication channel we can use to help diagnosing this issue.

          Is it possible to share a the code (html+javascript) of your custom symbol?  That would really help to try to figure out what may be occuring here.

           

          Let me throw some ideas I have:

          • When the copy paste occurs, there could be a timing issue between when the symbol gets it name vs the read of the corresponding date collection of the symbol.  Because Angula JS relies heavily on the data binding, depending on what variable you are binding to, this can introduce issues that are very difficult to figure out ( this is a trade-off, it is so nice but in the same time introduces a layer of complexity.)
          • It may have to do with the way your symbol is getting the data.  Attibute names are not always sent over data updates and depending on how you worked with this detail, this may be a consequence...

           

          Looking at the code would really help, you can either share it directly here or by email directly to me.

           

          Let's see also if Jason Golla has an idea, maybe he or his team are familiar with this type of issue.

           

          For reference: Angular JS documentation error description: Error: ngRepeat:dupes

          • Re: Error Coresight [ngRepeat:dupes]
            jgolla

            Hi Julie,

             

            Unfortunately I have not run across this before, so it will be difficult for me to diagnose the problem. As Patrice suggests, if we could get the code that would hopefully allow us to reproduce the problem you are seeing.