ConnectSDK / Connect-SDK-Android-Core

Core source code for the Android Connect SDK project
Apache License 2.0
114 stars 79 forks source link

ServiceCommandError when casting a song #77

Open softvision-octaviancudalbu opened 8 years ago

softvision-octaviancudalbu commented 8 years ago

We have a casting application which uses this library to cast songs to a TV The issue we are experiencing often and quite random, is that at some point, generally when changing audio tracks, or at the beginning of a track, we get "ServiceCommandError" We use 1.6 library version I have attached the log snippet: ... 10-05 19:38:20.430 8537-8537/? E/: com.connectsdk.service.command.ServiceCommandError: Internal Server ErrorInternal Server Error 10-05 19:38:20.430 8537-8537/? E/: com.connectsdk.service.command.ServiceCommandError: Internal Server Error 10-05 19:38:20.430 8537-8537/? E/: at com.connectsdk.service.DLNAService$6.run(DLNAService.java:834) 10-05 19:38:20.430 8537-8537/? E/: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 10-05 19:38:20.430 8537-8537/? E/: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 10-05 19:38:20.430 8537-8537/? E/: at java.lang.Thread.run(Thread.java:818) ... I have investigated the matter and the error seems to be generated here, as we do not get a proper 200 response: "try { HttpConnection connection = createHttpConnection(targetURL); connection.setHeader("Content-Type", "text/xml; charset=utf-8"); connection.setHeader("SOAPAction", String.format("\"%s#%s\"", serviceURN, method)); connection.setMethod(HttpConnection.Method.POST); connection.setPayload(payload); connection.execute(); int code = connection.getResponseCode(); if (code == 200) { Util.postSuccess(command.getResponseListener(), connection.getResponseString()); } else { Util.postError(command.getResponseListener(), ServiceCommandError.getError(code)); } } catch (IOException e) { Util.postError(command.getResponseListener(), new ServiceCommandError(0, e.getMessage(), null)); }"

Could you please investigate this issue Thank you

iadnan commented 8 years ago

@softvision-octaviancudalbu Can you tell us which TV(model) are you getting this error on.

softvision-octaviancudalbu commented 8 years ago

Yes, it's a Samsung TV UE32EH5450W, but this also happened with an LG TV with LG Web OS 03.20.09

MuhammadAsad786 commented 11 months ago

is there any solution about this issue