wmcmahan / react-native-calendar-events

📆 React Native Module for iOS and Android Calendar Events
MIT License
906 stars 292 forks source link

Gmail account only error #295

Closed lannex closed 4 years ago

lannex commented 4 years ago

Hi.

I'm building a calendar app, and strangely, when I load Gmail events as fetchAllEvents in iOS, the app goes down. Can you help me?

Environment

System:
    OS: macOS 10.15.2
    CPU: (4) x64 Intel(R) Core(TM) i5-6287U CPU @ 3.10GHz
    Memory: 43.82 MB / 16.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 13.6.0 - /usr/local/bin/node
    Yarn: 1.21.1 - /usr/local/bin/yarn
    npm: 6.13.4 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
    Android SDK:
      API Levels: 25, 26, 27, 28
      Build Tools: 23.0.1, 23.0.3, 25.0.0, 25.0.2, 26.0.1, 26.0.2, 26.0.3, 27.0.2, 27.0.3, 28.0.3, 29.0.2
      System Images: android-28 | Intel x86 Atom, android-28 | Intel x86 Atom_64, android-28 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom_64
  IDEs:
    Android Studio: 3.0 AI-171.4443003
    Xcode: 11.3.1/11C504 - /usr/bin/xcodebuild
  npmPackages:
    react: 16.9.0 => 16.9.0 
    react-native: 0.61.5 => 0.61.5 
  npmGlobalPackages:
    react-native-cli: 2.0.1

Steps to Reproduce

...

RNCalendarEvents.fetchAllEvents(
  startISODate,
  endISODate,
  checkedCalendars,
);

Expected Behavior

Normal calendar events load like other mails

Actual Behavior

Xcode message, and freezing app image

lannex commented 4 years ago

I found this message in xcode

Error loading default properties for object x-apple-eventkit:///Location/p10729 from daemon: Error Domain=EKCADErrorDomain Code=1013 "(null)"

...
...

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]'
lannex commented 4 years ago

I solved it. event.structuredLocation.title value is null. The latest code for this package fixed it, but it wasn't published to npm, so the problem remains unresolved. Anyway, the solution is to set up dependency at github address instead of npm.