There was an unexpected failure with this assessment, invalid type provided

santhoshi6
Kilo Contributor

Hi,

I am receiving the above error when I click on Try it in the assessment_take2 UI page or on the survey link.

Can anyone please help me fixing this issue.

Regards,

Santhoshi Tarai

6 REPLIES 6

anurag92
Kilo Sage

Above error? Missed the screenshot?


Hi Anurag,



Please find the screenshots. The UI page itself is providing the error.



Regards,


Santhoshi Tarai


1) Is it happening for all the survey and assessments ?


2) Are those survey recently migrated ?


3)Please create a new survey and try to reproduce this issue   .



Also can you check the survey sysID and other values   under table   asmt_metric_type ?


mspeirs
Mega Expert

The issue may be with your URL. I don't know if this is what is affecting you, but I'm testing our upgrade to Istanbul and it looks like they made a change in the url returned by this function:


new AssessmentUtils().getAssessmentTypeURL(<insert survey sys_id here>)

Before, it gave something like instance.service-now.com/nav_to.do?uri=assessment_take2.do%3Fsysparm_assessable_type=<insert survey sys_id here>



Now, it does not include the 'nav_to.do?uri=' and therefore does not need encoded parameters (notice the %3F). I was getting the same error message for a custom survey url we are using. I changed our code so we do not use the function above. Now for us it looks like this:


var link = gs.getProperty('glide.servlet.uri') + '<our survey ui page>.do?sysparm_assessable_type=' + <insert survey sys_id here>;

The gs.getProperty() gets our base instance URL and we append the UI Page (assessment_take2.do in your case) and unencoded parameters (notice the ?). So it looks something like instance.service-now.com/assessment_take2.do?sysparm_assessable_type=<insert survey sys_id here>. Again, we are doing this for a custom survey page we have so I don't know exactly where you might have to make a change. Ours is in an email script that prints the survey URL at the bottom of task resolve/close email notifications. So the issue is probably wherever the URL is being generated. Maybe in an email notification message/template or email script. And I don't know what instance you are on so this may not even be related to your issue.