I was getting this same error. As the OP mentioned, this error is from using a query inside a view's init(){}. In my case, I just wanted to get the query count (for debugging purposes) and was attempting to access the value within the view 's init(){}.
I moved my print statement to the .onAppear() for my view and everything works great!
Topic:
App & System Services
SubTopic:
iCloud & Data
Tags: