Open Mibo5354 opened 5 years ago
I have yet to see that bug. Is there anything that stood out in the logs?
If you want to help me look into this, try hitting the some of the apis in my repo here https://github.com/drew-royster/canvasAPISPostman
Those are the apis I'm hitting for Canvas File Sync to work.
to debug I'd
Interested to see what you find.
Sorry about the issue and thanks for the feedback!
{
"errors": [
{
"message": "The specified resource does not exist."
}
]
}
A lot of the GET commands throws the same error.
https://gist.github.com/Mibo5354/44a5735ac74a95d83425246b286c9e9b
Looking at these logs there's just a lot of 404 errors.
Would the page https://{rootURL}/courses/{course_id}/files
being disabled cause the 404s?
I've been having this issue as well, and am happy to provide diagnostic info via Postman. However, it seems that I need to specify an authToken -- is it possible to get this from any kind of logs left by CFS, or is there a direct way to obtain it?
@lucassz You can get the authToken from canvas in the account settings. It's under "Approved integrations", there you can generate an access token.
- It lists all the right active courses
- GetAllFolders throws an error
{ "errors": [ { "message": "The specified resource does not exist." } ] }
A lot of the GET commands throws the same error.
gist.github.com/Mibo5354/44a5735ac74a95d83425246b286c9e9b Looking at these logs there's just a lot of 404 errors. Would the page
https://{rootURL}/courses/{course_id}/files
being disabled cause the 404s?
Can you get to the files through the UI?
I'm not doing anything sneaky so if you can't get to the files from the UI, then the app probably can't find them either.
I'm getting files from the modules view as well so maybe I just need to make it handle a disabled /files
api gracefully without crashing the whole program?
I have a test course that I can enable or disable things on. Let me try disabling /folders
and /files
to see how it handles it on my end.
I can get to the files through the UI where everything is attached in modules. There are extra files within the module pages embedded as links and videos.
These are all the entries that I have for a module, as you can see files is missing. This is how the files are attached; look at the PDFs and the .mov In the page like the first entry, there are more files attached as links.
There are pages and files in the module that are time locked and I'm not sure if your program can gracefully handle that since a python script I tried out before crashes due to this.
v1.5.1 should fix this issue!
Please let me know if this works for you.
I am now filtering out files that are marked as locked_for_user
. None of the classes I had tested previously had time locked files so I'm glad you helped me find and work through this issue.
It downloads all the files attached directly in the modules section but it doesn't download the files attached inline within the separate pages in modules.
Okay so the idea would be that I check module pages scan for links and download any that are url's which contain any type of file extension?
I think that your situation isn't completely unique, but have also had some teachers post google drive links, github, etc so it's not just simply downloading any link.
Maybe I just download any url's with a .
in the last section of the url because that would denote that it's a file?
Figuring out if updates happen to that link would be much harder, because at that point we are outside of the Canvas framework.
It's still linking to files on canvas. For example, https://myuni.adelaide.edu.au/courses/44344/files/4211757/download?wrap=1
I used to have the initial issue where it would just get stuck getting courses from Canvas. On version 1.5.1, I get to this stage:
where I blacked out the (correct) course names. Not sure what's up with the ones that don't show up, and if I click on the button to enable it, nothing happens. Strangely, the 3 that do work aren't the most recent or any other logical pattern (and of course, the others do have accessible files). I'm able to enable/disable the 3 that do show up, and can successfully sync from them.
Now one more course has showed up with its name and being syncable, for no apparent reason! Also, I'll point out that I have way more than 8 courses visible on Canvas, so not all are showing up even in that glitched form.
@drew-royster
After the initial log on, it gets stuck on the "Getting courses from Canvas" page. The access token is successfully created and the usage is recorded.
Is there a debug log available somewhere?Edit: After looking through the log, it's just infinitely looping through parsing the courses.