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

bug: cordova-plugin-intercom 10.2.0 fails to compile for Android with Capacitor 3 #5108

Closed
abesiemsen opened this issue Oct 7, 2021 · 7 comments
Labels
needs reproduction needs reproducible example to illustrate the issue platform: android

Comments

@abesiemsen
Copy link

abesiemsen commented Oct 7, 2021

Bug Report

Please note that while the steps to reproduce are identical to closed issue #5019, the fix implemented in #5019 does not actually result in a successful build, it just reveals a different error.

Capacitor Version

💊   Capacitor Doctor  💊 

Latest Dependencies:

  @capacitor/cli: 3.2.4
  @capacitor/core: unknown
  @capacitor/android: 3.2.4
  @capacitor/ios: 3.2.4

Installed Dependencies:

  @capacitor/ios: not installed
  @capacitor/cli: 3.2.4
  @capacitor/android: 3.2.4
  @capacitor/core: 3.2.4

[success] Android looking great! 👌

Platform(s)

Android

Current Behavior

A blank Ionic project compiles correctly, until cordova-plugin-intercom is added. Then the build in Android Studio fails with error message noted below.

Steps to reproduce:

Create a new Ionic project with ionic start, using the 'blank' app template.
Add the android platform: ionic cap add android.
Sync, ionic cap sync, open ionic cap open android, and build in Android Studio, it is successful.

Now, install cordova-plugin-intercom, per https://ionicframework.com/docs/native/intercom.

npm install cordova-plugin-intercom
npm install @ionic-native/intercom
ionic cap sync

Now in Android Studio, the build fails:

A problem occurred configuring project ':capacitor-cordova-android-plugins'.
> com.android.builder.errors.EvalIssueException: Library projects cannot set applicationId. applicationId is set to 'capacitor.android.plugins' in default config.

Expected Behavior

I expect a successful build.

Granted, this is almost certainly an issue with cordova-plugin-intercom, but this page suggests letting you know when a cordova plugin is incompatible... so you're welcome? 😉

Code Reproduction

https://github.com/abesiemsen/cordova-plugin-intercom-fails

Other Technical Details

npm --version output: 6.14.15

node --version output: v14.18.0

ionic info output:

Ionic:

   Ionic CLI                     : 6.17.1 (/usr/local/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 5.8.2
   @angular-devkit/build-angular : 12.1.4
   @angular-devkit/schematics    : 12.1.4
   @angular/cli                  : 12.1.4
   @ionic/angular-toolkit        : 4.0.0

Capacitor:

   Capacitor CLI      : 3.2.4
   @capacitor/android : 3.2.4
   @capacitor/core    : 3.2.4
   @capacitor/ios     : not installed

Utility:

   cordova-res : not installed globally
   native-run  : 1.4.1

System:

   NodeJS : v14.18.0 (/usr/local/Cellar/node@14/14.18.0_1/bin/node)
   npm    : 6.14.15
   OS     : macOS Big Sur
@Ionitron Ionitron added platform: android needs reproduction needs reproducible example to illustrate the issue labels Oct 7, 2021
@Ionitron
Copy link
Collaborator

Ionitron commented Oct 7, 2021

This issue may need more information before it can be addressed. In particular, it will need a reliable Code Reproduction that demonstrates the issue.

Please see the Contributing Guide for how to create a Code Reproduction.

Thanks!
Ionitron 💙

@Ionitron Ionitron added the needs reply needs reply from the user label Oct 7, 2021
@abesiemsen
Copy link
Author

Code reproduction added to original post, also here:
https://github.com/abesiemsen/cordova-plugin-intercom-fails

@Ionitron Ionitron removed the needs reply needs reply from the user label Oct 7, 2021
@jcesarmobile
Copy link
Member

Last time you reported a cordova-plugin-intercom issue, I tried it in a Cordova app and didn't work there neither.
I tried to report the issue to intercom support on twitter and they told me to use their site chat tool to report the issue. I did that too and didn't get too far because I'm not a paid customer.

That being said, you can workaround your current issue by removing line 8 of build-extras-intercom.gradle (android.defaultConfig.applicationId manifest.@package.text()). They added that in the past because of a bug in cordova-android < 5.4, but it's not needed anymore and causes issues.
But you will probably hit another issue since the plugin doesn't work on Cordova at the moment.

@abesiemsen
Copy link
Author

@jcesarmobile, I was actually able to build successfully with your suggested modification. I'll see if I can get further with Intercom (my client is a paying customer) to initiate an official fix.

Thank you, I really appreciate your investigation and response!

@jcesarmobile
Copy link
Member

glad it worked

BTW, there is a community intercom plugin for Capacitor
https://github.com/capacitor-community/intercom

@vokamut
Copy link

vokamut commented Oct 25, 2022

My fix: #2511 (comment)

@ionitron-bot
Copy link

ionitron-bot bot commented Nov 24, 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 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs reproduction needs reproducible example to illustrate the issue platform: android
Projects
None yet
Development

No branches or pull requests

4 participants