allen
allen2y ago

Field name $id starts with a '$', which is reserved.

I started getting this error this morning when invoking an action. Not much further information or stack trace and cant find anything code using $id in my app.
4 Replies
allen
allenOP2y ago
Disregard. I didnt understand that Id.toJSON() returning an object in the shape of {$id: string} -- i thought it was just the string. When sending that to apple push notification servers, they didnt like the key name being present. A bit concerning that theres no stack trace in the logs though on an unhandled exception in the action.
ballingt
ballingt2y ago
Was this unhandled exception (in a fetch() call?) awaited? Not getting a stack trace is pretty frustrating, that's not a known issue in Node.js actions if the fetch was awaited so would love to see the code.
allen
allenOP2y ago
it was thrown in the expo-server-sdk package, so I'm unsure, but possible being that its some api communication to their servers
ian
ian2y ago
For those looking at this in the future, with 0.17.0, IDs are now strings so won't get serialized as $id anymore

Did you find this page helpful?