Open quocbaovu15101996 opened 2 years ago
Hi, were u able to fix this? I am having the same issue as well
I am also getting this issue any solutions ? @iheart2code @ducdung98tb
java.net.SocketException: Socket closed at libcore.io.Linux.recvfromBytes(Native Method) at libcore.io.Linux.recvfrom(Linux.java:211) at libcore.io.ForwardingOs.recvfrom(ForwardingOs.java:639) at libcore.io.BlockGuardOs.recvfrom(BlockGuardOs.java:355) at libcore.io.ForwardingOs.recvfrom(ForwardingOs.java:639) at libcore.io.IoBridge.recvfrom(IoBridge.java:753) at java.net.PlainDatagramSocketImpl.doRecv(PlainDatagramSocketImpl.java:154) at java.net.PlainDatagramSocketImpl.receive0(PlainDatagramSocketImpl.java:142) at java.net.AbstractPlainDatagramSocketImpl.receive(AbstractPlainDatagramSocketImpl.java:164) at java.net.DatagramSocket.receive(DatagramSocket.java:849) at com.connectsdk.discovery.provider.ssdp.SSDPClient.multicastReceive(SSDPClient.java:109) at com.connectsdk.discovery.provider.SSDPDiscoveryProvider$4.run(SSDPDiscoveryProvider.java:268) at java.lang.Thread.run(Thread.java:1012)
@muhammad-hamza-shahid Sorry, I am no longer a maintainer of this project, and I have not worked on it for a very long time.
Only thing I can suggest is that maybe there is something preventing the socket from opening or prematurely closing it, not in a clean way. Or you are attempting to send data while the socket is not open yet.
Can you run the Android sample app OK?
https://github.com/ConnectSDK/Connect-SDK-Android-API-Sampler
@iheart2code thanks for your response, I was running the demo app after gradle updation, unfortunately the issue was in it. I have cloned the project and added it in my project locally instead of adding it through implementation(compile) luckily issue is not in that one. I will try to make a fork if I come up with a solution or if you are willing I can create a PR to release a new version.
After setup SDK, I run init and start DiscoveryManager, but app crash with error: E/AndroidRuntime: FATAL EXCEPTION: main Process: com., PID: 4657 java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/internal/safeparcel/zza; at com.google.android.gms.cast.zzb.zzbj(Unknown Source:2) at com.google.android.gms.cast.zzb.createFromParcel(Unknown Source:0) at android.os.Parcel.readParcelable(Parcel.java:2774) at android.os.Parcel.readValue(Parcel.java:2668) at android.os.Parcel.readArrayMapInternal(Parcel.java:3037) at android.os.BaseBundle.initializeFromParcelLocked(BaseBundle.java:288) at android.os.BaseBundle.unparcel(BaseBundle.java:232) at android.os.Bundle.getParcelable(Bundle.java:940) at com.google.android.gms.cast.CastDevice.getFromBundle(Unknown Source:15) at com.connectsdk.discovery.provider.CastDiscoveryProvider$MediaRouterCallback.onRouteAdded(CastDiscoveryProvider.java:173) at androidx.mediarouter.media.MediaRouter$GlobalMediaRouter$CallbackHandler.invokeCallback(MediaRouter.java:3720) at androidx.mediarouter.media.MediaRouter$GlobalMediaRouter$CallbackHandler.handleMessage(MediaRouter.java:3660) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6746) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.common.internal.safeparcel.zza" on path: DexPathList[[zip file "/data/appcom.-jL-L_2AKgECibWu-A_39mg==/base.apk"],nativeLibraryDirectories=[/data/app/com.-jL-L_2AKgECibWu-A_39mg==/lib/arm64, /data/app/com.-jL-L_2AKgECibWu-A_39mg==/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134) at java.lang.ClassLoader.loadClass(ClassLoader.java:379) at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
any suggestions for me. Thanks