andrehtissot / cordova-plugin-fcm-with-dependecy-updated

Google FCM Push Notifications Cordova Plugin
MIT License
210 stars 273 forks source link

working on ios simulator , but on production build app stuck on white screen after splash #232

Open MoradAbdelgaber opened 3 years ago

MoradAbdelgaber commented 3 years ago

Describe the bug app works good on ios simulator , but on build --prod app stuck on white screen after splashscreen

Expected behavior app working as simulator

Screenshots just white screen with no errors;

Environment (please complete the following information):

Package.json

{ "name": "employee-admin-2", "version": "0.0.1", "author": "Ionic Framework", "homepage": "https://ionicframework.com/", "scripts": { "ng": "ng", "start": "ng serve", "build": "ng build", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e" }, "private": true, "dependencies": { "@angular/common": "~11.2.0", "@angular/core": "~11.2.0", "@angular/forms": "~11.2.0", "@angular/platform-browser": "~11.2.0", "@angular/platform-browser-dynamic": "~11.2.0", "@angular/router": "~11.2.0", "@ionic-native/core": "^5.31.1", "@ionic-native/file": "^5.31.1", "@ionic-native/file-opener": "^5.31.1", "@ionic-native/geolocation": "^5.31.1", "@ionic-native/photo-viewer": "^5.31.1", "@ionic-native/social-sharing": "^5.31.1", "@ionic-native/splash-screen": "^5.31.1", "@ionic-native/status-bar": "^5.31.1", "@ionic/angular": "^5.5.2", "@ionic/storage": "^2.3.1", "@ngx-translate/core": "^13.0.0", "@ngx-translate/http-loader": "^6.0.0", "@types/hammerjs": "^2.0.39", "hammerjs": "^2.0.8", "html-to-pdfmake": "^2.1.5", "ion-bottom-sheet": "^2.0.6", "moment": "^2.29.1", "pdfmake": "^0.1.70", "rxjs": "~6.6.0", "tslib": "^2.0.0", "zone.js": "~0.10.2" }, "devDependencies": { "@angular-devkit/build-angular": "~0.1101.4", "@angular/cli": "~11.1.4", "@angular/compiler": "~11.2.0", "@angular/compiler-cli": "~11.2.0", "@angular/language-service": "~11.2.0", "@ionic/angular-toolkit": "^3.1.0", "@types/jasmine": "~3.6.0", "@types/jasminewd2": "~2.0.3", "@types/node": "^12.11.1", "codelyzer": "^6.0.0", "com-sarriaroman-photoviewer": "^1.2.5", "cordova-plugin-androidx": "^3.0.0", "cordova-plugin-androidx-adapter": "^1.1.3", "cordova-plugin-device": "2.0.2", "cordova-plugin-fcm-with-dependecy-updated": "^7.8.0", "cordova-plugin-file": "^6.0.2", "cordova-plugin-file-opener2": "^3.0.5", "cordova-plugin-geolocation": "^4.1.0", "cordova-plugin-ionic-keyboard": "^2.0.5", "cordova-plugin-ionic-webview": "^4.0.0", "cordova-plugin-splashscreen": "^6.0.0", "cordova-plugin-statusbar": "^2.4.3", "cordova-plugin-whitelist": "^1.3.4", "cordova-plugin-x-socialsharing": "^6.0.3", "cordova-sqlite-storage": "^5.1.0", "es6-promise-plugin": "^4.2.2", "jasmine-core": "~3.6.0", "jasmine-spec-reporter": "~5.0.0", "karma": "~5.2.0", "karma-chrome-launcher": "~3.1.0", "karma-coverage": "~2.0.3", "karma-coverage-istanbul-reporter": "~3.0.2", "karma-jasmine": "~4.0.0", "karma-jasmine-html-reporter": "^1.5.0", "protractor": "~7.0.0", "ts-node": "~8.3.0", "tslint": "~6.1.0", "typescript": "~4.0.2" }, "description": "An Ionic project", "cordova": { "plugins": { "cordova-plugin-androidx": {}, "cordova-plugin-androidx-adapter": {}, "cordova-plugin-file": {}, "cordova-plugin-file-opener2": {}, "cordova-plugin-geolocation": { "GPS_REQUIRED": "true" }, "cordova-plugin-x-socialsharing": {}, "com-sarriaroman-photoviewer": {}, "cordova-sqlite-storage": {}, "cordova-plugin-device": {}, "cordova-plugin-ionic-webview": {}, "cordova-plugin-ionic-keyboard": {}, "cordova-plugin-splashscreen": {}, "cordova-plugin-statusbar": {}, "cordova-plugin-whitelist": {}, "cordova-plugin-fcm-with-dependecy-updated": { "IOS_FIREBASE_MESSAGING_VERSION": "~> 7.4.0" } }, "platforms": ["ios"] } }

Ivan981508 commented 3 years ago

Support, similar problem!

josevavia commented 3 years ago

Same problem here :(

josevavia commented 3 years ago

This is my current ionic info:


Ionic:

   Ionic CLI                     : 5.4.16
   Ionic Framework               : @ionic/angular 5.3.3
   @angular-devkit/build-angular : 0.901.12
   @angular-devkit/schematics    : 9.1.12
   @angular/cli                  : 9.1.12
   @ionic/angular-toolkit        : 2.3.3

Cordova:

   Cordova CLI       : 10.0.0
   Cordova Platforms : ios 6.2.0
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.2.1, cordova-plugin-ionic 5.4.7, (and 14 other plugins)

Utility:

   cordova-res : 0.15.3
   native-run  : 1.3.0

System:

   ios-deploy : 1.11.4
   ios-sim    : 8.0.2
   NodeJS     : v15.10.0
   npm        : 7.5.3
   OS         : macOS Big Sur
   Xcode      : Xcode 12.4 Build version 12D4e

I checked that when I remove FCM import and provider from my app.module.ts, the applications works ok (even with --prod flag).

If I keep FCM import and provider, the app stucks on splash screen when lauchend with --prod flag

Without --prod flag everything works as expected

josevavia commented 3 years ago

If this helps anyone, I downgraded node to v14 (and npm to v6) and now everything works without problem.

I don't know what is causing the problem, but staying in node 14 seems to do the trick

FrancescoPaiola commented 2 years ago

same problem. Downgrading node did not solve the problem

josevavia commented 2 years ago

same problem. Downgrading node did not solve the problem

Hi Francesco, I recommend you to use cordova-plugin-firebasex, after a lot of headache figthing with this plugin, I migrated to https://github.com/dpa99c/cordova-plugin-firebasex and now I get notifications working with no problem