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

[error] Analyzing dependencies #815

Closed
JoeyHengst opened this issue Sep 21, 2018 · 10 comments
Closed

[error] Analyzing dependencies #815

JoeyHengst opened this issue Sep 21, 2018 · 10 comments

Comments

@JoeyHengst
Copy link

When trying to run the iOS project I run into the issue of Error: Sandbox not in sync with the Podfile.lock while trying to run npx cap update ios I got the following message :
[!] The 'Pods-App' target has frameworks with conflicting names: firebaseanalytics.framework, firebasecore.framework, firebaseinstanceid.framework, firebasemessaging.framework, and googleutilities.framework.

Using following package.json:

"dependencies": {
    "@angular/animations": "^6.1.7",
    "@angular/common": "~6.1.1",
    "@angular/core": "~6.1.1",
    "@angular/fire": "^5.0.0",
    "@angular/forms": "~6.1.1",
    "@angular/http": "~6.1.1",
    "@angular/platform-browser": "~6.1.1",
    "@angular/platform-browser-dynamic": "~6.1.1",
    "@angular/router": "~6.1.1",
    "@auth0/angular-jwt": "^1.0.0",
    "@capacitor/cli": "1.0.0-beta.7",
    "@capacitor/core": "1.0.0-beta.7",
    "@capacitor/ios": "^1.0.0-beta.7",
    "@ionic-native/camera": "^5.0.0-beta.20",
    "@ionic-native/core": "^5.0.0-beta.20",
    "@ionic-native/document-viewer": "^5.0.0-beta.20",
    "@ionic-native/fcm": "^5.0.0-beta.20",
    "@ionic-native/file": "^5.0.0-beta.20",
    "@ionic-native/file-opener": "^5.0.0-beta.20",
    "@ionic-native/file-transfer": "^5.0.0-beta.20",
    "@ionic-native/firebase": "^5.0.0-beta.20",
    "@ionic-native/image-picker": "^5.0.0-beta.20",
    "@ionic-native/in-app-browser": "^5.0.0-beta.20",
    "@ionic-native/keyboard": "^5.0.0-beta.20",
    "@ionic-native/ms-adal": "^5.0.0-beta.20",
    "@ionic-native/splash-screen": "^5.0.0-beta.20",
    "@ionic-native/status-bar": "^5.0.0-beta.20",
    "@ionic/angular": "4.0.0-beta.7",
    "@ionic/pro": "1.0.20",
    "@ionic/storage": "^2.1.3",
    "@microsoft/microsoft-graph-client": "^1.0.0",
    "@microsoft/microsoft-graph-types": "^1.3.0",
    "animate.css": "^3.6.1",
    "com.synconset.imagepicker": "^2.1.10",
    "cordova-android": "6.4.0",
    "cordova-browser": "5.0.3",
    "cordova-ios": "4.5.5",
    "cordova-plugin-camera": "^4.0.3",
    "cordova-plugin-compat": "^1.2.0",
    "cordova-plugin-device": "^2.0.2",
    "cordova-plugin-document-viewer": "^0.9.10",
    "cordova-plugin-fcm": "^2.1.2",
    "cordova-plugin-file": "^6.0.1",
    "cordova-plugin-file-opener2": "^2.0.19",
    "cordova-plugin-file-transfer": "^1.7.1",
    "cordova-plugin-firebase": "^2.0.2",
    "cordova-plugin-inappbrowser": "^3.0.0",
    "cordova-plugin-ionic-keyboard": "^2.1.2",
    "cordova-plugin-ionic-webview": "^2.1.4",
    "cordova-plugin-keyboard": "^1.2.0",
    "cordova-plugin-ms-adal": "^0.10.1",
    "cordova-plugin-statusbar": "^2.4.2",
    "cordova-plugin-telerik-imagepicker": "^2.1.10",
    "cordova-plugin-whitelist": "^1.3.3",
    "cordova-sqlite-storage": "^2.4.0",
    "core-js": "^2.5.3",
    "css-animator": "^2.3.0",
    "devicon": "^2.0.0",
    "firebase": "~5.5.0",
    "ionic-angular": "3.9.2",
    "ionicons": "3.0.0",
    "iso": "^5.2.0",
    "moment": "^2.22.2",
    "ng-elastic": "^1.0.0-beta.3",
    "ngx-pipes": "^2.1.7",
    "rxjs": "^6.2.2",
    "rxjs-compat": "^6.2.2",
    "zone.js": "^0.8.26"
  },
  "devDependencies": {
    "@angular-devkit/architect": "~0.7.2",
    "@angular-devkit/build-angular": "~0.7.2",
    "@angular-devkit/core": "~0.7.2",
    "@angular-devkit/schematics": "~0.7.2",
    "@angular/cli": "~6.1.1",
    "@angular/compiler": "~6.1.1",
    "@angular/compiler-cli": "~6.1.1",
    "@angular/language-service": "~6.1.1",
    "@ionic/ng-toolkit": "^1.0.0",
    "@ionic/schematics-angular": "^1.0.0",
    "@ionic/v4-migration-tslint": "^1.5.1",
    "@types/jasmine": "~2.8.6",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "~10.9.2",
    "codelyzer": "~4.4.2",
    "jasmine-core": "~2.99.1",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~3.0.0",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~2.0.0",
    "karma-jasmine": "~1.1.1",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "~5.4.0",
    "ts-node": "~7.0.0",
    "tslint": "~5.11.0",
    "typescript": "~2.9.2"
  },
  "description": "The Future Group app",
  "cordova": {
    "plugins": {
      "cordova-plugin-device": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-statusbar": {},
      "cordova-plugin-whitelist": {},
      "cordova-plugin-keyboard": {},
      "com.synconset.imagepicker": {
        "PHOTO_LIBRARY_USAGE_DESCRIPTION": "To upload profile photo"
      },
      "cordova-plugin-firebase": {},
      "cordova-plugin-camera": {},
      "cordova-plugin-ionic-keyboard": {},
      "cordova-sqlite-storage": {},
      "cordova-plugin-document-viewer": {},
      "cordova-plugin-inappbrowser": {},
      "cordova-plugin-file": {},
      "cordova-plugin-file-transfer": {},
      "cordova-plugin-file-opener2": {},
      "cordova-plugin-ionic-webview": {},
      "cordova-plugin-ms-adal": {}
    },
    "platforms": [
      "android",
      "browser",
      "ios"
    ]
  }

