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

client.download "User not exist" #50

Open
bwanlin opened this issue Aug 21, 2020 · 2 comments
Open

client.download "User not exist" #50

bwanlin opened this issue Aug 21, 2020 · 2 comments

Comments

@bwanlin
Copy link

bwanlin commented Aug 21, 2020

hi,

slsk.connect({ user: "username", pass: "password" }, (err, client) => {
    if (err) return console.log(err)
    let rawdata = fs.readFileSync("./music.json");
    let music = JSON.parse(rawdata.toString())
    console.log(music)
    if (music.length > 0) {
        console.log(music[0])
        client.download({
            file: music[0],
            path: `${__dirname}/${process.argv.slice(2).join(' - ')}`
        }, (err, data) => {
            if (err) return console.log(err)
            mm.parseFile(`${__dirname}/${process.arv.slice(2).join(' - ')}`)
            .then( metadata => {
                console.log(util.inspect(metadata, {showHidden: false, depth: null}));
            })
            .catch((err) => {
                console.error(err.message);
            });
        }) 
    }
})

i have a script search.js in nodejs that search for music and a script download.js that download music and a script python for user input and i call with subprocess search.js or download.js. all works fine except when i want to download a music i get 'user not exist' i search in your package and apparently peers == {} i don't understand the meaning so i open an issue hope u will guide me ...

@MichelPicon
Copy link

MichelPicon commented Dec 14, 2021

Hi,

I've the same problem on Debian, but I don't on Windows, did you have time to debug ?
It seems like after transferRequest, I receive a Connect To Peer (18) message on server connection on Linux, and I receive a Download Reply (41) in peer connection on Windows...

@MichelPicon
Copy link

MichelPicon commented Dec 15, 2021

Finally,

it seems that in the login method from slsk-client.js, if we call server.setWaitPort(incomingPort), provoke a PeerInit after sending TransferResponse

slsk:peer:default:i *** recv TransferRequest *** +16s
slsk:peer:default:i transferResponse: ***+2ms
slsk:peer:default:i acolyle sending TransferResponse +2s
slsk:listen:i peerInit ***, type F, token 0 +22s
slsk:i Already connected to *** +2s
slsk:i connectToPeer *** *** *** *** F +58ms
slsk:peer:file downloadPeerFile *** *** *** *** false +0ms
slsk:peer:file file socket close *** +83ms
slsk:peer:file ERROR: token *** not exist +6ms

I don't really know but if I comment the line server.setWaitPort(incomingPort), it works!

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