Error in Template : Gsuite Integration

Hello,

I am working on Gsuite Integration in production setup with version :slight_smile:

erpnext : 10.1.5
frappe : 10.1.2

But i am getting error after clicking on Save and it did not save configuration as well. I did follow each steps as mentioned in Doc.

Here is console log Error in Template with following log.

var _p=[],print=function(){_p.push.apply(_p,arguments)};with(obj){ _p.push('<pre>// ERPNEXT GSuite integration // function doGet(e){ return ContentService.createTextOutput('ok'); } function doPost(e) { var p = JSON.parse(e.postData.contents); switch(p.exec){ case 'new': var url = createDoc(p); result = { 'url': url }; break; case 'test': result = { 'test':'ping' , 'version':'1.0'} } return ContentService.createTextOutput(JSON.stringify(result)).setMimeType(ContentService.MimeType.JSON); } function replaceVars(body,p){ for (key in p) { if (p.hasOwnProperty(key)) { if (p[key] != null) { body.replaceText(\'','+key+','\', p[key]); } } } } function createDoc(p) { if(p.destination){ var folder = DriveApp.getFolderById(p.destination); } else { var folder = DriveApp.getRootFolder(); } var template = DriveApp.getFileById( p.template ) var newfile = template.makeCopy( p.filename , folder ); switch(newfile.getMimeType()){ case MimeType.GOOGLE_DOCS: var body = DocumentApp.openById(newfile.getId()).getBody(); replaceVars(body,p.vars); break; case MimeType.GOOGLE_SHEETS: //TBD case MimeType.GOOGLE_SLIDES: //TBD } return newfile.getUrl() } </pre>');}return _p.join('');

What should i do ?

Thanks & Regards,
Hardik Gadesha

Can anyone guide me through this ?

yes iā€™m also getting same problem

@Murugan please do bench update. it sloved error for me.

after updating bench only i got this error