Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to browse/login #36

Open
AxelTerizaki opened this issue Dec 2, 2021 · 3 comments
Open

Unable to browse/login #36

AxelTerizaki opened this issue Dec 2, 2021 · 3 comments

Comments

@AxelTerizaki
Copy link

Hello, and thanks for your hard work on this issue, I had no idea you had made this new command tool and I'm delighted to add it to my homebridge now that I have a PS5.

However I'm running into an issue here.

I'm trying to use the login command, but on my Synology NAS, in the docker instance running homebridge and it says it's going to open a browser window for me to login, but it's not doing it obviously when I hit enter since I'm on my NAS via Putty.

So I tried to do it on my Windows machine to get the credentials.json file there, but it's not finding any PS5 with browse (it works from my Syno) and login does absolutely nothing, no prompt, etc. I ran it with --debug to try to see what's wrong :

S:\homebridge\ps5> playactor login --debug
  playactor:cli:options findDevice with: DeviceOptions {
  enableDebug: true,
  machineFriendly: false,
  dontAutoOpenUrls: false,
  searchTimeout: 30000,
  connectTimeout: 15000,
  dontAuthenticate: false,
  alwaysAuthenticate: false,
  deviceOnlyPS4: false,
  deviceOnlyPS5: false,
  localBindAddress: undefined,
  localBindPort: undefined,
  credentialsPath: undefined,
  passCode: undefined,
  deviceIp: undefined,
  deviceHostName: undefined,
  deviceHostId: undefined
} +0ms
  playactor:discovery discover( {
  pingIntervalMillis: 5000,
  timeoutMillis: 30000,
  uniqueDevices: true,
  deviceIp: undefined,
  deviceType: undefined
} ) +0ms
  playactor:discovery:udp acquire @ 0 +0ms
  playactor:discovery:udp created new socket for  { localBindAddress: undefined, localBindPort: undefined } +0ms
  playactor:discovery:udp acquire @ 0 +1ms
  playactor:discovery:udp joining existing socket for  { localBindAddress: undefined, localBindPort: undefined } +0ms
  playactor:discovery:udp send: ██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████  to  255.255.255.255 : 987 +1ms
  playactor:discovery:udp send: ██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████  to  255.255.255.255 : 9302 +1ms
  playactor:discovery:udp listening on  { address: '0.0.0.0', family: 'IPv4', port: 49858 } +2ms
  playactor:discovery sending subsequent network discovery ping +5s
  playactor:discovery:udp send: ██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████  to  255.255.255.255 : 987 +5s
  playactor:discovery:udp send: ██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████  to  255.255.255.255 : 9302 +0ms
  playactor:discovery sending subsequent network discovery ping +5s
  playactor:discovery:udp send: ██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████  to  255.255.255.255 : 987 +5s
  playactor:discovery:udp send: ██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████  to  255.255.255.255 : 9302 +0ms
  playactor:discovery sending subsequent network discovery ping +5s
  playactor:discovery:udp send: ████████████████████████████████████████████████████████████████████████████████████████████████████████████  playactor:discovery:udp send: ██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████  to  255.255.255.255 : 9302 +2ms
  playactor:discovery sending subsequent network discovery ping +5s
  playactor:discovery:udp send: ██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████  to  255.255.255.255 : 987 +5s
  playactor:discovery:udp send: ██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████  to  255.255.255.255 : 9302 +0ms
  playactor:discovery sending subsequent network discovery ping +5s
  playactor:discovery:udp send: ██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████  to  255.255.255.255 : 987 +5s
  playactor:discovery:udp send: ██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████  to  255.255.255.255 : 9302 +1ms
  playactor:discovery:udp closing udp network +5s
  playactor:discovery:udp release @ 0 +1ms
  playactor:discovery:udp closing udp network +0ms
  playactor:discovery:udp release @ 0 +0ms
Error: Unable to locate device: device (any)
    at PendingDevice.<anonymous> (C:\Users\axelt\AppData\Roaming\npm\node_modules\playactor\dist\device\pending.js:82:19)
    at Generator.next (<anonymous>)
    at fulfilled (C:\Users\axelt\AppData\Roaming\npm\node_modules\playactor\dist\device\pending.js:5:58)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

For some reason it's not letting me do it. I tried running the cmd prompt as administrator, as well as disabling Windows firewall (I don't use any antivirus other than Windows Defender)

On my Syno it finds the PS5 just fine :

