dhleong / playactor

play around with your playstation devices
146 stars 12 forks source link

playactor standby doesn't work correctly #37

Open Mastercrrown opened 2 years ago

Mastercrrown commented 2 years ago

Hello,

got Following Problem: If i start "playactor wake" the PS5 will start without problems, BUT: I have three Accounts on my PS5, so it will prompt me, on which user i want to login.

Now if i log into my user, i can't do "playactor standby". It will hang endless. The debug seems to me that it will not connect to remoteplay, personally i think it is, because another remote play was initiated ("playactor wake") from before, but finished not as espected, because of the user login.

So i must do 2-3 Times "playactor standby" that it will be recognised. It seems that the problem is with multiple accounts on PS5 and an "Unfinished Open Connection" via Remote Play.

If i started the PS5 via Controller, there is no problem to Shutdown, Because i have set Autologin to my account on PS5.

Please have a look to fix this.

Mastercrrown commented 2 years ago

Error: Registration error: 403: Forbidden: Remote is already in use at Object. (/usr/local/lib/node_modules/playactor/dist/remoteplay/protocol.js:88:19) at Generator.next () at fulfilled (/usr/local/lib/node_modules/playactor/dist/remoteplay/protocol.js:5:58)

xhemp commented 2 years ago

I have the same problem, just trying to figure out what's going on. Difference being is that sometimes it doesn't work even if I try 2 or 3 times.

bryeartem commented 2 years ago

So i just finally got around to setting this up and had issues with this error... I have 2 PS5s and ultimately after a few failed attempts from Debian 11 for both, I tried OS X and it worked, I then copied the credentials.json to my other machine and tried again.... When faced with the 403 Error restarting the PS5 seemed to immediately resolve the error (at least for me on my 2 ps5s anyway)

Mastercrrown commented 2 years ago

@dhleong I have tried to figure out the problem, sometimes it works sometimes not. It will not pass this line in protocol.js

const result = yield got_1.default(url, Object.assign(Object.assign({}, headers), {headers, decompress: false, responseType: "buffer", throwHttpErrors: false}));

in the protocol.js is also the following code above:

    if (!headers["Content-Length"] && !options.method) {
        // NOTE: We *must* specify Content-Length: 0 for GET requests,
        // or else get a 403 response for some reason
        headers["content-length"] = "0";
    }

so i personally think there is a problem with the yield got_1.default in some cases. @dhleong can you help me with the problem ?

mwilky commented 2 years ago

I get same:

Error: Registration error: 403: Forbidden: Other Error
    at Object.<anonymous> (/usr/local/lib/node_modules/playactor/dist/remoteplay/protocol.js:88:19)
    at Generator.next (<anonymous>)
    at fulfilled (/usr/local/lib/node_modules/playactor/dist/remoteplay/protocol.js:5:58)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Wake working fine

Mastercrrown commented 2 years ago

@dhleong

Hello,

i have looked into the issue again, it seems the message:

Error: Registration error: 403: Forbidden: Remote is already in use at Object. (/usr/local/lib/node_modules/playactor/dist/remoteplay/protocol.js:88:19) at Generator.next () at fulfilled (/usr/local/lib/node_modules/playactor/dist/remoteplay/protocol.js:5:58) at processTicksAndRejections (internal/process/task_queues.js:97:5)

will only occur if i boot up my ps5 and don't open any game and try to standby the ps5 via: playactor standby.

If i open a PS5 Game eg. mw2, i can after the hdmi handshake is done and the game is loading i can via: playactor standby set the ps5 to rest mode, no message appear.

It seems that the remote play session for wake up will be closed, if a game will be started !

Please have a look into @dhleong

guarddog13 commented 1 year ago

I just set this up and am having the same issue. One thing I've learned is you can't send quick wake/standby commands. You have to give it about a minute between commands or it will hang up.