Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Canvas error alerted if viewing planner with no Canvas URL inserted #49

Closed
michaelgira23 opened this issue Oct 28, 2017 · 3 comments
Closed

Comments

@michaelgira23
Copy link
Member

Apparently there's some error on the planner of a user hasn't inserted their canvas url. This should cease.

@aldonovan
Copy link
Contributor

Do you know what specific error it is? I think I remember "Get Canvas Events Error" but I'm not sure

@michaelgira23
Copy link
Member Author

The following is the only thing the front-end displays in the error alert:

Get Canvas Events Error! Try refreshing the page to fix any problems.

Upon further inspection, it looks like https://api.mymicds.net/canvas/get-events is returning a 502 gateway error, typically meaning that the back-end crashed on request. Looking at the back-end logs, the following is thrown:

3|mymicds  | TypeError: Cannot read property 'length' of null
3|mymicds  |     at canvas.getFromCache (/home/apps/MyMICDS/MyMICDS-v2/src/libs/feeds.js:226:12)
3|mymicds  |     at users.get (/home/apps/MyMICDS/MyMICDS-v2/src/libs/canvas.js:384:4)
3|mymicds  |     at userdata.find.toArray (/home/apps/MyMICDS/MyMICDS-v2/src/libs/users.js:51:4)
3|mymicds  |     at handleCallback (/home/apps/MyMICDS/MyMICDS-v2/node_modules/mongodb/lib/utils.js:120:56)
3|mymicds  |     at /home/apps/MyMICDS/MyMICDS-v2/node_modules/mongodb/lib/cursor.js:860:16
3|mymicds  |     at handleCallback (/home/apps/MyMICDS/MyMICDS-v2/node_modules/mongodb-core/lib/cursor.js:171:5)
3|mymicds  |     at setCursorDeadAndNotified (/home/apps/MyMICDS/MyMICDS-v2/node_modules/mongodb-core/lib/cursor.js:505:3)
3|mymicds  |     at nextFunction (/home/apps/MyMICDS/MyMICDS-v2/node_modules/mongodb-core/lib/cursor.js:651:7)
3|mymicds  |     at Cursor.next [as _next] (/home/apps/MyMICDS/MyMICDS-v2/node_modules/mongodb-core/lib/cursor.js:692:3)
3|mymicds  |     at fetchDocs (/home/apps/MyMICDS/MyMICDS-v2/node_modules/mongodb/lib/cursor.js:856:10)

Looks like this may be a back-end issue then. After fixing that, it's possible that the error will be fixed. Depends on whether the front-end correctly handles the API request if it works.

@michaelgira23
Copy link
Member Author

MyMICDS/MyMICDS-v2#51 seems to fix the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants