Closed zelenovsky closed 4 months ago
Hey @zelenovsky we have been seeing sporadic reports of this going back all the way to Alpha. We have a theory about why this happens, but we can’t reproduce it ourselves consistently. Any chance you can help us reproduce? Did you have a certain set of steps that makes this happen consistently with your project?
Are you using getPayload
anywhere in your code? Try to swap it out for getPayloadHMR
instead, if so.
@jmikrut I noticed that it started to happen when I add a custom Switcher component here:
admin: {
user: Users.slug,
components: {
actions: [Switcher]
}
},
and inside this component I use getPayload fn. When I remove this component I don't receive this error
UPD: It seems that I don't need to call getPayload to trigger the error. I just need a custom component to make this error happen
hey @zelenovsky I think we have gotten to the bottom of this one. A new beta will come out today, and after which, will you let us know if you see this happen again? or re-open another issue?
Some times postgres connection gets dropped with this error without any trace:
Error: cannot begin transaction: Cannot read properties of undefined (reading 'transaction')
It didn't happen on beta 22
Do you have any ideas?