问题
I am creating G-Suite add-on to integrate 3rd part conference solution with Google Calendar events. I added chosen 3rd party Conference Solution to manifest file:
{
"timeZone": "America/Denver",
"dependencies": {
"enabledAdvancedServices": [{
"userSymbol": "Calendar",
"serviceId": "calendar",
"version": "v3"
}]
},
"exceptionLogging": "STACKDRIVER",
"oauthScopes": [
"https://www.googleapis.com/auth/userinfo.email",
"https://www.googleapis.com/auth/admin.directory.user.readonly",
"https://www.googleapis.com/auth/calendar",
"https://www.googleapis.com/auth/calendar.addons.execute",
"https://www.googleapis.com/auth/calendar.addons.current.event.read",
"https://www.googleapis.com/auth/calendar.addons.current.event.write"
],
"urlFetchWhitelist": [],
"runtimeVersion": "V8",
"addOns": {
"common": {
"name": "Conference Solution",
"logoUrl": "https://imagesite.com/companyLogo",
"layoutProperties": {
"primaryColor": "#4285f4",
"secondaryColor": "#ea4335"
},
"homepageTrigger": {
"runFunction": "onHomePage"
}
},
"calendar": {
"homepageTrigger": {
"runFunction": "onHomePage"
},
"eventOpenTrigger": {
"runFunction": "onCalendarEventOpen"
},
"eventUpdateTrigger": {
"runFunction": "calendarUpdated"
},
"currentEventAccess": "READ_WRITE",
"conferenceSolution": [{
"onCreateFunction": "createConference",
"id": "123",
"name": "Meeting Conference Solution",
"logoUrl": "https://someUrl.com/conferenceSolutionLogo.jpg"
}]
}
But when I choose my 3rd part conference solution, I get 500 code of response and error that conference cannot be created.
UPD. Response body:
[13,"Internal error encountered."]
Request URL:
https://calendar-pa.clients6.google.com/v1/calendar/polzovatel101056@gmail.com/event/2lhlppothipf43ggb9krfabcef/conferencing?alt=protojson&key=AIzaSyAJV0pH9dpVwdNZeLajIGsIpjcPu3tVgAE
Request body:
[
[
"email@gmail.com",
"2lhlppothipf43ggb9krfabcef"
],
null,
null,
[
4,
[
null,
"AKfycbzrJeytVGp3C8hhST2QMETrVdaXPG84CNnIXRQtwJUv",
"1"
]
]
]
createConference function:
function createConference(e) {
var dataBuilder = ConferenceDataService.newConferenceDataBuilder();
var confParams = dataBuilder.newConferenceParameter()
.setKey('conferenceId')
.setValue('addOn');
confParams.setKey("key")
.setValue(JSON.stringify({
type: "addOn"
}));
dataBuilder.setConferenceSolutionId("123");
dataBuilder.setParameters(confParams);
return dataBuilder.build();
}
回答1:
This appears to be a bug!
After fully understanding you situation I reproduced your code an the behaviour you're describing seems to be unintended behaviour. After setting up an add-on to create a conference via a third-party conference solution and selecting it from the drop-down:
The conference fails to be run and the following error can be seen in the Stackdriver logs:
ReferenceError: ConferenceDataService is not defined.
I did a search and it seems that there is already a report on Google's Issue Tracker which detail the same kind of behaviour:
- ConferenceDataService not defined
Google does seem to know about this issue but you can hit the ☆ next to the issue number in the top left on the aforementioned page which lets Google know more people are encountering this and so it is more likely to be seen to faster.
I hope this is helpful to you!
Update 2020.04.24:
It seems that this has been fixed on Google's end as per a comment left on the above Issue Tracker link. To confirm I checked the method from within the Apps Script interface and low-and-behold method suggestions are now being populated:
来源:https://stackoverflow.com/questions/61184503/cannot-create-conference-with-3rd-party-conference-solution-from-conference-solu