Hello, Ive been using the Calendar API for some time now. But recently I noticed some crashes in my app.
Im sure I have permissions to use calendars.
This is my import import {Calendar as NativeCalendar, Permissions} from "expo";
And this is what i use to make sure I have permissions
askForCalendarPermissions = async () => {
const calendarPermissions = await Permissions.askAsync(Permissions.CALENDAR);
return calendarPermissions.status === 'granted';
};
The crash occurs when i call:
const eventCalendars = await NativeCalendar.getCalendarsAsync(NativeCalendar.EntityTypes.EVENT);
I get no bug report from XDE but in Google Play Console I get this error (on multiple devices)
It has occurred on Android 8.0 and Android 7.0
java.lang.NumberFormatException:
at java.lang.Integer.parseInt (Integer.java:597)
at java.lang.Integer.parseInt (Integer.java:643)
at abi27_0_0.host.exp.exponent.modules.api.CalendarModule.calendarAllowedAttendeeTypesFromDBString (CalendarModule.java:1147)
at abi27_0_0.host.exp.exponent.modules.api.CalendarModule.serializeEventCalendar (CalendarModule.java:1353)
at abi27_0_0.host.exp.exponent.modules.api.CalendarModule.serializeEventCalendars (CalendarModule.java:1332)
at abi27_0_0.host.exp.exponent.modules.api.CalendarModule.findCalendars (CalendarModule.java:318)
at abi27_0_0.host.exp.exponent.modules.api.CalendarModule.access$000 (CalendarModule.java:41)
at abi27_0_0.host.exp.exponent.modules.api.CalendarModule$1.run (CalendarModule.java:70)
at android.os.AsyncTask$SerialExecutor$1.run (AsyncTask.java:245)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:636)
at java.lang.Thread.run (Thread.java:764)
Please fix this bug!