question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

you don't have permissions to add an event to the users calendar

See original GitHub issue

Environment

OS: Linux 4.13 Node: 9.10.1 Yarn: 1.6.0 npm: 5.6.0 Watchman: Not Found Xcode: N/A Android Studio: Not Found

Steps to Reproduce

Add new event to calendar

Expected Behavior

Add new event to calendar

Actual Behavior

Possible Unhandled Promise Rejection (id: 0):
Error: you don't have permissions to retrieve an event to the users calendar
createErrorFromErrorData@blob:http://localhost:8081/6f5fdccd-b770-44d4-97c5-a9d63e0414ef:2039:17
fn/</<@blob:http://localhost:8081/6f5fdccd-b770-44d4-97c5-a9d63e0414ef:1991:27
__invokeCallback@blob:http://localhost:8081/6f5fdccd-b770-44d4-97c5-a9d63e0414ef:2433:9
invokeCallbackAndReturnFlushedQueue/<@blob:http://localhost:8081/6f5fdccd-b770-44d4-97c5-a9d63e0414ef:2178:11
__guardSafe@blob:http://localhost:8081/6f5fdccd-b770-44d4-97c5-a9d63e0414ef:2346:11
invokeCallbackAndReturnFlushedQueue@blob:http://localhost:8081/6f5fdccd-b770-44d4-97c5-a9d63e0414ef:2177:9
onmessage@http://localhost:8081/debugger-ui/debuggerWorker.js:70:25
Possible Unhandled Promise Rejection (id: 1):
Error: you don't have permissions to add an event to the users calendar
createErrorFromErrorData@blob:http://localhost:8081/6f5fdccd-b770-44d4-97c5-a9d63e0414ef:2039:17
fn/</<@blob:http://localhost:8081/6f5fdccd-b770-44d4-97c5-a9d63e0414ef:1991:27
__invokeCallback@blob:http://localhost:8081/6f5fdccd-b770-44d4-97c5-a9d63e0414ef:2433:9
invokeCallbackAndReturnFlushedQueue/<@blob:http://localhost:8081/6f5fdccd-b770-44d4-97c5-a9d63e0414ef:2178:11
__guardSafe@blob:http://localhost:8081/6f5fdccd-b770-44d4-97c5-a9d63e0414ef:2346:11
invokeCallbackAndReturnFlushedQueue@blob:http://localhost:8081/6f5fdccd-b770-44d4-97c5-a9d63e0414ef:2177:9
onmessage@http://localhost:8081/debugger-ui/debuggerWorker.js:70:25

settings.gradle

rootProject.name = 'PetShop'
include ':react-native-calendar-events'
project(':react-native-calendar-events').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-calendar-events/android')

include ':app'

build.gradle

dependencies {
    compile project(':react-native-calendar-events')
...
    
}

MainActivity.java

package com.petshop;

import com.facebook.react.ReactActivity;
import com.calendarevents.CalendarEventsPackage;

public class MainActivity extends ReactActivity {

    /**
     * Returns the name of the main component registered from JavaScript.
     * This is used to schedule rendering of the component.
     */
    @Override
    protected String getMainComponentName() {
        return "PetShop";
    }

    @Override
    public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
        CalendarEventsPackage.onRequestPermissionsResult(requestCode, permissions, grantResults);
        super.onRequestPermissionsResult(requestCode, permissions, grantResults);
    }
}

AndroidManifest.xml

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.petshop">
  ...
    <uses-permission android:name="android.permission.READ_CALENDAR" />
    <uses-permission android:name="android.permission.WRITE_CALENDAR" />
   ...

</manifest>

Can someone help me? I can’t see what I did wrong

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
wmcmahancommented, May 22, 2018

Hey @rodrigofbm, which Android SDK is your app targeting? If 23+, you will need to have the app request permission:

RNCalendarEvents.authorizeEventStore()
3reactions
mubashiralisiddiquicommented, Jul 15, 2021

@wmcmahan can we please re open this issue

Read more comments on GitHub >

github_iconTop Results From Across the Web

Outlook 2016 unable to create events on shared calendars but ...
"You don't have permission to create an entry in this folder. Right-click the folder, and then click Properties to check your permissions for...
Read more >
Share Calendar or Change Calendar Permissions in Outlook
In the left side bar Right Click the calendar you want to share, then click Properties. Select Calendar in Outlook; Click the Permissions...
Read more >
Allow users to grant access to their Calendar - Salesforce Help
The first step to allow users to grant access to their Calendar is to set your organization-wide calendar sharing model. This must be...
Read more >
Google: Setting permissions for editing calendar events
Open Google Calendar. In My Calendars on the left, find the resource calendar you want to allow users in Robin to edit. If...
Read more >
Calendar provider permission error - android - Stack Overflow
TITLE, "Event title here"); intent. ... Required to add events to Calendar --> <uses-permission ... Hope this code will help you :).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found