Status Update
Comments
ar...@google.com <ar...@google.com>
ar...@google.com <ar...@google.com> #2
he...@gmail.com <he...@gmail.com> #3
I have identified the problematic property:
"outOfOfficeProperties": {
"autoDeclineMode": "declineAllConflictingInvitations",
"declineMessage": "Out sick, but available for important or urgent matter "
}
Import works again after removing it.
sz...@gmail.com <sz...@gmail.com> #4
Confirming the removal of outOfOfficeProperties (via delete event.outOfOfficeProperties
) does fix the problem. Thanks!
sh...@globallogic.com <sh...@globallogic.com> #5
EDIT: Adding "event.outOfOfficeProperties = [];" to null it out ended up fixing the problem though
al...@gmail.com <al...@gmail.com> #6
I have forwarded this to the engineering team. Another request failing with 400 but not having the outOfOfficeProperties
field would be helpful. Thank you.
ar...@google.com <ar...@google.com> #7
Hope they issue a full solution soon.
al...@gmail.com <al...@gmail.com> #8
Our script also broke for syncing individual time off to a shared team calendar. In my case I had to delete the outOfOfficeProperties
attribute and also change the eventType to default
as the outOfOffice
eventType is not supported in shared calendars.
function importEvent(username, event) {
event.summary = '[' + username + '] ' + event.summary;
event.organizer = {
id: TEAM_CALENDAR_ID,
};
event.attendees = [];
// remove outOfOfficeProperties to support importing outOfOffice events
// see https://issuetracker.google.com/issues/313935022?pli=1
delete(event.outOfOfficeProperties);
// switch event type to default, cannot create `outOfOffice` events in shared calendars
event.eventType = 'default';
console.log('Importing: %s', event.summary);
try {
Calendar.Events.import(event, TEAM_CALENDAR_ID);
} catch (e) {
console.error('Error attempting to import event: %s. Skipping.',
e.toString());
}
}
[Deleted User] <[Deleted User]> #9
di...@gmail.com <di...@gmail.com> #10
I can confirm, I also had to set
event.eventType = 'default';
to make it work again.
ch...@gmail.com <ch...@gmail.com> #11
al...@gmail.com <al...@gmail.com> #12
full script below:
/**
* Sets up the script to run automatically every hour.
*/
function setup() {
let triggers = ScriptApp.getProjectTriggers();
if (triggers.length > 0) {
throw new Error('Triggers are already setup.');
}
ScriptApp.newTrigger('sync').timeBased().everyHours(1).create();
// Runs the first sync immediately.
sync();
}
bo...@justin.tv <bo...@justin.tv> #13
Confirming that removing outOfOfficeProperties helped for a while, but couple of days later got the same error, have to add event.eventType = 'default';
ar...@google.com <ar...@google.com> #14
True, looks like the new error started at midday December 15th.
Why on Earth is there try/catch instead of sending error alerts (when run via triggers) like a normal script...?
My solution is therefore a new variable called TEMPORARY_FIX and checking for it inside the relevant function (but note I only do this for eventType outOfOffice):
let TEMPORARY_FIX = true;
...
function importEvent(username, event) {
...
try {commonmark.org
if (typeof TEMPORARY_FIX !== 'undefined' && TEMPORARY_FIX && event.eventType == 'outOfOffice') {
delete event.outOfOfficeProperties;
event.eventType = 'default';
}
Calendar.Events.import(event, TEAM_CALENDAR_ID);
} catch (e) {
zx...@gmail.com <zx...@gmail.com> #15
Can confirm that the following worked for me prior to importing events on the shared calendar:
delete event.outOfOfficeProperties;
event.eventType = 'default';
Description
Samsung: `99%`
OnePlus: `1%`
# Operating Systems
Android 9: `100%`
# Device States
Background: `8%`
# Cast SDK version:
Android Sender `18.0.0`
# Firebase Crash Log
```
Fatal Exception: android.app.RemoteServiceException
Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{cacdf6e u0
android.app.ActivityThread$H.handleMessage (ActivityThread.java:1874)
android.os.Handler.dispatchMessage (Handler.java:106)
android.os.Looper.loop (Looper.java:214)
android.app.ActivityThread.main (ActivityThread.java:7073)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:494)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:964)
```