MarshallOfSound / Google-Play-Music-Desktop-Player-UNOFFICIAL-

A beautiful cross platform Desktop Player for Google Play Music
https://www.googleplaymusicdesktopplayer.com
MIT License
8.27k stars 767 forks source link

cast icon is not visible if target is SHIELD #2034

Closed stgarf closed 7 years ago

stgarf commented 7 years ago

re: #72 and in lieu of https://chromeunboxed.com/chromecast-support-gaining-steam-on-macos-airfoil-adds-google-cast-support/

jostrander commented 7 years ago

Chromecast support exists? Closing this as a non-issue, unless you're having a specific problem.

stgarf commented 7 years ago

@jostrander Yeap, having a specific problem then. I don't see the Cast icon anywhere.

OS: macOS 10.12

Issue Description: Unable to cast/see cast icon.

Steps to Reproduce: Use GPMDP... sorry I can't really be more specific.

debug_info.zip

MarshallOfSound commented 7 years ago

@stgarf Does the cast icon appear in Chrome on the GPM UI for you?

stgarf commented 7 years ago

@MarshallOfSound

Not as far as I can see...

screen shot 2016-12-20 at 12 47 58 am

stgarf commented 7 years ago

(I am on the network w/ my shield, my shield works... because I can cast this tab to it :)

screen shot 2016-12-20 at 12 49 05 am
MarshallOfSound commented 7 years ago

If you are on Windows install Bonjour Print Services and restart GPMDP 👍

stgarf commented 7 years ago

Sorry @MarshallOfSound, up there ^ macOS 10.12 ... and more logs or debugging you'd like?

stgarf commented 7 years ago

@MarshallOfSound any other debugging I can do?

MarshallOfSound commented 7 years ago

@stgarf SHIELD probably advertises on a different MDNS service name

Can you log all the output of running this command in the dev tools console

var browser = require('mdns').browseThemAll();
browser.on('serviceUp', function(service) {
  console.log(JSON.stringify(service));
});
browser.start();
stgarf commented 7 years ago

@MarshallOfSound sure.

In my Chrome while visiting music.google.com? If you mean in GPMDP, how do I open the dev tools console while inside it?

Also, can you re-open the bug...?

MarshallOfSound commented 7 years ago

I'm not comfortable reopening a bug that is probably a network or electron-chromecast issue

You can open the Dev tools with the stand shortcut after following these steps.

  1. Control + Shift + G
  2. Type in "DEV_MODE"
  3. Click OK
  4. Wait for app to relaunch
  5. Launch Dev tools with the normal shortcut.
stgarf commented 7 years ago

Looks like it might be the nvstream interface...

{"interfaceIndex":4,"type":{"name":"workstation","protocol":"tcp","subtypes":[]},"replyDomain":".","flags":3,"networkInterface":"en0"}
{"interfaceIndex":4,"type":{"name":"nfs","protocol":"tcp","subtypes":[]},"replyDomain":".","flags":3,"networkInterface":"en0"}
{"interfaceIndex":4,"type":{"name":"1password4","protocol":"tcp","subtypes":[]},"replyDomain":".","flags":3,"networkInterface":"en0"}
{"interfaceIndex":4,"type":{"name":"homekit","protocol":"tcp","subtypes":[]},"replyDomain":".","flags":3,"networkInterface":"en0"}
{"interfaceIndex":4,"type":{"name":"googlecast","protocol":"tcp","subtypes":[]},"replyDomain":".","flags":3,"networkInterface":"en0"}
{"interfaceIndex":4,"type":{"name":"sleep-proxy","protocol":"udp","subtypes":[]},"replyDomain":".","flags":3,"networkInterface":"en0"}
{"interfaceIndex":4,"type":{"name":"mediaremotetv","protocol":"tcp","subtypes":[]},"replyDomain":".","flags":3,"networkInterface":"en0"}
{"interfaceIndex":4,"type":{"name":"appletv-v2","protocol":"tcp","subtypes":[]},"replyDomain":".","flags":3,"networkInterface":"en0"}
{"interfaceIndex":4,"type":{"name":"touch-able","protocol":"tcp","subtypes":[]},"replyDomain":".","flags":3,"networkInterface":"en0"}
{"interfaceIndex":4,"type":{"name":"airplay","protocol":"tcp","subtypes":[]},"replyDomain":".","flags":3,"networkInterface":"en0"}
{"interfaceIndex":4,"type":{"name":"raop","protocol":"tcp","subtypes":[]},"replyDomain":".","flags":3,"networkInterface":"en0"}
{"interfaceIndex":4,"type":{"name":"spotify-connect","protocol":"tcp","subtypes":[]},"replyDomain":".","flags":3,"networkInterface":"en0"}
{"interfaceIndex":4,"type":{"name":"androidtvremote","protocol":"tcp","subtypes":[]},"replyDomain":".","flags":3,"networkInterface":"en0"}
{"interfaceIndex":4,"type":{"name":"nvstream","protocol":"tcp","subtypes":[]},"replyDomain":".","flags":3,"networkInterface":"en0"}
{"interfaceIndex":4,"type":{"name":"udisks-ssh","protocol":"tcp","subtypes":[]},"replyDomain":".","flags":2,"networkInterface":"en0"}

@MarshallOfSound Well I'd certainly rule out "network" as an issue since Chromecast from Chrome browser to the nvidia shield (and other Chromecast devices in my home) works perfect fine (whether it's YouTube or a Google Music tab, or some random web page via tab casting).

MarshallOfSound commented 7 years ago

@stgarf I wonder if it is advertising under nvstream 😕 That would be quite strange.

Just to clarify does the Chromecast button appear at all in GPMDP? I can see at least one googlecast record being broadcasted.

stgarf commented 7 years ago

@MarshallOfSound to clarify, no, the chromecast button doesn't even appear at all in GPMDP

(I can see it in my browser... here's two more screenshots, one from browser and one from GPMDP).

Google Music in Chrome Browser

GPMDP missing ChromeCast icon?

MarshallOfSound commented 7 years ago

@stgarf Being a bit picky but I can't see the Chromecast icon in the screenshot of your browser. It should appear in the GPM UI in the bottom right in between the volume and queue icons.

EDIT: To explain why that button matters, GPM decides based on the interface whether or not it can actually cast to it whereas Google Chrome will cast a tab to pretty much anything

stgarf commented 7 years ago

@MarshallOfSound yeap... sure! It's there...

screen shot 2016-12-27 at 2 21 03 am

MarshallOfSound commented 7 years ago

OK so typing this out so I can cry about the situation.

  1. It works fine in Chrome
  2. Manually scanning finds the googlecast service
  3. But the button still doesn't appear...

This is quite strange, can you jump on Gitter real quick

stgarf commented 7 years ago

We've done debugging over Gitter. Here's a summary:

Samuel Attard @MarshallOfSound Dec 27 02:37
/Applications/Google Play Music Desktop Player.app/Contents/Resources/app.asar/node_modules/node-mdns-easy/dist/browser.js:46 Error: dns service error: no such record(…)(anonymous function) @ /Applications/Google Play Music Desktop Player.app/Contents/Resources/app.asar/node_modules/node-mdns-easy/dist/browser.js:46
That seems relevent
Let me check that line

Starting an mDSN browser instance failed

var browser = require('mdns').createBrowser(require('mdns').tcp('googlecast'));
browser.on('serviceUp', function(service) {
  console.log(JSON.stringify(service));
});
browser.start();
events.js:160 Uncaught Error: dns service error: no such recordon_get_addr_info_done @ resolver_sequence_tasks.js:72MDNSService.self.watcher.callback @ mdns_service.js:18

I can properly find and resolve Chromecast instances via mDNS on my laptop:

$  dns-sd -B _googlecast._tcp
Browsing for _googlecast._tcp
DATE: ---Wed 28 Dec 2016---
14:07:00.107  ...STARTING...
Timestamp     A/R    Flags  if Domain               Service Type         Instance Name
14:07:00.108  Add        3   4 local.               _googlecast._tcp.    SHIELD-Android-TV-7e3a9a0e05b7707090805ed1091c7149
14:07:00.108  Add        2   4 local.               _googlecast._tcp.    Chromecast-c1180a60d6c72e0c855ef8904d9d6597
^C
$  dns-sd -L SHIELD-Android-TV-7e3a9a0e05b7707090805ed1091c7149 _googlecast._tcp. local.
Lookup SHIELD-Android-TV-7e3a9a0e05b7707090805ed1091c7149._googlecast._tcp..local.
DATE: ---Wed 28 Dec 2016---
14:12:28.511  ...STARTING...
14:12:28.512  SHIELD-Android-TV-7e3a9a0e05b7707090805ed1091c7149._googlecast._tcp.local. can be reached at 7e3a9a0e-05b7-7070-9080-5ed1091c7149.local.:8009 (interface 4)
 id=7e3a9a0e05b7707090805ed1091c7149 rm=39A8C42C1066FD3A ve=05 md=SHIELD\ Android\ TV ic=/setup/icon.png fn=SHIELD ca=2053 st=0 bs=FFFFFFFFFFFF rs=
^C

Added some logging to the mDNS javascript to see what's happening, e.g. i threw a console.log(hostname) into resolver_sequence_tasks.js:72

var browser = require('mdns').createBrowser(require('mdns').tcp('googlecast'));
browser.on('serviceUp', function(service) {
  console.log(JSON.stringify(service));
});
browser.start();
undefined
resolver_sequence_tasks.js:73 7e3a9a0e-05b7-7070-9080-5ed1091c7149.local. Error: dns service error: no such record(…)
events.js:160 Uncaught Error: dns service error: no such recordon_get_addr_info_done @ resolver_sequence_tasks.js:72MDNSService.self.watcher.callback @ mdns_service.js:18
resolver_sequence_tasks.js:73 c1180a60-d6c7-2e0c-855e-f8904d9d6597.local. Error: dns service error: no such record(…)
events.js:160 Uncaught Error: dns service error: no such recordon_get_addr_info_done @ resolver_sequence_tasks.js:72MDNSService.self.watcher.callback @ mdns_service.js:18
t

This does seem somewhat similar to this issue: agnat/node_mdns#181, however the "fix" in that issue doesn't work for my case. and to reiterate some other facts:

  1. It works fine in Chrome (i.e. Cast button appears)
  2. Manually scanning (via mDNS / dns-sd command line) finds the googlecast service
  3. But the button still doesn't appear within GPMDP, however
jostrander commented 7 years ago

Do you have IPv6 disabled? I think that can play into this a little. Also we may have to change the resolver sequence to the preferred resolver for mac, only on mac. Needs more testing though, and I don't have a mac to test on.

stgarf commented 7 years ago

IPv6 is enabled and working AFAICT

en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    ether 80:00:6e:c5:d4:ea
    inet6 fe80::2a:ea6d:44f7:84f%en0 prefixlen 64 secured scopeid 0x4
    inet 192.168.1.137 netmask 0xffffff00 broadcast 192.168.1.255
    nd6 options=201<PERFORMNUD,DAD>
    media: autoselect
    status: active

@jostrander Let me know what you'd like to test and I'd be happy to perform the testing... :)

MarshallOfSound commented 7 years ago

@stgarf Maybe try with IPV6 disabled?

stgarf commented 7 years ago

Disabling v6 (setting to link-local on OS X) has no effect..

nyancrimew commented 7 years ago

Maybe the title of this issue should be changed :blush: because generally casting works on osx (atleast for me it does). Seems to be a specific issue with the Shield.

MarshallOfSound commented 7 years ago

As mentioned previously I'm going to close this out as there it literally nothing I can do to fix this (and it may not even be an issue with the app rather a more likely network issue).

If you continue to have issues attempting to fix in electron-chromecast would be your best bet