{"action":"created","issue":{"url":"https://api.github.com/repos/googlecast/CastCompanionLibrary-android/issues/205","labels_url":"https://api.github.com/repos/googlecast/CastCompanionLibrary-android/issues/205/labels{/name}","comments_url":"https://api.github.com/repos/googlecast/CastCompanionLibrary-android/issues/205/comments","events_url":"https://api.github.com/repos/googlecast/CastCompanionLibrary-android/issues/205/events","html_url":"https://github.com/googlecast/CastCompanionLibrary-android/issues/205","id":104035280,"number":205,"title":"NullPointerException: Attempt to invoke virtual method 'int com.google.android.gms.cast.MediaStatus.getLoadingItemId()' on a null object reference","user":{"login":"Nimrodda","id":149684,"avatar_url":"https://avatars.githubusercontent.com/u/149684?v=3","gravatar_id":"","url":"https://api.github.com/users/Nimrodda","html_url":"https://github.com/Nimrodda","followers_url":"https://api.github.com/users/Nimrodda/followers","following_url":"https://api.github.com/users/Nimrodda/following{/other_user}","gists_url":"https://api.github.com/users/Nimrodda/gists{/gist_id}","starred_url":"https://api.github.com/users/Nimrodda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nimrodda/subscriptions","organizations_url":"https://api.github.com/users/Nimrodda/orgs","repos_url":"https://api.github.com/users/Nimrodda/repos","events_url":"https://api.github.com/users/Nimrodda/events{/privacy}","received_events_url":"https://api.github.com/users/Nimrodda/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-08-31T11:29:12Z","updated_at":"2015-09-01T11:25:54Z","closed_at":null,"body":"I'm getting the following exception everytime a video is finished and I'm in VideoCastControllerActivity.\r\nany ideas?\r\n```\r\njava.lang.NullPointerException: Attempt to invoke virtual method 'int com.google.android.gms.cast.MediaStatus.getLoadingItemId()' on a null object reference\r\n\tat com.google.android.libraries.cast.companionlibrary.cast.player.VideoCastControllerFragment.updatePlayerStatus(VideoCastControllerFragment.java:469)\r\n\tat com.google.android.libraries.cast.companionlibrary.cast.player.VideoCastControllerFragment.access$1000(VideoCastControllerFragment.java:75)\r\n\tat com.google.android.libraries.cast.companionlibrary.cast.player.VideoCastControllerFragment$MyCastConsumer.onRemoteMediaPlayerStatusUpdated(VideoCastControllerFragment.java:259)\r\n\tat com.google.android.libraries.cast.companionlibrary.cast.VideoCastManager.onRemoteMediaPlayerStatusUpdated(VideoCastManager.java:2106)\r\n\tat com.google.android.libraries.cast.companionlibrary.cast.VideoCastManager.access$200(VideoCastManager.java:138)\r\n\tat com.google.android.libraries.cast.companionlibrary.cast.VideoCastManager$22.onStatusUpdated(VideoCastManager.java:1793)\r\n\tat com.google.android.gms.cast.RemoteMediaPlayer.onStatusUpdated(Unknown Source)\r\n\tat com.google.android.gms.cast.RemoteMediaPlayer.zza(Unknown Source)\r\n\tat com.google.android.gms.cast.RemoteMediaPlayer$1.onStatusUpdated(Unknown Source)\r\n\tat com.google.android.gms.cast.internal.zzm.zza(Unknown Source)\r\n\tat com.google.android.gms.cast.internal.zzm.zzbB(Unknown Source)\r\n\tat com.google.android.gms.cast.RemoteMediaPlayer.onMessageReceived(Unknown Source)\r\n\tat com.google.android.gms.cast.internal.zze$zzb$4.run(Unknown Source)\r\n\tat android.os.Handler.handleCallback(Handler.java:739)\r\n\tat android.os.Handler.dispatchMessage(Handler.java:95)\r\n\tat android.os.Looper.loop(Looper.java:135)\r\n\tat android.app.ActivityThread.main(ActivityThread.java:5254)\r\n\tat java.lang.reflect.Method.invoke(Native Method)\r\n\tat java.lang.reflect.Method.invoke(Method.java:372)\r\n\tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)\r\n\tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)\r\n```"},"comment":{"url":"https://api.github.com/repos/googlecast/CastCompanionLibrary-android/issues/comments/136678950","html_url":"https://github.com/googlecast/CastCompanionLibrary-android/issues/205#issuecomment-136678950","issue_url":"https://api.github.com/repos/googlecast/CastCompanionLibrary-android/issues/205","id":136678950,"user":{"login":"Nimrodda","id":149684,"avatar_url":"https://avatars.githubusercontent.com/u/149684?v=3","gravatar_id":"","url":"https://api.github.com/users/Nimrodda","html_url":"https://github.com/Nimrodda","followers_url":"https://api.github.com/users/Nimrodda/followers","following_url":"https://api.github.com/users/Nimrodda/following{/other_user}","gists_url":"https://api.github.com/users/Nimrodda/gists{/gist_id}","starred_url":"https://api.github.com/users/Nimrodda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nimrodda/subscriptions","organizations_url":"https://api.github.com/users/Nimrodda/orgs","repos_url":"https://api.github.com/users/Nimrodda/repos","events_url":"https://api.github.com/users/Nimrodda/events{/privacy}","received_events_url":"https://api.github.com/users/Nimrodda/received_events","type":"User","site_admin":false},"created_at":"2015-09-01T11:25:54Z","updated_at":"2015-09-01T11:25:54Z","body":"I created an app from scratch only for the purpose of integrating CastCompanion and I get the exact same error. Please note that I followed the PDF documentation to do that, perhaps it's out-dated?\r\n\r\n```\r\nMediaMetadata mediaMetadata = new MediaMetadata();\r\n\t\t\t\tMediaInfo mediaInfo = new MediaInfo.Builder(URL)\r\n\t\t\t\t\t\t.setContentType(\"video/mp4\")\r\n\t\t\t\t\t\t.setStreamType(MediaInfo.STREAM_TYPE_BUFFERED)\r\n\t\t\t\t\t\t.setMetadata(mediaMetadata).build();\r\n\r\n\r\n\t\t\t\tBundle mediaWrapper = Utils.mediaInfoToBundle(mediaInfo);\r\n\t\t\t\tmCastManager.startVideoCastControllerActivity(v.getContext(), mediaWrapper, 0, true);\r\n```\r\n\r\nIt seems identical to what you're doing in CastVideos."}}