[SDK34] Error with expo-calendar trying to createEvent.

An exception was thrown while calling ExpoCalendar.saveEventAsync

So basicly, i’ve had the calendar to work with the app before, using SDK32.
But since updating, i’ve done all migrations, using expo install expo-calendar etc.
Everything works fine, until I try creating events.

I got permissions, can read all the calendars on the phone.
But the error is when creating a new event.

import * as NativeCalendar from 'expo-calendar';
createEvent = await NativeCalendar.createEventAsync(calendarId, data);

Calendar ID here is taken from a picker which gets the phones calendars

calendarId = "6CD542C0-C64E-448D-A2D3-055A5AB429F7";

Data here is

Object {
  "accessLevel": "default",
  "alarms": Array [
    Object {
      "relativeOffset": -60,
  "availability": "busy",
  "endDate": "2019-09-01T09:00:00.000Z",
  "endTimeZone": "Europe/Stockholm",
  "guestsCanModify": false,
  "location": "Location Foo",
  "startDate": "2019-09-01T08:00:00.000Z",
  "timeZone": "Europe/Stockholm",
  "title": "Title bar",

As far as I can trace, the expo-calendar/build/Calendar.js - createEventAsync does not throw any errors. It seems to come deeper than expo-calendar/build/ExpoCalendar.js which I cannot trace.
Which is somewhere in NativeModules.

Any ideas or anyone that can help trace it deeper?

Hi, could you provide more information about this calendar to which you want to add the event? And did it also occur on Android?

I am also having this problem. Passing “null” for the calendar id just doesn’t create the event. My application is for scheduling so this is very important. Any updates?

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.