G Suite Developer Sheets Quickstart tutorial: TypeError in "check student attendance"

63 Views Asked by At

Following the steps in the G Suite Developer Sheets Add-on Samples tutorial Quickstart: Check Student Attendance In Google Meet Courses

I completed all 10 steps in Set up, but on step 2 in Try it out the Options > Import Last 5 Courses causes a error:

TypeError: Cannot read property 'length' of undefined 

It fails in both Chromium and Microsoft Edge browsers. From looking at the script, it seems like Classroom.Courses.list() is returning null.

Unable to import the data, I can't run rest of the tutorial.

1

There are 1 best solutions below

1
User858414183132802622 On

So based on my experience building stuff with google apps script, (see tutoringbyroger.com), I suspect that you might be encountering a weird permissions issue. If it didn't ask for permissions to run the script, try the following:

  1. In the script editor select the importCourses() function from the dropdown.
  2. Click the debug icon.

That should prompt for any necessary permissions and run the function. It might fail, but at least that will get the permissions out of the way.

If you have already done that, or it already asked for permissions then... ??? I am just as stumped as you. Maybe tell Google or search their support page?

Other things to double-check before reporting it as a bug:

  1. Make sure you have done step 6 in the "Set up" section.
  2. Make sure you have admin permissions.

Other than that, it should work. If it doesn't I don't know what to tell you.