Library with identifier QUnit is missing - G Suite for Education Account

278 views
Skip to first unread message

Stephen McBride

unread,
Sep 11, 2020, 4:50:44 AM9/11/20
to Google Apps Script Community

I have been trying to use QUnit to test my code but have been getting this error: "Library with identifier QUnit is missing (perhaps it was deleted, or maybe you don't have read access?)."

I am sure I have installed it correctly with the correct key.

My google account is a G Suite for Education Account that's been set up by my company, I have two different Education accounts with them. Both accounts are in different organisational units from each other. One of them can run QUnit with no issues but I need it to work on the account that is throwing the error.

I took the following steps too add QUnit to my project:

  • Went onto Libraries and entered the code "MxL38OxqIK-B73jyDTvCe-OBao7QLBR4j"
  • Selected version 4.
  • Published as a Web App and then selected "Test web app for your latest code" to view the results.
  • I am then presented with the error message on a new tab.

When I try these same steps on my Personal Google Account as well there seems to be no issues.

Below is my QUnit code, if you can see where I've went wrong or if there are any G Suite Settings that should be changed that you know of that would be a great help.



function doGet( e ) {
 
QUnit.urlParams( e.parameter );
 
 
QUnit.config({
    title
: "Unit tests for my project"
 
});
 
QUnit.load( tests );
 
return QUnit.getHtml();
};


function tests() {
  addEqual
();
  addNotEqual
();
  multiplyEqual
();
  multiplyNotEqual
();
}


function addEqual() {
  test
("Add number to number", function() {
    equal
(addNumbers(), 5, 'It worked!');
 
});
}

function addNotEqual() {
  test
("Add number to number", function() {
    equal
(addNumbers(), 8, 'It worked!');
 
});
}

function multiplyEqual() {
  test
("Multiply Number with a Number", function() {
    equal
(multiply(), 6, 'It Worked!');
 
});
}

function multiplyNotEqual() {
  test
("Multiply Number with a Number", function() {
    notEqual
(multiply(), 9, 'It Worked!');
 
});
}



Andrew Roberts

unread,
Sep 11, 2020, 7:24:18 AM9/11/20
to google-apps-sc...@googlegroups.com
I'd guess is that it is a typo. Take a look in your libraries list and check that the identifier is "QUnit".

You might also want to take a look at QUnitGS2 - a newer library that gives you access to the latest QUnit library (v2.10, rather than v1.7)

--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/aaf7110a-0277-4e92-8f7b-0299f1462f85o%40googlegroups.com.

Stephen McBride

unread,
Sep 11, 2020, 9:54:50 AM9/11/20
to Google Apps Script Community
Hi Andrew,

I have had another check and the identifier is still "QUnit". I have duplicated the exact code and performed it on my own personal Google Account and have no issue. I feel that it will be linked to the type of account I am using. 

I will also have a look into QUnitGS2 as well, thank you.

Andrew Roberts

unread,
Sep 12, 2020, 5:24:05 AM9/12/20
to google-apps-sc...@googlegroups.com
It is feasible that there is an admin setting for your GSuite account that blocks accessing libraries outside your domain.

--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.

Kim Nilsson

unread,
Sep 13, 2020, 1:37:55 PM9/13/20
to Google Apps Script Community
Here are some examples of things that could be different between the user accounts.

Google Cloud Platform
Developer Platform
Apps / Drive - external sharing
Apps / Drive - Drive SDK API

One of those could affect your access to external libraries.

Also, there could be limitations set in Cloud Platform, where one of your accounts is allowed to do things the other isn't.

Just guessing here, but those are the places I'd start looking, comparing with the OU and user that works.

Stephen McBride

unread,
Sep 14, 2020, 5:57:15 AM9/14/20
to Google Apps Script Community
I have tried QUnitGS2 but I am now getting the error "Library with identifier QUnitGS2 is missing (perhaps it was deleted, or maybe you don't have read access?)"

I will look into those settings you have recommended Kim and see if that solves my issue. Thank you for your help so far.
Reply all
Reply to author
Forward
0 new messages