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

Android Crash on startDiscovery #43

Open
basvkl opened this issue Dec 27, 2015 · 6 comments
Open

Android Crash on startDiscovery #43

basvkl opened this issue Dec 27, 2015 · 6 comments

Comments

@basvkl
Copy link

basvkl commented Dec 27, 2015

After installing the connectSDK plugin and adding the code, the android app crashes moments after startDiscovery executes.

There's no errors with installing the plugin and it works fine on my iOS app (phone and emulator) and on my android emulator.
I couldn't find anything about this message anywhere, so I hope someone can help me out with this.

This is the error I'm getting:

12-27 15:34:53.220: E/AndroidRuntime(24459): FATAL EXCEPTION: main
12-27 15:34:53.220: E/AndroidRuntime(24459): Process: com.app.ccapreview, PID: 24459
12-27 15:34:53.220: E/AndroidRuntime(24459): java.lang.NoSuchMethodError: No static method zzaj(Landroid/os/Parcel;)I in class Lcom/google/android/gms/common/internal/safeparcel/zza; or its super classes (declaration of 'com.google.android.gms.common.internal.safeparcel.zza' appears in /data/app/com.app.ccapreview-1/base.apk)
12-27 15:34:53.220: E/AndroidRuntime(24459): at com.google.android.gms.cast.zzb.zzS(Unknown Source)
12-27 15:34:53.220: E/AndroidRuntime(24459): at com.google.android.gms.cast.zzb.createFromParcel(Unknown Source)
12-27 15:34:53.220: E/AndroidRuntime(24459): at android.os.Parcel.readParcelable(Parcel.java:2252)
12-27 15:34:53.220: E/AndroidRuntime(24459): at android.os.Parcel.readValue(Parcel.java:2152)
12-27 15:34:53.220: E/AndroidRuntime(24459): at android.os.Parcel.readArrayMapInternal(Parcel.java:2485)
12-27 15:34:53.220: E/AndroidRuntime(24459): at android.os.BaseBundle.unparcel(BaseBundle.java:221)
12-27 15:34:53.220: E/AndroidRuntime(24459): at android.os.Bundle.getParcelable(Bundle.java:755)
12-27 15:34:53.220: E/AndroidRuntime(24459): at com.google.android.gms.cast.CastDevice.getFromBundle(Unknown Source)
12-27 15:34:53.220: E/AndroidRuntime(24459): at com.connectsdk.discovery.provider.CastDiscoveryProvider$MediaRouterCallback.onRouteAdded(CastDiscoveryProvider.java:173)
12-27 15:34:53.220: E/AndroidRuntime(24459): at android.support.v7.media.MediaRouter$GlobalMediaRouter$CallbackHandler.invokeCallback(MediaRouter.java:2458)
12-27 15:34:53.220: E/AndroidRuntime(24459): at android.support.v7.media.MediaRouter$GlobalMediaRouter$CallbackHandler.handleMessage(MediaRouter.java:2423)
12-27 15:34:53.220: E/AndroidRuntime(24459): at android.os.Handler.dispatchMessage(Handler.java:102)
12-27 15:34:53.220: E/AndroidRuntime(24459): at android.os.Looper.loop(Looper.java:135)
12-27 15:34:53.220: E/AndroidRuntime(24459): at android.app.ActivityThread.main(ActivityThread.java:5431)
12-27 15:34:53.220: E/AndroidRuntime(24459): at java.lang.reflect.Method.invoke(Native Method)
12-27 15:34:53.220: E/AndroidRuntime(24459): at java.lang.reflect.Method.invoke(Method.java:372)
12-27 15:34:53.220: E/AndroidRuntime(24459): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:914)
12-27 15:34:53.220: E/AndroidRuntime(24459): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:707)`

@Gioggiolo
Copy link

Same issue here. It happens when a chromecast device is discovered.
Did you find any solution/reason?

@basvkl
Copy link
Author

basvkl commented May 2, 2016

I tried for a couple hours to get past that error, but nothing seemed to have worked.
I was hoping the creators of this plugin would be able to solve this issue in time. But since you're still having this issue, it doesn't seem like it

@pliablepixels
Copy link

pliablepixels commented Jun 1, 2016

I seem to be having the same problem on Android - works fine on iOS. Anyone found a solution yet?
@ba4z - did you figure out what the problem is? I think it might have to do with gms versions.

@mtkopone
Copy link

mtkopone commented Aug 24, 2016

I have the same problem. After some investigation, I think it could be due to conflicting versions of google-play-services jars. Our project also includes cordova-plugin-google-analytics, which depends on a different version of some of the google-play-services jars. Removing the analytics plugin made my app not crash anymore.

I hope this helps others struggling with the same problem.

EDIT: I ended up forking the google analytics plugin and fixing it's version of gms jars to be what connectsdk requires. Things work now.

@pliablepixels
Copy link

Glad you got this working @mtkopone - in my case, I am not using GA at all. In recent versions of google play services, google has split up the play files into different aar files and the recommended way to add play services is via specifying build.gradle deps, which I am doing with 9.0.2+ - the only other library I use which uses gms play services is plugin push which works just fine. ConnectSDK continues to crash.

@zookz
Copy link

zookz commented Sep 27, 2016

+1 please help

seokhee-lee added a commit that referenced this issue Oct 15, 2020
This patches resolve the issues: #42, #43, #56, #57, #69, #70, #71 with
following changes:
-Fix build errors
-Remove update check process with the broken link in android-install.js
-Remove update check process with the broken link in ios-install.js
-Change media URLs in SamplerEventHandler.js
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

5 participants