Hello everyone, can someone help with the following error?
(Code: 0x80004003) Skyline.DataMiner.Net.Exceptions.DataMinerException: Array cannot be null.
Parameter name: bytes ---> System.ArgumentNullException: Array cannot be null.
The code i'm using is this:
public void Run(Engine engine)
{
try
{
var dms = engine.GetDms();
var newElement = dms.GetElement("SmartWifi Alarm Collector");
IDma dma = dms.GetAgent(agentid);
newElement.Duplicate("SmartWifi Alarm Collector - BKP2", dma);
}
catch
{
throw;
}
}
With this code i can access the agent, get all the info, but when i try to duplicate a element from another agent into it, i get the error listed above.
Hello Davor, i think everything is right, the Duplicate method requires a (string name, IDma dma), i’m passing that IDma and if i try to access the data inside it i can and i can see the data, but if i try to use that IDma to set as a value needed by Duplicate method, i get the error above. Maybe it’s a bug?
Hi João, can you take an export of the element you're trying to duplicaate and send the resulting dmimport package to support.data-acquisition@skyline.be (together with the full stack trace) so we can have a look at what the issue might be?
Hi Pedro, im trying send a email to that address with the required information but im getting the following error: “550 5.0.350 One or more of the attachments in your email is of a file type that is NOT allowed by the recipient’s organization.” and the only attachment in the email is the export file of the element, i have tried put it in a .zip file but still getting the same error. Would there be a specific way to send that information?
Hi João, I see, in that case can you send an email to techsupport@skyline.be? Our support team will then provide a secure link where you can upload any necessary files for further analysis. When reaching out, please describe the issue in detail, including the steps taken and any error messages (like the ones you shared here). In the mail, you can also link to this Dojo question.
Hi Pedro, o have sent the email as per guidance. Thank you!
Yeah, maybe its a bug, but i cant confirm it.
Duplication Method Parameters: Check the Duplicate method’s implementation. Ensure that the parameters you are passing (“SmartWifi Alarm Collector – BKP2″ and dma) are valid and that there’s no underlying assumption that might lead to a null reference.
catch (Exception ex)
{
Console.WriteLine($”Error: {ex.Message}”);
throw; // Optionally rethrow or handle it differently
}
try this to your code where ever is stoped i think