Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

183
Vistas
React Native Calendar returns {"_U":0,"_V":0,"_W":null,"_X":null}, not awaiting a promise

I am using expo-calendar and retrieving an object of calendars from a user's device.

After receiving the calendars I am using the calendar to retrieve the events from the individual calendars.

Upon requesting for the events I am receiving {"_U":0,"_V":0,"_W":null,"_X":null} when I log the requested event data.

Along with this I am receiving the error: [Unhandled promise rejection: Error: An exception was thrown while calling `ExpoCalendar.getEventsAsync` with arguments `(] at node_modules/react-native/Libraries/BatchedBridge/NativeModules.js:103:50 in promiseMethodWrapper at node_modules/@unimodules/react-native-adapter/build/NativeModulesProxy.native.js:15:23 in moduleName.methodInfo.name at http://127.0.0.1:19000/index.bundle?platform=ios&dev=true&hot=false&minify=false:321320:82 in getEventsAsync$ at Screens/Tasks_1.js:1018:15 in <global>

I believe this is because the request const events = Calendar.getEventsAsync() is waiting on a promise but I cannot determine what response it is waiting for. How can I correctly access the events?

useEffect(() => {
    (async () => {
//REQUEST PERMISSION TO ACCESS CALENDAR
      const { status } = await Calendar.requestCalendarPermissionsAsync();
      if (status === "granted") {
        const calendars = await Calendar.getCalendarsAsync(
          Calendar.EntityTypes.EVENT
        );
//LIST OF ALL CALENDARS ON DEVICE WITH ID's
        console.log("Here are all your calendars:");
        console.log({ calendars });
//GET EVENTS FROM A CALENDAR ON DEVICE WITH A GIVEN ID AND TIME RANGE
        const events = Calendar.getEventsAsync(
          calIDs,
          "2021-04-14T17:00:00.00Z",
          "2021-09-14T17:00:00.00Z"
        );
//THIS LOGS {"_U":0,"_V":0,"_W":null,"_X":null}
        console.log("EVENTS" + JSON.stringify(events));
      }
    })();
  }, []);
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

{"_U":0,"_V":0,"_W":null,"_X":null} this is happen probably because you didn't add await keyword before Calendar.getEventsAsync !!

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda