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.
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.
Canvas Data Services sent out an alert that a course was concluded (because the course was concluded) and the status of each user in the UI is set to complete, however, the enrollments API endpoint shows the status of each user in the course as active. Is this a common issue? Have I misinterpreted how the individual…
How can one track Canvas Media use without having the reports available from Canvas Studio? Checking API endpoints and the Data 2 schema, there do not seem to be dedicated Canvas Media endpoints. Am I missing some? A method I've considered is using the body field of the wiki_pages table, as this contains the html code of…
Hello, I'm trying to utilize an API call to pull completed certificates and was hoping to download and store the certs as a backup. I can successfully run the API call but it will not allow me to view the certificate unless I access the URL while signed into an account where it's "my" cert. Is there a permissions setting…
UI for weekly progression idea that rest in the Schedule tab of the **K-12 UI** of Canvas it's incomplete and I really would not take it and push it into instance but I am going to post it here because in the past people like @James && @robotcars || @Steve_25 have had terrific input in the past... maybe w/their eyes and…
I have a new React + Flask webapp. It has its own login for users to start using the app. I have added this as an external tool in Canvas. What I want initially is to see of canvas users can start using the webapp without having to login if they click on the external tool link in a canvas course. I have 2 methods…