Skip to content

Running Apps throw unexpected errors #2

@lsiepel

Description

@lsiepel

Working around the issue of not having a list of apps. I'm caching the apps. Just fiddling around, i found that several apps give this error. As far as i can see i cannot control this.

2023-01-04 00:59:45.470 [DEBUG] [omecast.internal.ChromecastCommander] - Failed to request media status for app: Application [appId=Netflix, displayName=Netflix, iconUrl=, isIdleScreen=false, launchedFromCloud=false, namespaces=[], sessionId=801bc1fc-c175-4233-9d72-dd69777a5f18, statusText=Netflix, universalAppId=Netflix] with message : application.getTransportId() cannot be null or blank

java.lang.IllegalArgumentException: application.getTransportId() cannot be null or blank
	at org.digitalmediaserver.cast.Util.requireNotBlank(Util.java:149) ~[?:?]
	at org.digitalmediaserver.cast.Channel.startSession(Channel.java:789) ~[?:?]
	at org.digitalmediaserver.cast.CastDevice.startSession(CastDevice.java:803) ~[?:?]
	at org.openhab.binding.chromecast.internal.ChromecastCommander.handleRefresh(ChromecastCommander.java:121) ~[?:?]
	at org.openhab.binding.chromecast.internal.handler.ChromecastHandler$Coordinator.refresh(ChromecastHandler.java:348) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) ~[?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
	at java.lang.Thread.run(Thread.java:833) [?:?]

Calling code:

runningApp = status.getRunningApplication()
Session session = chromeCast.startSession(SENDER_ID, runningApp);
MediaStatus mediaStatus = session.getMediaStatus();

Started the apps from the cast device itself and not from the sender. Could it be related to the sourceId param of startsession? I have that set to a static string SENDER_ID = "myVeryFirstCastController" :-)

Edit:
With Amazone prime i get this:

2023-01-04 01:45:37.888 [WARN ] [org.digitalmediaserver.cast.Channel ] - Error while processing JSON message from Unidentified cast device: Cannot construct instance of `org.digitalmediaserver.cast.MediaStatus`, problem: volume cannot be null
 at [Source: UNKNOWN; byte offset: #UNKNOWN]
2023-01-04 01:45:41.788 [ERROR] [org.digitalmediaserver.cast.Channel ] - Received unhandled "MEDIA_STATUS" message from Unidentified cast device, this should not happen: {"requestId":4403,"responseType":"MEDIA_STATUS","status":[{"mediaSessionId":25,"currentItemId":1,"playerState":"PLAYING","currentTime":298.566,"playbackRate":1,"supportedMediaCommands":13,"repeatMode":"REPEAT_OFF"}]}
2023-01-04 01:45:41.788 [DEBUG] [ast.internal.ChromecastEventReceiver] - Received an 'UNKNOWN' event (class=class com.fasterxml.jackson.databind.JsonNode)
2023-01-04 01:45:43.628 [ERROR] [org.digitalmediaserver.cast.Channel ] - Received unhandled "MEDIA_STATUS" message from Unidentified cast device, this should not happen: {"requestId":4364,"responseType":"MEDIA_STATUS","status":[{"mediaSessionId":25,"currentItemId":1,"playerState":"PLAYING","currentTime":300.417,"playbackRate":1,"supportedMediaCommands":13,"repeatMode":"REPEAT_OFF"}]}
2023-01-04 01:45:43.629 [DEBUG] [ast.internal.ChromecastEventReceiver] - Received an 'UNKNOWN' event (class=class com.fasterxml.jackson.databind.JsonNode)

From that i see two problems.

  1. the volume cannot be null, but it is. Does the lib assume it is not null while it it might be null form the api?
  2. something is wrong handling the "MEDIA_STATUS" message leading to a 'UNKNOWN' event in the registered eventhandler. (lib consumer)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions