techaffinity / freshchat-phonegap

Freshchat sdk for phonegap
7 stars 36 forks source link

Phonegap Build Errors for freshchat-android:1.5.3 #30

Closed jasonandress closed 5 years ago

jasonandress commented 5 years ago

I'm having an issue compiling this plugin with PhoneGap Build. I compiled with no problems in mid December 2018.

Error: FAILURE: Build failed with an exception.

config.xml

When I try to add the plugin locally I also get an error: cordova plugin add https://github.com/techaffinity/freshchat-phonegap.git

Error: Failed to fetch plugin https://github.com/techaffinity/freshchat-phonegap.git via registry. Probably this is either a connection problem, or plugin spec is incorrect. Check your connection and plugin name/version/URL. Failed to get absolute path to installed module

assertdesignuk commented 5 years ago

Got the same issue here. Did a build about 8 days ago and worked fine.

Looks as through the dependencies cannot be found?

techaffinity commented 5 years ago

We will check the version Dependency for android and then update the latest SDK version.

assertdesignuk commented 5 years ago

We will check the version Dependency for android and then update the latest SDK version.

Great. Will you post here when done, so we know when we can build?

assertdesignuk commented 5 years ago

We have had to remove this from our 7 apps due to this issue.

jasonandress commented 5 years ago

This is disappointing. In the mean time I'm wasting time looking for a new provider for chat.

JOldak commented 5 years ago

I had the same problem, building on MacOS. I fixed it by installing the latest JDK.

https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

The error is coming from Java - it seems it is unable to validate the SSL certificate on jitpack.io. But the newer JDK is fine.

This version didn't work:

$ java -version
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)

This one works:

$ java -version
java version "1.8.0_201"
Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)

Good luck!

Joe

jasonandress commented 5 years ago

Thanks Joe, unfortunately I don't build on my local. I use PhoneGap build, which in theory isolates me from some things like this. But like this one it can go either way sometimes.

ktils commented 5 years ago

I'm having the same issue. I to use PhoneGap build almost everyday and one day it doesn't build anymore. Meantime I am losing money. Not cool when you're paying for a service.

JOldak commented 5 years ago

Maybe you can ask them to update their JDK!?

ktils commented 5 years ago

I tried to reach out to them many times and nada!

jasonandress commented 5 years ago

@techaffinity have you found anything? I've updated the Java version with no luck @MuthuFD @shagulameedn java -version java version "1.8.0_201" Java(TM) SE Runtime Environment (build 1.8.0_201-b09) Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)

cordova plugin add https://github.com/techaffinity/freshchat-phonegap.git Error: Failed to fetch plugin https://github.com/techaffinity/freshchat-phonegap.git via registry. Probably this is either a connection problem, or plugin spec is incorrect. Check your connection and plugin name/version/URL. Failed to get absolute path to installed module

jasonandress commented 5 years ago

@shagulameedn I noticed a new commit was made yesterday upgrading SDK to 2.2.0. I appreciate the attempt to fix it. However I'm getting a new build issue.

The handleFcmMessage is a line that was changed in the commit. Any help is appreciated.

/src/com/freshdesk/freshchat/android/freshchatPlugin.java:311: error: local variable jsonArgs is accessed from within inner class; needs to be declared final Freshchat.getInstance(cordovaContext).handleFcmMessage(cordovaContext,jsonArgs); ^ /src/com/adobe/phonegap/push/GCMIntentService.java:70: error: cannot find symbol Freshchat.getInstance(getApplicationContext()).handleGcmMessage(extras); ^ symbol: method handleGcmMessage(Bundle) location: class Freshchat

jasonandress commented 5 years ago

@shagulameedn I see you've made a new commit which fixes the first error about the final jsonArgs.

Could you give us updates here as you're making them so we can test with you?

There's still the issue with handleGcmMessage. I'm thinking the Freshchat SDK 2.2.0 doesn't have handleGcmMessage any longer, since Google is discontinuing that service in April 2019.

/src/com/adobe/phonegap/push/GCMIntentService.java:70: error: cannot find symbol Freshchat.getInstance(getApplicationContext()).handleGcmMessage(extras); ^ This is in the Freshchat Push plugin, which is not a fork of the main push plugin. I've made an issue in the Repo as well.

jasonandress commented 5 years ago

@techaffinity @MuthuFD @shagulameedn I can't seem to solve this on my own. I've tried the stock push plugin and various versions of almost everything. Let us know when this plugin is working again.

MuthuFD commented 5 years ago

@jasonandress handleGcmMessage has been removed as GCM is deprecated by Google. Please use handleFcmMessage instead.

techaffinity commented 5 years ago

@jasonandress We have added a patch to resolve the issue for Android, can you please check and see if its working for you now. Let us know your feedback

jasonandress commented 5 years ago

@techaffinity I see the update in this repo as well as your copy of phonegap-plugin-push repo. Its working again. Thank you!

We still have the issue that the push plugin that's been modified for Freshchat in techaffinity's github is very out dated and doesn't support Fcm. It was updated to call the new handleFcmMessage in the Freshchat SDK.

I can follow that issue in your other repo if you prefer and this one can be closed.