Closed praveens96 closed 4 years ago
Did you read the troubleshooting section? https://github.com/wmcmahan/react-native-calendar-events#troubleshooting
I am also having the same issue. I have tried everything on https://support.google.com/calendar/answer/6261951 and the issue still occurs. I don't quite know how to get it to sync properly. It seems that the event will get removed when the auto sync feature occurs. When I disable the auto sync feature for the account, the event will stay there until i either manual refreshes or turn auto sync back on.
I have added type: 'local'
even that didn't help. any idea anybody on how to solve this?
@MoOx it didn't help.
this has helped me: https://github.com/wmcmahan/react-native-calendar-events/issues/265#issuecomment-525430449
working fine. this is to be included in instructions to use.
Not able to add events to calendar in Android
Environment
react-native info: System: OS: macOS 10.15.6 CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz Memory: 105.57 MB / 16.00 GB Shell: 5.7.1 - /bin/zsh Binaries: Node: 10.15.0 - ~/.nvm/versions/node/v10.15.0/bin/node Yarn: 1.21.1 - /usr/local/bin/yarn npm: 6.4.1 - ~/.nvm/versions/node/v10.15.0/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman Managers: CocoaPods: 1.9.1 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: iOS 14.2, DriverKit 20.0, macOS 11.0, tvOS 14.2, watchOS 7.1 Android SDK: Not Found IDEs: Android Studio: 3.5 AI-191.8026.42.35.6010548 Xcode: 12.2/12B45b - /usr/bin/xcodebuild Languages: Java: 11.0.9 - /usr/bin/javac Python: 3.8.3 - /Users/pns/opt/anaconda3/bin/python npmPackages: @react-native-community/cli: Not Found react: 16.11.0 => 16.11.0 react-native: 0.62.2 => 0.62.2 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found
Steps to Reproduce
Added the plugin. working fine in iOS. when trying in Android, its not getting added. but saveEvent is returning a valid id like 180, 181 etc but in phone calendar the event is not appearing. tried in Android 7 & 10. details added are:
Expected Behavior
Actual Behavior
events are not getting added but the response is success from plugin.
in> adb logical seeing this message:
11-17 21:00:36.343 6088 6782 W ContentResolver: Failed to get type for: content://com.android.calendar (Unknown URL content://com.android.calendar) 11-17 21:00:37.251 865 6948 E SyncLog : EventHandler::InsertEvent: Forbidden Entity[ id=178 calendar_id=1 calendar_sync_id=3158886 mutators=other ] 11-17 21:00:37.251 865 6948 E SyncLog : com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden 11-17 21:00:37.251 865 6948 E SyncLog : { 11-17 21:00:37.251 865 6948 E SyncLog : "code": 403, 11-17 21:00:37.251 865 6948 E SyncLog : "errors": [ 11-17 21:00:37.251 865 6948 E SyncLog : { 11-17 21:00:37.251 865 6948 E SyncLog : "domain": "calendar", 11-17 21:00:37.251 865 6948 E SyncLog : "message": "You need to have writer access to this calendar.", 11-17 21:00:37.251 865 6948 E SyncLog : "reason": "requiredAccessLevel" 11-17 21:00:37.251 865 6948 E SyncLog : } 11-17 21:00:37.251 865 6948 E SyncLog : ], 11-17 21:00:37.251 865 6948 E SyncLog : "message": "You need to have writer access to this calendar." 11-17 21:00:37.251 865 6948 E SyncLog : } 11-17 21:00:37.251 865 6948 E SyncLog : at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:150) 11-17 21:00:37.251 865 6948 E SyncLog : at com.google.api.client.googleapis.services.AbstractGoogleClientRequest$1.interceptResponse(AbstractGoogleClientRequest.java:401) 11-17 21:00:37.251 865 6948 E SyncLog : at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed$51D2IJ33DTMIUPRFDTJMOP9FC5O6IBR3DHKMARJK5TK78T3G5T478T3GA9IN6S3FDPPMAEO_0(AbstractGoogleClientRequest.java:1067) 11-17 21:00:37.251 865 6948 E SyncLog : at com.google.android.syncadapters.calendar.CalendarRequestExecutor.execute(CalendarRequestExecutor.java:432) 11-17 21:00:37.251 865 6948 E SyncLog : at com.google.android.syncadapters.calendar.EventHandler.sendEntityToServer(EventHandler.java:470) 11-17 21:00:37.251 865 6948 E SyncLog : at com.google.android.syncadapters.calendar.CalendarSyncAdapterApiary.sendEntityToServer(CalendarSyncAdapterApiary.java:3632) 11-17 21:00:37.251 865 6948 E SyncLog : at com.google.android.syncadapters.calendar.CalendarSyncAdapterApiary.processLocalChangesForHandler(CalendarSyncAdapterApiary.java:3579) 11-17 21:00:37.251 865 6948 E SyncLog : at com.google.android.syncadapters.calendar.CalendarSyncAdapterApiary.performSync(CalendarSyncAdapterApiary.java:944) 11-17 21:00:37.251 865 6948 E SyncLog : at com.google.android.syncadapters.calendar.CalendarSyncAdapterApiary.onPerformLoggedSync(CalendarSyncAdapterApiary.java:607) 11-17 21:00:37.251 865 6948 E SyncLog : at com.android.emailcommon.syncadapter.LoggingThreadedSyncAdapter.onPerformSync(LoggingThreadedSyncAdapter.java:47) 11-17 21:00:37.251 865 6948 E SyncLog : at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:334)
I have observed that the event is added and then getting removed from calendar