@Daniel_Weiss difficult to tell, without more information, I too used the code sandbox example and it worked with a test app when I was first problem solving this issue.
I’ll provide some more information on my set-up , my code snippet from my app, and what rules looks like on my end. This was frustrating for me, so I hope this will help you solve it faster.
- I’ve deleted the default permissions, and then set manual permissions on each of my collections
- I’m on “realm-web”: “^2.0.0”,
- My Snippet
export const watchCollection = async () => {
const processing = app.currentUser
.mongoClient('mongodb-atlas')
.db('yourdb')
.collection('yourcol');
if (!processing) {
return;
}
for await (const change of changeStream) {
switch (change.operationType) {
case 'insert': {
}
case 'update': {
const {fullDocument} = change;
//....do awesome things
break;
}
case 'replace': {
const { documentKey, fullDocument } = change;
break;
}
case 'delete': {
const { documentKey } = change;
break;
}
}
}
return changeStream;
};
/*Then in my react app*/
useEffect(() => {
watchCollection();
}, []);
- A screen shot of my rules in the App Services UI