Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple "cordova plugin add" not working #638

Open
R-obert opened this issue May 1, 2020 · 2 comments
Open

Simple "cordova plugin add" not working #638

R-obert opened this issue May 1, 2020 · 2 comments

Comments

@R-obert
Copy link

R-obert commented May 1, 2020

Documentation says in order to add the plugin I should do the following:

$ cordova plugin add cordova-plugin-fcm
Installing "cordova-plugin-fcm" for android
Subproject Path: CordovaLib
Subproject Path: app

		Cordova FCM plugin v2.1.2 installed
		For more details visit https://github.com/fechanique/cordova-plugin-fcm
	
Adding cordova-plugin-fcm to package.json
The "chunk" argument must be of type string or an instance of Buffer. Received an instance of Error

This breaks cordova build android, the only output it shows is that "chunk" argument message.

@furkan6116
Copy link

dude ı'm also getting that error. did you fixed it ?

@mike-nelson
Copy link

Hi, yes there is a fix for this. It is just a couple of lines of code.

See #501

I have forked and updated the problematic file. Feel free to use this one:
https://github.com/mike-nelson/cordova-plugin-fcm.git

cordova plugin add https://github.com/mike-nelson/cordova-plugin-fcm.git

However, this didn't get me far, and I got the next error:
This project uses AndroidX dependencies, but the 'android.useAndroidX' property is not enabled

Which can be fixed using this:
cordova plugin add cordova-plugin-androidx-adapter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants