react-native-calendars "Agenda" component working in expo app, but not when building apk file

In my project I am using the agenda component from react-native-calendars. It runs fine using the expo app on my phone and is able to pull in date information. This works for both ios and android devices i have tested using the expo app.

When i run “exp build:android” it seems to create the apk file fine, but when I test the apk file with an android emulator on my computer everything works but when I try to open the particular screen with the Agenda component in it i get the following error messages.


I don’t really know where to go from here as far as debugging goes. Any advice is very much appreciated.

hello! try turning on production mode and running your app locally:

I went ahead and ran my app using the expo app in production mode with an android phone. When I clicked on the screen that was throwing the error, a similar error message came up, but this time it was much more specific. For example, above it was saying ‘n[0].clone’ where as in the expo app it says ‘days[0].clone’. I think I should be able to figure out the issue now with this new information. Thanks so much for the help.

edit: It seems to be related to the date strings I am passing into the items list for the agenda. The weird part is that it works fine running in production mode with remote debugging turned on. As soon as remote debugging is turned off, the error appears again. I wonder if android could be handling the date strings differently and causing the issue?

remote debugging runs javascript inside of chrome using v8, a different javascript engine than the one that your app will use when you’e not remote debugging, so this kind of makes sense, although i’m not sure what differences in particular would cause this error you’re seeing

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.