/homebridge/ps5 # ./node_modules/.bin/playactor login --debug
  playactor:cli:options findDevice with: DeviceOptions {
  enableDebug: true,
  machineFriendly: false,
  dontAutoOpenUrls: false,
  searchTimeout: 30000,
  connectTimeout: 15000,
  dontAuthenticate: false,
  alwaysAuthenticate: false,
  deviceOnlyPS4: false,
  deviceOnlyPS5: false,
  localBindAddress: undefined,
  localBindPort: undefined,
  credentialsPath: undefined,
  passCode: undefined,
  deviceIp: undefined,
  deviceHostName: undefined,
  deviceHostId: undefined
} +0ms
  playactor:discovery discover( {
  pingIntervalMillis: 5000,
  timeoutMillis: 30000,
  uniqueDevices: true,
  deviceIp: undefined,
  deviceType: undefined
} ) +0ms
  playactor:discovery:udp acquire @ 0 +0ms
  playactor:discovery:udp created new socket for  { localBindAddress: undefined, localBindPort: undefined } +2ms
  playactor:discovery:udp acquire @ 0 +3ms
  playactor:discovery:udp joining existing socket for  { localBindAddress: undefined, localBindPort: undefined } +1ms
  playactor:discovery:udp send: ██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████  to  255.255.255.255 : 987 +4ms
  playactor:discovery:udp send: ██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████  to  255.255.255.255 : 9302 +2ms
  playactor:discovery:udp listening on  { address: '0.0.0.0', family: 'IPv4', port: 46090 } +11ms
  playactor:discovery:udp received device: {
  type: 'DEVICE',
  sender: { address: '192.168.0.4', family: 'IPv4', port: 9302, size: 155 },
  version: '00020020',
  data: {
    type: 'DEVICE',
    statusLine: '200 Ok',
    statusCode: '200',
    statusMessage: 'Ok',
    status: 'AWAKE',
    'host-id': '████████████',
    'host-type': 'PS5',
    'host-name': 'Erin',
    'host-request-port': '997',
    'device-discovery-protocol-version': '00030010',
    'system-version': '09090001'
  }
} +299ms
  playactor:discovery:udp received device: {
  type: 'DEVICE',
  sender: { address: '192.168.0.4', family: 'IPv4', port: 9302, size: 155 },
  version: '00030010',
  data: {
    type: 'DEVICE',
    statusLine: '200 Ok',
    statusCode: '200',
    statusMessage: 'Ok',
    status: 'AWAKE',
    'host-id': '████████████',
    'host-type': 'PS5',
    'host-name': 'Erin',
    'host-request-port': '997',
    'device-discovery-protocol-version': '00030010',
    'system-version': '09090001'
  }
} +5ms
  playactor:discovery:udp closing udp network +6ms
  playactor:discovery:udp release @ 0 +1ms
  playactor:discovery:udp closing udp network +0ms
  playactor:discovery:udp release @ 0 +1ms
  playactor:waker device {
  address: { address: '192.168.0.4', family: 'IPv4', port: 9302, size: 155 },
  hostRequestPort: 997,
  extras: {
    statusLine: '200 Ok',
    statusCode: '200',
    statusMessage: 'Ok',
    status: 'AWAKE'
  },
  discoveryVersion: '00030010',
  systemVersion: '09090001',
  id: '78C88196EBAE',
  name: 'Erin',
  status: 'AWAKE',
  type: 'PS5'
} is already awake +0ms
  playactor:credentials:disk reading credentials at /homebridge/home/.config/playactor/credentials.json +0ms
In a moment, we will attempt to open a browser window for you to login to your PSN account.
When the page shows "redirect", copy the URL from your browser's address bar and paste it here.
Hit ENTER to continue

Thanks in advance for your help.

@dhleong
Copy link
Owner

dhleong commented Dec 2, 2021

For windows, try the ps4-waker troubleshooting.

For your other device, use the --no-open-urls flag to use the CLI-only flow.

@AxelTerizaki
Copy link
Author

Thanks, I had no idea there was a --no-open-urls flag, I don't think it's referenced anywhere?

I did input the PIN displayed on my TV screen, and the PS5 said it was linked now, which is good, but playactor didn't exit and I had to ctrl+c out of it. Not sure if this is normal or anything.

Apart from that it works like a charm once that is done :)

@dhleong
Copy link
Owner

dhleong commented Dec 2, 2021

It's there in the output of playactor login --help but you're not the first person to ask about it. Could probably stand to have a better description, and maybe a wiki entry....

Ideally we could detect that playactor is running on a headless environment and default that flag to on, but haven't had the time to try to figure that out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants