Receiving JAVASCRIPT_CODE_FAILURE Error

david74
Kilo Contributor

I want to trigger a second copy of the Network Switch pattern from a custom classifier with a view to adding some amendments to this second copy later on.

As a starting point I have made a copy of the Network Switch and given it a unique name. I have tried doing this in 2 ways but always hit the same problem.

Firstly, either by copying the pattern steps from Network Switch in to Custom pattern (making sure to retain the unique id metadata for the custom pattern) or secondly by putting the custom pattern together manually using the Network Switch pattern as a reference to copy from.

If I trigger the Network Switch from the custom classifier the discovery is successful however if I trigger my custom pattern (which essentially should be a like for like copy of Network switch pattern) it fails part way though one of the "SNMP - Switching" Shared Libraries.

find_real_file.png

This has got me stumped since the same Shared Library is being referenced by both patterns but the OOTB pattern works but my Copy fails. What is causing this ?

4 REPLIES 4

Alexander Mitov
Giga Guru

Hi David,



It's a bit of a "shot in the dark" but maybe it would be a good idea to copy to notepad++ (or another text editor) the NDL from both the original pattern and the one you created and then run a comparison between them. The metadata aside, the other steps should be identical. Since the copied one is failing I would imagine there to be other differences.


The NDL is located in the pattern main page, under the "Pattern" tab.



Once you have compared them, please let us know what you find. If you are not certain what the differences point towards, maybe you could post both NDLs here so that we could take a shot at them as well



BR,


Alex


Hi Alex



Thanks for the response. Agreed this would be the thing to do except the error is occurring when calling the Shared Library from the new pattern. The Shared Pattern doesn't show the error when being invoked from the original pattern.



Any further suggestions.



Thanks



David


Hi Alex



Still struggling on this one. I really need to take copies of the original patterns before making adjustments.



I just ran the Compare using the Notepad++ Compare plugin - only the meta data differs:



find_real_file.png


All I have done is created a new pattern; entered the new name; selected the pattern type and citype and then the Identification Section and then saved and published. Then I have copied the NDL from the original Network Switch pattern across leaving the id value for the new pattern as is. Then saved and published.


When I run a scan I get the same error as above.



Any alternative approach to making a pattern copy ?



Thanks



David


moresr
Giga Contributor

Hi David,

Did you manage to fix it?

Observed similar behavior for Network Router pattern, was trying to make copy & execute...

 

Thanks

SM