repro to reproduce : https://github.com/webscaledev/future-backend/tree/ionic4/futureApp

@ionut-movila
Copy link

ionut-movila commented Sep 21, 2018

I have run into a similar issue today, but when trying to install plugin cordova-plugin-firebase.

This was the first Cordova plugin to install on my project, and it added all the dependencies from capacitor-cordova-ios-plugins podspec file, including Fabric and Crashlytics frameworks, and voila the same kind of error you had..

Then if I tried to remove Fabric and Crashlytics from podfile then I don't know how to use the versions provided by with capacitor-cordova-ios-plugins in AppDelegate to init Fabric and Crashlytics.

@JoeyHengst
Copy link
Author

Indeed cordova-plugin-firebase seems to be the culprit. When I remove that I can build the app. However when I now try to run it I get :

[error] - ERROR Error: StaticInjectorError(AppModule)[AppComponent -> Platform]: 
  StaticInjectorError(Platform: core)[AppComponent -> Platform]: 
    NullInjectorError: No provider for Platform!
⚡️  [error] - ERROR CONTEXT [object Object]
⚡️  [log] - Error: StaticInjectorError(AppModule

My app.component.ts

import { Component } from "@angular/core";

import { Platform } from "@ionic/angular";
// import { SplashScreen } from "@ionic-native/splash-screen/ngx";
import { Plugins } from "@capacitor/core";
const { SplashScreen } = Plugins;

SplashScreen.hide();

import { StatusBar } from "@ionic-native/status-bar/ngx";
import { AngularFireMessaging } from "@angular/fire/messaging";

@Component({
  selector: "app-root",
  templateUrl: "app.component.html"
})
export class AppComponent {
  constructor(
    private platform: Platform,
    // private splashScreen: SplashScreen,
    private statusBar: StatusBar,
    private afMessaging: AngularFireMessaging
  ) {
    this.initializeApp();
  }

  initializeApp() {
    this.platform.ready().then(() => {
      this.statusBar.styleDefault();
      // this.splashScreen.hide();
    });
  }

  requestPermission() {
    this.afMessaging.requestToken.subscribe(
      token => {
        console.log("Permission granted! Save to the server!", token);
      },
      error => {
        console.error(error);
      }
    );
  }
}

@jcesarmobile
Copy link
Member

This is an incompatibility between cordova-plugin-firebase and cordova-plugin-fcm as both add the google/firebase frameworks as custom frameworks instead of using CocoaPods (as recommended by google).
Those frameworks have the same names and also there is a class with the same name and that causes problems.
I've modified the CLI to only copy the first framework it finds with the same name. That fixes the problem, but then cordova-plugin-firebase doesn't compile because only the cordova-plugin-fcm frameworks are copied and they are very old (2 year vs 1 month), so some methods didn't exist by then. So I won't commit that changes.

So I would suggest to remove cordova-plugin-fcm as it's frameworks are very old and doesn't seem to be maintained anymore.

@stewones
Copy link
Contributor

stewones commented Jul 5, 2019

https://github.com/stewwan/capacitor-fcm
https://github.com/stewwan/capacitor-analytics

@nasiruddin-saiyed
Copy link

https://github.com/stewwan/capacitor-fcm
https://github.com/stewwan/capacitor-analytics

Thanks a lot its working fine.

@jullicer
Copy link

Hi, is there an existing capacitor plugin for remote config?

@devidevio
Copy link

Hi, is there an existing capacitor plugin for remote config?

Yes, you can use cordova-plugin-firebasex, it works fine for me with Ionic 5 and Capacitor.

Cheers
Unkn0wn0x

@tomavic
Copy link

tomavic commented Feb 1, 2021

@Unkn0wn0x @jullicer

FirebaseX has an issue with Android build

Configure project :capacitor-cordova-android-plugins Crashlytics was applied to an android-library project. Android-library support is currently an incubating feature. Contact us capacitor ionic firebasex

please refer to #3376

@imhoffd
Copy link
Contributor

imhoffd commented Feb 2, 2021

Hi, is there an existing capacitor plugin for remote config?

There was one started, but I believe it's looking for a maintainer: https://github.com/capacitor-community/firebase-remote-config

@ionitron-bot
Copy link

ionitron-bot bot commented Nov 11, 2022

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Nov 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

9 participants