FunctionError: read preference in a transaction must be primary

Hi!
We are spontaneously hitting this error on custom graphql resolvers: “FunctionError: read preference in a transaction must be primary”.

These resolvers don’t have any transactions inside them, just plain .find calls.

We’ve been getting these errors since at least 21st of May.

Realm’s support acknowledged the problem, but it wasn’t able to give us any estimates of when this issue might be fixed.
image

@Mohit_Sharma advised me to post here, in case some of you guys might have any workarounds for this. Anyone else getting into this errors? How are you getting around it?
Our project is pretty screwed unless we find a way to deal with this situation.

2 Likes

Hey @dimaip - support is very actively tracking this bug, however the engineering team is still investigating the root cause, especially given it is not consistently reproducing. Both support and I can get back to you with updates when we have them.

2 Likes

@dimaip to my knowledge this should be resolved now and the error should have gone away. Let me know if you have any other questions.

1 Like

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