After upgrade from SDK 40 to 42, frequent hanging on `await`

I’m on SDK 40. Periodically I notice Expo Go hangs when doing an await for a custom method. The start of the custom method is console.log and it isn’t even appearing.

In SDK 42, (I presume 41 as well) it just hangs regardless. Is there some sort of limit or way to check if there’s any leaked “awaits”?

Hey @trajano, what platform(s) is this happening on? Also, can you share an example of code that hangs?


I haven’t been able to isolate the code but this is in Android where it’s hanging. (I am not 100% sure if it is platform specific though).

I have been able to reduce some occurrence by only allowing one transaction per openDatabase operation.

it’s very unlikely this is related to expo specific code. if you can provide a reproducible example that’d be great. you may want to investigate your other project dependencies

Understood. It’s likely some interop between React-Native / SQLite / Promises. Though I’ve been having a lot of weird issues with SQLite lately

@adamjnav and @notbrent I have an MVCE that shows the problem now. It’s the t2 branch GitHub - trajano/sqllite-mvce at t2

In the MVCE when you start it the first time everything is more or less okay. On the second restart/reload (just make a small change such as modifying the console logs) you will notice that the useEffect hooks no longer fire.

On SDK 42 it stops on the first attempt. On SDK 40 it takes a few tries then it reaches the same situation.

I open a bug for this one When SQLite is being used, useEffect hooks with async on reloads fail to fire. · Issue #13578 · expo/expo · GitHub

I discovered the likely reason, it wasn’t on SQLite but more of an uncleared/unfulfilled setTimeout.

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