Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ionic error: Invalid data, chunk must be a string or buffer, not object

For the last couple of days i am trying to build and android apk file using Ionic3, Cordova and Firebase. As i am quite new to ionic i am following a specific tutorial found online that is also providing me the source code as well. The link of the tutorial is the following :https://www.youtube.com/watch?v=1wU9N7VxoS8&t=1s and is about sending push notifications to specific devices. I follow the tutorial step by step and it seems to work fine but when i am trying to build an apk file in order to run it on my android device i ma getting the following error:

(node:18268) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Invalid data, chunk must be a string or buffer, not object
(node:18268) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

I have searched and tried different methods in order to fix the bug but none of them seems to works. Can anyone please provide me with a solution?Thanks

like image 483
user3397260 Avatar asked Jul 18 '26 21:07

user3397260


1 Answers

I resolve with:

  • ionic platform rm android
  • ionic platform rm ios
  • ionic plugin rm cordova-plugin-firebase
  • ionic platform add android
  • ionic platform add ios
  • ionic plugin add cordova-plugin-firebase

Here is Github link

Ionic 3

  • ionic cordova platform rm android
  • ionic cordova platform rm ios
  • ionic cordova plugin rm cordova-plugin-firebase
  • ionic cordova platform add android
  • ionic cordova platform add ios
  • ionic cordova plugin add cordova-plugin-firebase
like image 109
Eldar Zeynalli Avatar answered Jul 21 '26 12:07

Eldar Zeynalli



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!