Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

185
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda