Push notification in action trigger not working

my button is set up to update a firebase document and then send a push notification to a list of users from the user collection. however this seems to be throwing an error that i cant seem to fix from the FF console. I have already checked my firebase functions including Fcm_tokens, the fcm_tokens are being created fine. and Im able to send notification via FF console. Just doesnt work from the phone (physical) - and the user is logged in and i've also done the AllUsers permission to call fcm_token function

i feel this has something to do with the flutter packages being used in the background , esp the ones serialization helpers are using.

Anyone come across these kinda error logs?

this is my error log:

E/flutter (14590): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Converting object to an encodable object failed: Instance of '_JsonDocumentReference'

E/flutter (14590): #0 _JsonStringifier.writeObject (dart:convert/json.dart:793:7)

E/flutter (14590): #1 _JsonStringifier.writeList (dart:convert/json.dart:841:7)

E/flutter (14590): #2 _JsonStringifier.writeJsonValue (dart:convert/json.dart:823:7)

E/flutter (14590): #3 _JsonStringifier.writeObject (dart:convert/json.dart:784:9)

E/flutter (14590): #4 _JsonStringifier.writeMap (dart:convert/json.dart:874:7)

E/flutter (14590): #5 _JsonStringifier.writeJsonValue (dart:convert/json.dart:829:21)

E/flutter (14590): #6 _JsonStringifier.writeObject (dart:convert/json.dart:784:9)

E/flutter (14590): #7 _JsonStringStringifier.printOn (dart:convert/json.dart:982:17)

E/flutter (14590): #8 _JsonStringStringifier.stringify (dart:convert/json.dart:967:5)

E/flutter (14590): #9 JsonEncoder.convert (dart:convert/json.dart:345:30)

E/flutter (14590): #10 JsonCodec.encode (dart:convert/json.dart:231:45)

E/flutter (14590): #11 jsonEncode (dart:convert/json.dart:114:10)

E/flutter (14590): #12 serializeParameterData (package:letsplay/backend/push_notifications/serialization_util.dart:62:70)

E/flutter (14590): #13 triggerPushNotification (package:letsplay/backend/push_notifications/push_notifications_util.dart:67:35)

E/flutter (14590): #14 EventDetailRedoneWidgetState.build.<anonymous closure>.<anonymous closure> (package:letsplay/eventdetail_redone/event_detail_redone_widget.dart:891:53)

E/flutter (14590): <asynchronous suspension>

E/flutter (14590): #15 FFButtonWidgetState.build.<anonymous closure> (package:letsplay/flutterflow/flutter_flow_widgets.dart:105:19)

E/flutter (14590): <asynchronous suspension>

1
1 reply