The Instructure Community will enter a read-only state on November 22, 2025 as we prepare to migrate to our new Community platform in early December. Read our blog post for more info about this change.
Found this content helpful? Log in or sign up to leave a like!
Hi guys,
I have run into this problem. When I try to open my student's mark,
it generates these errors:
Is this caused by my Grapghql? How can I fix it, and why the right side of the assignment cannot be destructed.
Please help, thank you.
Solved! Go to Solution.
Hi guys,
This is not related to the custom JS I think (since I have none of custom JS). I guess this is caused by the Analytics plugin with the OpenID settings.
I'm not the expert in this but what I have tried today is reinstall the whole Canvas (works fine), then install the Analytics plugin (works fine). But after I set the OpenID for authenticating our user, the error appeared.
I have also tried setting OpenID without Analytics plugin installed, it still works fine.
I guess my OpenID setting has something wrong and it affects the Analytics plugin.
My solution is instead of using OpenID, I have used SAML for authenticating my users and magically, it solves my problem. I don't know why it happens but my solution is using SAML.
P/s: after setting OpenID as an authenticating system, it generates the error. Moreover, if I remove OpenID, the error is still there no matter what authenticating system is used. So I have to reinstall the whole new Canvas (with a new Database also, I guess). And do not even think about OpenID 😂.
Is this a custom frontend? It looks like the default Canvas install from your screenshot. The short answer is that the Javascript on the page is trying to get information from a variable, but there's an error in the code somewhere which means the GraphQL query is failing.
To say what Brian ( @bbennett2 ) wrote in a slightly different manner ...
The real problem here is the 500 status code. That means that the server was not able to understand or process the request. It's more likely an error with the way that you are sending the request than the query itself.
For example, I can take generate a 500 internal server error by not wrapping my GraphQL in curly braces.
This will fail with a 500 error (I am using a content-type: application/json header)
"query":"query AssignmentLookup($assignmentId: ID!) { assignment(id: $assignmentId) { course { _id name } } }",
"variables":{"assignmentId":1871620}But this will succeed
{
"query":"query AssignmentLookup($assignmentId: ID!) { assignment(id: $assignmentId) { course { _id name } } }",
"variables":{"assignmentId":1871620}
}
There are other ways, but it is often a malformed request that generates the error. The server doesn't know how to process it, so it throws the 500 error. Note that if you have errors within the GraphQL itself, then you often get another error.
For example, if I have an extra curly brace within the query, then I get a 200 OK status, but it contains an errors property with a message like "Parse error on ...".
The Type Error and the right side cannot be deconstructed message is a side-effect of the 500 error message. The failed GraphQL query doesn't return a JSON response that the code can parse. That's where the cannot deconstruct message comes from.
In an ideal world, you would check to make sure a valid response was received before trying to act upon it. Those of us who don't program professionally often skip that step, assuming that the request will be successful.
If this is your custom JavaScript, then fix the request. As a hint, I use a REST Client (a lot of people like Postman) to test my calls, especially with GraphQL, before I put them into code.
If this is not custom JavaScript, then file a ticket with Canvas.
Hi guys,
This is not related to the custom JS I think (since I have none of custom JS). I guess this is caused by the Analytics plugin with the OpenID settings.
I'm not the expert in this but what I have tried today is reinstall the whole Canvas (works fine), then install the Analytics plugin (works fine). But after I set the OpenID for authenticating our user, the error appeared.
I have also tried setting OpenID without Analytics plugin installed, it still works fine.
I guess my OpenID setting has something wrong and it affects the Analytics plugin.
My solution is instead of using OpenID, I have used SAML for authenticating my users and magically, it solves my problem. I don't know why it happens but my solution is using SAML.
P/s: after setting OpenID as an authenticating system, it generates the error. Moreover, if I remove OpenID, the error is still there no matter what authenticating system is used. So I have to reinstall the whole new Canvas (with a new Database also, I guess). And do not even think about OpenID 😂.
Thank you for coming back and explaining what you found in case others have the same issue. I'm glad you were able to figure it out.
Community helpTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign inTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign in