App crash on fetchAllEvents
See original GitHub issueApp crashes when I want to get all events using fetchAllEvents
.
Most of the library methods work but when I want to use this method app will crash on android.
Environment
React Native Environment Info: System: OS: macOS 10.14 CPU: (4) x64 Intel® Core™ i5-3210M CPU @ 2.50GHz Memory: 33.83 MB / 8.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 8.11.1 - /usr/local/bin/node Yarn: 1.12.3 - /usr/local/bin/yarn npm: 5.8.0 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 12.0, macOS 10.14, tvOS 12.0, watchOS 5.0 Android SDK: API Levels: 23, 26, 27, 28 Build Tools: 27.0.0, 27.0.1, 27.0.3, 28.0.3 System Images: android-23 | Google APIs Intel x86 Atom_64 IDEs: Android Studio: 3.0 AI-171.4408382 Xcode: 10.0/10A255 - /usr/bin/xcodebuild npmPackages: react: 16.6.1 => 16.6.1 react-native: 0.57.5 => 0.57.5 npmGlobalPackages: create-react-native-app: 1.0.0 react-native-cli: 2.0.1 react-native-git-upgrade: 0.2.7
Steps to Reproduce
async checkCalendar() {
// date = this.state.selectedStartDate.toISOString()
date = '2018-12-09T12:21:27.873Z'
date1 = '2018-12-10T12:21:27.873Z'
RNCalendarEvents.authorizeEventStore()
// console.log(date)
try{
cals = await RNCalendarEvents.findCalendars()
console.log(cals)
}
catch(e) {
console.log(e)
}
try{
console.log('fetchAllEvents')
c = await RNCalendarEvents.fetchAllEvents(date,date1,cals)
console.log(c)
}
catch(e){
console.log(e)
}
}
Expected Behavior
I want to list events that exist in my calendar.
Actual Behavior
App will crash at this line:
RNCalendarEvents.fetchAllEvents(date,data1,cals)
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top GitHub Comments
I use this method in order to solve my problem:
I hope it helps.
For future readers and date-fns users: use
formatRFC3339
like thisstartDate = formatRFC3339(date, {fractionDigits: 3}),