App suddenly going blank for no apparent reason

#1

The Expo app suddenly goes blank and stops working for no apparent reason, without showing any errors or logging anything. It happens all the time since I started using it and it’s extremely frustrating. It’s the same when I try to test the app in the Appetize preview, and it is absolutely impossible to load any Android emulator on my PC. Any idea why this is happening?

#2

I don’t know if it has anything to do with it, but I was also never able to use the Expo XDE for Windows for the same reason (it goes blank without logging anything).

#3

Howdy, can you give some more details? Like what version of the SDK are you on? And the app on iOS or Android?

#4

Hi, thanks for your reply. I’m running on an Android Marshmallow, and if I
understand the app.json file, the SDK is 23.0.0. Would it be useful to show
you the code?

#5

Sure, if you don’t mind. Is it just this code? What about the default code that comes in a default new expo project?

1 Like
#6

The problem doesn’t appear with the default code, it happens when I add
more complexity. Here’s the link: expo.io/@santiagopereira/unnamed-snack

#7

Thanks for your quick reply!

#8

You have a circular dependency between App.js and Lesson.js

2 Likes
#9

Hi again. I will try to solve that. However, it still happened this
morning, before I started using navigation on the Lesson file. Can you see
anything else that could be causing problems?

#10

I fixed a couple more bugs: https://snack.expo.io/HJcwDjhbM I would recommend you preload the fonts before you show load the experience.

#11

Thank you! Was the loading of the fonts causing all that problem? I had
never thought of that.

#12

Nope there were a few problems, but @thetc was correct.:fire: You were importing App into Lesson, and Lesson into App… This created an infinite recursive loop :scream: known as a “circular dependency” :sweat_smile:

The fonts were also breaking the app because you were using them before they were loaded. I added a state and waited until they were done loading, then I loaded the view!