A weird run time error in gmail addon - MessageAccessToken error

巧了我就是萌 提交于 2019-12-11 02:56:30

问题


The add on was running finely. At some point of time , this error started showing up only for one user. Other users dont experience this.

function buildAddOn(e) { //Add on trigger function
  var card = CardService.newCardBuilder();
  card.setHeader(CardService.newCardHeader().setTitle('Home'));
  var section = CardService.newCardSection();
  section.addWidget(CardService.newTextParagraph().setText("hello world"));
  return card.build();
}

I do not have a file called Storage, though.

"SyntaxError: Unexpected token: u [line: 60, function: , file: Storage]"

Update This has something to do with this

 GmailApp.setCurrentMessageAccessToken(e.messageMetadata.accessToken)

Update 2: Gmail UI object e is undefined

This is not supposed to be undefined. This is an object that is provided by the Gmail UI.

console.log(e) //undefined

Update 3 The same addon runs perfectly for other users.


回答1:


Empty cache and Hard reload browser this error will disappear (But keep in mind that it's not proper way to skip error for user end)



来源:https://stackoverflow.com/questions/51675685/a-weird-run-time-error-in-gmail-addon-messageaccesstoken-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!