1.pub.dev -> firebase_message 검색
firebase_messaging: ^7.0.3
pub.dev/packages/firebase_messaging/example
샘플로 동작해보니, subscribe, unsubscribe 을 눌렀을 때 동작을 하지 않는다.
에휴. 그래서 example 페이지에서 fireflutter를 다운받았다.
다운받아서 [flutter_message] example을 실행해 보니, 아주 잘 실행되었다..
하지만. google-services.json 을 내 환경으로 변경하니
{"message":"Internal Server Error","error":"SenderId mismatch"} 에러 발생.
방법을 찾으려고 github에 올려 놓았다. 과연 방법을 찾을 수 있을지.
혹시 방법을 아시는 분은 알려주시면 사례하겠습니다..
github 문의 사항
I have compiled the following project with a sample.
Project path: ..\flutterfire\packages\firebase_messaging\firebase_messaging\example
Normal sample works normally.
Next, when the google-services.json file is changed to mine, if the following error occurs, the message will not be sent.
Please tell me how to fix it
source
final response = await http.post( 'https://api.rnfirebase.io/messaging/send', headers: <string, string="">{ 'Content-Type':'application/json; charset=UTF-8', }, body: constructFCMPayload(_token), ); print(response.request.headers.values.toString()+response.body); print('FCM request for device sent!'); </string,>
log (response)
{"message":"Internal Server Error","error":"SenderId mismatch"}
Warning: You are using these overridden dependencies:
! firebase_core 0.5.3 from path ..\flutterfire\packages\firebase_core\firebase_core
! firebase_messaging 8.0.0-dev.11 from path ..\flutterfire\packages\firebase_messaging\firebase_messaging
! firebase_messaging_platform_interface 1.0.0-dev.7 from path ..\flutterfire\packages\firebase_messaging\firebase_messaging_platform_interface