fechanique / cordova-plugin-fcm

Google FCM Push Notifications Cordova Plugin
624 stars 989 forks source link

App Crashing on start #15

Open kaelmoreno-cp opened 8 years ago

kaelmoreno-cp commented 8 years ago

Whenever i launch the app in a device, it crashes. I followed the instructions, but cant seem to work. Hope you can help me with this.

aparedes commented 8 years ago

@kaelitokael you should put more information on your app. Like which platform, cordova version, cordova platform version, and what error is presented.

But it is probably that the Google Services file is missing. If its iOS make sure the GooogleServices.plist file is added to your project and for Android that the google-services.json file is added to your android root.

YegorMedvedev commented 7 years ago

+1, I have the same error on Sony Xperia Z3, Android 6.0.1 google-services.json was added in root of android project

RezaRahmati commented 7 years ago

Same issue Android 5.1 Cordova 5.4.1 GoogleServices.plist is there in platforms/android folder

Update

My problem was running on emulator, if I run on android device it works fine

Update

Now app on ios device crashes Cordova 6.3

alaamasri commented 7 years ago

Maybe You need to add your package name to the build.gradle in android root folder

defaultConfig { applicationId "Your app com.example.something here" }

Use adb logcat in the CMD to see the log and search for "caused by" to know the crash cause

andrejunqueira1 commented 7 years ago

same issue here

randbrown commented 7 years ago

Same problem with ios crashing on start. The app starts, iOS prompts to allow push notifications, then the app immediately crashes. Works on android device.
cordova@6.1.1 cordova-ios@4.1.1 cordova-plugin-fcm@1.1.4

RakeshKB commented 7 years ago

cordova : 6.3.1 Ionic Framework Version: 1.1.1 Ionic CLI Version: 1.7.16 Ionic App Lib Version: 0.7.3 ios-deploy version: 1.8.6 ios-sim version: 5.0.8 OS: Mac OS X El Capitan Node Version: v4.1.2 Xcode version: Xcode 7.3 Build version 7D175

Ionic iOS app crashes as soon as the app is started. Any help on this will be great as the app needs to be released at the earliest.

twicejr commented 7 years ago

Same here. Works fine on Android, immediate crash on iOS!

guyromb commented 7 years ago

@twicejr fixed here: https://github.com/guyromb/ionic-plugin-fcm

twicejr commented 7 years ago

@guyromb thanks. It works locally. On phonegap build however, it will give the following message:

File google-services.json is missing. The Google Services Plugin cannot function without it.

Although I have them in my root for ios/android GoogleService-Info.plist + google-services.json

twicejr commented 7 years ago

Error - Plugin error (you probably need to remove plugin files from your app): //github.com/guyromb/ionic-plugin-fcm": Fetching plugin "https://github.com/guyromb/ionic-plugin-fcm" via git clone Using shallow clone Repository "https://github.com/guyromb/ionic-plugin-fcm" checked out to git ref "master" at "832237d". Installing "cordova-plugin-fcm" at "1.1.4" for ios Error during processing of action! Attempting to revert... Failed to install 'cordova-plugin-fcm':CordovaError: Uh oh! Cannot find resource file "/private/tmp/gimlet/70293158563900/2178531/project/cordova/GoogleService-Info.plist" for plugin cordova-plugin-fcm in iOS platform at handlers.resource-file.install (/private/tmp/gimlet/70293158563900/2178531/project/cordova/lib/plugman/pluginHandlers.js:53:48) at Object.ActionStack.process (/private/tmp/gimlet/70293158563900/2178531/project/cordova/node_modules/cordova-common/src/ActionStack.js:56:25) at PluginManager.doOperation (/private/tmp/gimlet/70293158563900/2178531/project/cordova/node_modules/cordova-common/src/PluginManager.js:117:20) at PluginManager.addPlugin (/private/tmp/gimlet/70293158563900/2178531/project/cordova/node_modules/cordova-common/src/PluginManager.js:147:17) at Api.addPlugin (/private/tmp/gimlet/70293158563900/2178531/project/cordova/Api.js:219:10) at handleInstall (/usr/local/lib/node_modules/pgb-plugman/node_modules/pgb-cordova-lib/src/plugman/install.js:580:6) at /usr/local/lib/node_modules/pgb-plugman/node_modules/pgb-cordova-lib/src/plugman/install.js:384:20 at _fulfilled (/usr/local/lib/node_modules/pgb-plugman/node_modules/q/q.js:787:54) at self.promiseDispatch.done (/usr/local/lib/node_modules/pgb-plugman/node_modules/q/q.js:816:30) at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/pgb-plugman/node_modules/q/q.js:749:13) Uh oh! Cannot find resource file "/private/tmp/gimlet/70293158563900/2178531/project/cordova/GoogleService-Info.plist" for plugin cordova-plugin-fcm in iOS platform - You can fix this here

guyromb commented 7 years ago

@twicejr Well make sure that it exists in platforms/android/.. I use gulp to execute this copy for me.

LebToki commented 7 years ago

use this instead https://github.com/guyromb/cordova-plugin-fcm-plus