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

Plugin crashes Android app #177

Closed
sarpay opened this issue May 24, 2016 · 24 comments
Closed

Plugin crashes Android app #177

sarpay opened this issue May 24, 2016 · 24 comments

Comments

@sarpay
Copy link

sarpay commented May 24, 2016

Everything was working just right until couple days back. Plugin calls like registerDevice and unregisterDevice are causing app to crash without being able to produce an exception in debug mode. (using the Visual Studio Telerik AppBuilder client). Is this a known issue? Has anyone encountered a similar problem lately? Tested on Android 6.

@Lecramed
Copy link

Yes we have the same problem!
Our app crashes on regesterDevice.
Do we have to update our plugin?

@shaders
Copy link
Contributor

shaders commented May 24, 2016

Do you have crash log from the phone console?

@named8
Copy link

named8 commented May 24, 2016

Hi, we have the same problem.
in my logacat there is this message: "FATAL EXCEPTION: IntentService[GCMRegistrationService]".

@iwantwin
Copy link

We have the same problem! I do not have any recent log messages, but we downgraded to an older version of the plugin to escape from the problems.

@shaders
Copy link
Contributor

shaders commented May 24, 2016

@iwantwin @Lecramed @sarpay @named8 Could you please provide the full logs from the device?

@named8
Copy link

named8 commented May 24, 2016

In attach a part of my LogCat
logcat.txt

@shaders
Copy link
Contributor

shaders commented May 24, 2016

05-24 17:55:58.688: E/AndroidRuntime(23600): FATAL EXCEPTION: IntentService[GCMRegistrationService]
05-24 17:55:58.688: E/AndroidRuntime(23600): Process: ***, PID: 23600
05-24 17:55:58.688: E/AndroidRuntime(23600): java.lang.IncompatibleClassChangeError: The method 'java.io.File android.support.v4.content.ContextCompat.getNoBackupFilesDir(android.content.Context)' was expected to be of type virtual but instead was found to be of type direct (declaration of 'java.lang.reflect.ArtMethod' appears in /system/framework/core-libart.jar)
05-24 17:55:58.688: E/AndroidRuntime(23600): at com.google.android.gms.iid.zzd.zzeC(Unknown Source)
05-24 17:55:58.688: E/AndroidRuntime(23600): at com.google.android.gms.iid.zzd.(Unknown Source)
05-24 17:55:58.688: E/AndroidRuntime(23600): at com.google.android.gms.iid.zzd.(Unknown Source)
05-24 17:55:58.688: E/AndroidRuntime(23600): at com.google.android.gms.iid.InstanceID.zza(Unknown Source)
05-24 17:55:58.688: E/AndroidRuntime(23600): at com.google.android.gms.iid.InstanceID.getInstance(Unknown Source)
05-24 17:55:58.688: E/AndroidRuntime(23600): at com.pushwoosh.GCMRegistrationService.register(GCMRegistrationService.java:37)
05-24 17:55:58.688: E/AndroidRuntime(23600): at com.pushwoosh.GCMRegistrationService.onHandleIntent(GCMRegistrationService.java:106)
05-24 17:55:58.688: E/AndroidRuntime(23600): at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
05-24 17:55:58.688: E/AndroidRuntime(23600): at android.os.Handler.dispatchMessage(Handler.java:102)
05-24 17:55:58.688: E/AndroidRuntime(23600): at android.os.Looper.loop(Looper.java:145)
05-24 17:55:58.688: E/AndroidRuntime(23600): at android.os.HandlerThread.run(HandlerThread.java:61)
05-24 17:55:58.688: W/ActivityManager(967): Force finishing activity 1 ***
/.MainActivity

Ok, it looks like google play services library you use is outdated :(

The Pushwoosh plugin references the latest library as per Cordova guides:
framework src="com.google.android.gms:play-services-gcm:+"

If using Intel XDK - you have to upgrade to the latest version of Intel XDK.
If using any other builder - this might happen if any other plugin has outdated Google Play Services.jar file. You have to remove google-play-services.jar references/files from other plugins.
You may ALSO need to update your Android SDK, especially Google Play Services.

Closing the thread now.

@shaders shaders closed this as completed May 24, 2016
@shaders
Copy link
Contributor

shaders commented May 24, 2016

Oh yes, you also need to update Android Support Library as per my comment above:

The plugin references the latest version of Android Support Library:
framework src="com.android.support:support-v4:+

@named8
Copy link

named8 commented May 25, 2016

Yes but I have already update the Android Support Library as you can seen in the picture.
image
I also installed Android 6.0 and 5.1

@shaders
Copy link
Contributor

shaders commented May 25, 2016

@named8 can you try the latest plugin? We've added minimum play/support library versions. This should help. Are there any other plugins you have by the way in your project which references these libraries?

@shaders shaders reopened this May 25, 2016
@shaders
Copy link
Contributor

shaders commented May 25, 2016

This is what I have:

cd platforms/android
./gradlew :dependencies

releaseApk - ## Internal use, do not manually configure ##
+--- com.google.android.gms:play-services-gcm:8.4.0
| +--- com.google.android.gms:play-services-base:8.4.0
| | --- com.google.android.gms:play-services-basement:8.4.0
| | --- com.android.support:support-v4:23.0.0 -> 23.1.0
| | --- com.android.support:support-annotations:23.1.0
| --- com.google.android.gms:play-services-measurement:8.4.0
| --- com.google.android.gms:play-services-basement:8.4.0 (
)
+--- com.google.android.gms:play-services-location:8.4.0
| +--- com.google.android.gms:play-services-base:8.4.0 ()
| --- com.google.android.gms:play-services-maps:8.4.0
| --- com.google.android.gms:play-services-base:8.4.0 (
)
+--- com.pushwoosh:pushwoosh:4.1.2
+--- com.android.support:support-v4:23.1.0 (_)
--- project :CordovaLib

@named8
Copy link

named8 commented May 25, 2016

where can I check this references?
I use cordova in the command.
Thanks

@DimanAM
Copy link
Collaborator

DimanAM commented May 25, 2016

@named8
Just run

cordova build android
cd platforms/android
./gradlew :dependencies

@named8
Copy link

named8 commented May 25, 2016

Perhaps I didn't understand, but if I run in command:

cordova build android
cd platforms/android
./gradlew :dependencies

return this message error:
"Error: Unknown platforms: cd, platforms/android, ./gradlew, :dependencies"

@named8
Copy link

named8 commented May 26, 2016

Any hint? thanks

@DimanAM
Copy link
Collaborator

DimanAM commented May 26, 2016

@named8
These 3 lines are separate commands:

cordova build android
cd platforms/android
./gradlew :dependencies

If you want to run them in one line:

cordova build android && cd platforms/android && ./gradlew :dependencies

Alternatively you can open platforms/android in Android Studio and run in Terminal:

./gradlew :dependencies

(On Windows use gradlew.bat)

@Lecramed
Copy link

I use the telerik appbuilder verified plugin
Is there a way to solve it in there?

@named8
Copy link

named8 commented May 26, 2016

I wrote your code in command:
image

but return a error message:
image

@named8
Copy link

named8 commented May 27, 2016

Please anyone can help me?
This plugin it's important for my app and now if I add it my application became unusable.
Thanks

@shaders
Copy link
Contributor

shaders commented May 27, 2016

@named8
Copy link

named8 commented May 27, 2016

@shaders thanks for your help (and your humor) but my problem with this plugin continues to exist.
I have problem only with this plugin and only after his upgrade.
I think is not possible is only dependencies problem.

@shaders
Copy link
Contributor

shaders commented May 27, 2016

The problem has been identified above. You are using different incompatible versions of Android Support V4 and Google Play Services from Android SDK.

I need the results of this gradleview command.

@named8
Copy link

named8 commented May 28, 2016

Ok thanks.
Also with the correct instructions I have problem in command. I don't know

@shaders
Copy link
Contributor

shaders commented May 30, 2016

I think this might be an issue:
Telerik-Verified-Plugins#5

I think you need to update Telerik plugin to Pushwoosh plugin. They are using old old old fork of 3.6.16

@shaders shaders closed this as completed May 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants