Non-exhaustive patterns in Just closeSignalMVar

I get the following error pretty regularly, but not consistently.

I have the following tables and policies set up:

users

Basic table provided by GUI, no changes

lists

Read and write policy: user_id = ihp_user_id()
Read and write through another table: EXISTS (SELECT 1 FROM public.lists_users WHERE lists_users.user_id = ihp_user_id() AND lists_users.list_id = lists.id)

lists_users

Read and write policy: user_id = ihp_user_id()

The error can occur on any query, but the most common query is useQuery(query('lists')), which is called on the main page.

Error: IHP/DataSync/ControllerImpl.hs:144:21-88: Non-exhaustive patterns in Just closeSignalMVar

Thanks for reporting. This is a known issue. It’s caused by a race condition when a internal DataSubscription is closed before it’s initialized, or closed after the server already closed the subscription.

We’ve just deployed a patch that should make this race condition disappear. Maybe you can report back if you catch this issue again.

1 Like