Picture of Naz Hosseimi
Error 351: General Set Failure LMS Error Info: attempting to create element with duplicate value for 'id'
by Naz Hosseimi - Wednesday, 10 April 2024, 4:37 PM
 

Hi 

I'm reaching out to address an issue I've encountered while uploading my SCORM file to the LMS. Upon attempting to upload the exported SCORM package, I've encountered the following errors that are preventing the file from being approved:

  1. Error 403: Data Model Element Value Not Initialized for 'cmi.score.raw'.
  2. Error 351: General Set Failure - Attempting to create an element with a duplicate value for 'id'.

Would anyone be able to assist me in resolving these errors? Thanks in Advance! 

 

Picture of Oliver Foster
Re: Error 351: General Set Failure LMS Error Info: attempting to create element with duplicate value for 'id'
by Oliver Foster - Wednesday, 10 April 2024, 5:26 PM
 

Which LMS? Which version of SCORM, 2004 of 1.2?

I don't think either is a problem.

> Error: 351 - General Set Failure LMS Error Info: attempting to create element with duplicate value for 'id'

Is just that the objectives code is trying to set the id every time it updates an entry at https://github.com/adaptlearning/adapt-contrib-spoor/blob/df90b8dacbe8c20e12e1d57dfd1cdfc37de82903/js/scorm/wrapper.js#L730

I
'm guessing you're using SCORM 2004 as your log goes on to write values `completion_status` on these two lines https://github.com/adaptlearning/adapt-contrib-spoor/blob/df90b8dacbe8c20e12e1d57dfd1cdfc37de82903/js/scorm/wrapper.js#L732-L733

Showing that adapt is proceeding even though the LMS doesn't support the values.

> data model element not initialized

Is just showing that no cmi.score.raw has been set yet, because you haven't completed the course, where it gets set.

Picture of Naz Hosseimi
Re: Error 351: General Set Failure LMS Error Info: attempting to create element with duplicate value for 'id'
by Naz Hosseimi - Wednesday, 10 April 2024, 5:37 PM
 

LMS: KnowBe4 

Version 2004

 

Picture of Naz Hosseimi
Re: Error 351: General Set Failure LMS Error Info: attempting to create element with duplicate value for 'id'
by Naz Hosseimi - Wednesday, 10 April 2024, 6:51 PM
 

Could you please explain more what do you mean by " Is just showing that no cmi.score.raw has been set yet, because you haven't completed the course, where it gets set." 

How can we resolve this issue? Is it something that we can resolve by changing the config in the Adapt Course configuration? 

Thanks 

Picture of Oliver Foster
Re: Error 351: General Set Failure LMS Error Info: attempting to create element with duplicate value for 'id'
by Oliver Foster - Thursday, 11 April 2024, 6:17 AM
 

When you complete the course, with an assessment, the assessment sets a score to the lms at cmi.score.raw.

Any time before that, when the course requests the value for cmi.score.raw, the lms will show a warning, saying that there is no value because no value has been set.

It's a warning, not an error. 

https://github.com/adaptlearning/adapt-contrib-spoor/blob/df90b8dacbe8c20e12e1d57dfd1cdfc37de82903/js/adapt-offlineStorage-scorm.js#L44

 

 

Picture of Naz Hosseimi
Re: Error 351: General Set Failure LMS Error Info: attempting to create element with duplicate value for 'id'
by Naz Hosseimi - Thursday, 11 April 2024, 2:44 PM
 

Thanks, Oliver. 

Even after testing a basic course consisting solely of one page with a text component, I encountered persistent 403 and 315 warnings or errors. Therefore, I respectfully believe that this issue may not be connected to any assessment.

The log shows for each of my pages IDs I have the same duplicate ID error. 

 

Picture of Oliver Foster
Re: Error 351: General Set Failure LMS Error Info: attempting to create element with duplicate value for 'id'
by Oliver Foster - Thursday, 11 April 2024, 3:40 PM
 

Adapt is built to support many LMSes.

> I respectfully believe that this issue may not be connected to any assessment.

The 315 warning is not due to the assessment. It's part of the cmi.objectives code, which always tries to set the objective id every time an objective is updated. Your lms is throwing a warning that the objective entry id is already set. The warning doesn't cause any code to crash and Adapt carries on setting the other values for the same objective as can be seen from your log and the lines of code I sent you. You can ignore the 315 warning.

The 403 warning will only disappear AFTER an assessment is complete and when the assessment has set the cmi.score.raw value, until then, you will get this warning every time the course tries to read the cmi.score.raw value. The 403 is a warning that the value has not been set or "initialised" at the line of code I send you. You can ignore the 403 warning.

> Even after testing a basic course consisting solely of one page with a text component, I encountered persistent 403 and 315 warnings or errors.


Testing with no assessment means that you have not understood what I have tried to explain. How can I help you to further understand? Are you familiar with cmi.objectives and cmi.score? Would you like me to reference the SCORM documents? Do you need more code examples or explanations? I have said you can ignore these warnings, why is this still an issue for you? Is it client related?

 

 

Picture of Ignacio Cinalli
Re: Error 351: General Set Failure LMS Error Info: attempting to create element with duplicate value for 'id'
by Ignacio Cinalli - Friday, 12 April 2024, 8:24 PM
 

Hi, error 351 shouldn't be triggered by the LMS when resetting the cmi.objectives.n.id element with the same previous value.

adl scorm doc

You might want to consult with the LMS technical team, and if you don't get a response, consider changing the spoor extension to prevent the cmi.objectives.n.id from being sent more than once.

Picture of Phillip Harper
Re: Error 351: General Set Failure LMS Error Info: attempting to create element with duplicate value for 'id'
by Phillip Harper - Saturday, 13 April 2024, 4:52 AM
 

Thank you so much for your help. 

Can you tell me where I would do this part?

"consider changing the spoor extension to prevent the cmi.objectives.n.id from being sent more than once."

 

Picture of Oliver Foster
Re: Error 351: General Set Failure LMS Error Info: attempting to create element with duplicate value for 'id'
by Oliver Foster - Saturday, 13 April 2024, 7:34 AM
 

 

As above, this is the line that causes the lms to warn:

https://github.com/adaptlearning/adapt-contrib-spoor/blob/df90b8dacbe8c20e12e1d57dfd1cdfc37de82903/js/scorm/wrapper.js#L730

 

You'll need to work out the condition under which the value should not be re-set for your lms.

Picture of Phillip Harper
Re: Error 351: General Set Failure LMS Error Info: attempting to create element with duplicate value for 'id'
by Phillip Harper - Saturday, 13 April 2024, 11:04 PM
 

Thank you for that. 

The ID that is trying to be re-written is belogs to the box containing the title for the course. 

It's getting the value and then trying to set the value to the same thing?

18:01:14.927 ScormWrapper::isChildSupported: _property=cmi.objectives.n.id
18:01:14.927 ScormWrapper::isSupported: _property=cmi.objectives._count
18:01:14.927 ScormWrapper::getValue: _property=cmi.objectives._count
18:01:14.927 ScormWrapper::getValue: returning 1
18:01:14.927 ScormWrapper::getValue: _property=cmi.objectives.0.id
18:01:14.927 ScormWrapper::getValue: returning 6617eb98a4583729c840e2c0
18:01:14.927 ScormWrapper::setValue: _property=cmi.objectives.0.id _value=6617eb98a4583729c840e2c0
18:01:14.929 Unable to set cmi.objectives.0.id to: '6617eb98a4583729c840e2c0' Error: 351 - General Set Failure LMS Error

Is there even a way I can correct for this?

Picture of Oliver Foster
Re: Error 351: General Set Failure LMS Error Info: attempting to create element with duplicate value for 'id'
by Oliver Foster - Sunday, 14 April 2024, 11:59 AM
 

Yes, there is probably some way of checking whether the id exists by trying to read it in first, but then you'd probably get the "not initialised" warning instead, if your LMS has the same problem as the other mentioned in this thread.

As I said before. You can either ignore the warning, because it doesn't materially impact anything or you can invest time trying to find a solution to it.

If it is having or were to have a detrimental impact, Iwould definitely in favour of fixing it.

Picture of Phillip Harper
Re: Error 351: General Set Failure LMS Error Info: attempting to create element with duplicate value for 'id'
by Phillip Harper - Sunday, 14 April 2024, 3:19 PM
 

My apologies Oliver, I realized that I gave the info in another thread before being directed to this one.

My LMS is the same as the one mentioned in this thread. Odd that we both posted a few days apart.

The reason it is a problem is because KnowBe4 won't let you continue if there are any errors. You can upload your package but cannot add it to any training. The support folks have been good about manually pushing it through for us, but we are going to have monthly training for the next year or so and they always need to be uploaded, viewed by others, then edited and uploaded again. With the need to contact support each time it makes this a lengthy process. That is the impact I was trying to avoid.

I thought maybe there was something I could do on my end but since this is an issue caused by something the LMS is doing, I will let them work on it. 

I appreciate your time on this and pointing me in the right direction. 

 

Picture of Oliver Foster
Re: Error 351: General Set Failure LMS Error Info: attempting to create element with duplicate value for 'id'
by Oliver Foster - Sunday, 14 April 2024, 4:44 PM
 

As Ignacio said above, according to the scorm runtime environment spec,

https://github.com/adaptlearning/scorm_docs/blob/master/SCORM%202004/4th%20Edition/SCORM_2004_4ED_v1_1_RTE_20090814.pdf

page RTE-4-99, it clearly and explicitly states what should happen.

 

Picture of Oliver Foster
Re: Error 351: General Set Failure LMS Error Info: attempting to create element with duplicate value for 'id'
by Oliver Foster - Sunday, 14 April 2024, 7:19 PM
 

> The reason it is a problem is because KnowBe4 won't let you continue if there are any errors. You can upload your package but cannot add it to any training. The support folks have been good about manually pushing it through for us, but we are going to have monthly training for the next year or so and they always need to be uploaded, viewed by others, then edited and uploaded again. With the need to contact support each time it makes this a lengthy process. That is the impact I was trying to avoid.

It would have been very useful to understand this at the outset.

I've listed the issues here:

https://github.com/adaptlearning/adapt-contrib-spoor/issues/316

And proposed a solution here:

https://github.com/adaptlearning/adapt-contrib-spoor/pull/317

If you could test and comment that would be appreciated.

After that fix the Error 351: General Set Failure - Attempting to create an element with a duplicate value for 'id' bug should now disappear and it will be possible to disable the `cmi.objectives` behaviour entirely.

Is the Error 403: Data Model Element Value Not Initialized for 'cmi.score.raw'. also a blocker? If so, are there any other blocking issues?

Picture of Phillip Harper
Re: Error 351: General Set Failure LMS Error Info: attempting to create element with duplicate value for 'id'
by Phillip Harper - Monday, 15 April 2024, 4:55 AM
 

I am not able to get this to work but it highly possible that I am not putting in the correct spot. I added "_shouldRecordObjectives": false, to config.json in the "course" directory in my published SCORM 2004 package. 

I also tried setting it to "true". 

  "_spoor": {
    "_isEnabled": true,
    "_tracking": {
      "_shouldStoreResponses": true,
      "_shouldStoreAttempts": true,
      "_shouldRecordInteractions": true,
      "_shouldRecordObjectives": false,
      "_shouldCompress": false
 
Both still produce this error: 

23:48:57.892 ScormWrapper::getValue: _property=cmi.objectives.0.id
23:48:57.892 ScormWrapper::getValue: returning 6617eb98a4583729c840e2c0
23:48:57.892 ScormWrapper::setValue: _property=cmi.objectives.0.id _value=6617eb98a4583729c840e2c0
23:48:57.893 Unable to set cmi.objectives.0.id to: '6617eb98a4583729c840e2c0' Error: 351 - General Set Failure LMS Error Info: attempting to create element with duplicate value for 'id'

Is the config.json file in the published package the proper place to try this out?

To answer your other question. I am not sure about the 403 error. In the error log from the LMS the 403 error shows in blue and the 351 error in red. I'm guessing the 403 is just a warning but I cannot be sure until I get past this one. 

 

 

 

Picture of Oliver Foster
Re: Error 351: General Set Failure LMS Error Info: attempting to create element with duplicate value for 'id'
by Oliver Foster - Tuesday, 16 April 2024, 9:24 AM
 

You'll need to also replace your spoor plugin in the src/extensions/adapt-contrib-spoor with the branch into which I've posted the code issue/261, readying it for review. Or you'll need to manually edit your spoor extension with the same fixes: code amends from branch issue/261

Depending on how you're working with the framework, you can either download the branch issue/261 straight from github, using the code dropdown menu, and unzip it in the right place, or if you're using git, switch to the branch.

After the code changes are in place the course needs to be rebuilt and tested.

If this is beyond your capability, don't worry, other people will review and test in time and the code will be merged into an upcoming release of spoor.

It is worth noting that the LMS you're using is not compatible with the SCORM 2004 spec, it will error if any other type of content - other than Adapt - performs in a similar way, according to the spec. You need to contact the manufacturer and have them fix the problem.

Picture of Phillip Harper
Re: Error 351: General Set Failure LMS Error Info: attempting to create element with duplicate value for 'id'
by Phillip Harper - Wednesday, 24 April 2024, 7:11 PM
 

Absolutely brilliant. It is working well now. Thank you so much!

Picture of Oliver Foster
Re: Error 351: General Set Failure LMS Error Info: attempting to create element with duplicate value for 'id'
by Oliver Foster - Wednesday, 24 April 2024, 9:35 PM
 

Awesome.