discordjs / RPC

A simple RPC client for Discord
MIT License
474 stars 192 forks source link

Invalid Client ID #37

Closed jamesxsc closed 6 years ago

jamesxsc commented 6 years ago

Im getting an error saying invalid client id, code 4000

devsnek commented 6 years ago

your client id is invalid

jamesxsc commented 6 years ago

@devsnek My ID is not invalid, I have checked multiple times. My code is here: https://github.com/615283/roon-discord-rp/blob/master/roon-discord-rp.js

BigBrainAFK commented 6 years ago

The clientid is def invalid. be it by missing digits or it being your own id.

jamesxsc commented 6 years ago

It is definitely not

jamesxsc commented 6 years ago

Someone else had the same problem and blamed some dependency issue.

devsnek commented 6 years ago

I haven't released the update where clientId is part of the options object yet...

jamesxsc commented 6 years ago

What do you mean?

devsnek commented 6 years ago

@615283 rpc.login(clientId, { scopes }).catch(console.error);

jamesxsc commented 6 years ago

Now getting

(node:14688) UnhandledPromiseRejectionWarning: Error: Could not connect at Socket.onerror (C:\Users\james\WebstormProjects\roon-discord-rp\node_modules\discord-rpc\src\transports\IPC.js:32:16) at Object.onceWrapper (events.js:315:30) at emitOne (events.js:116:13) at Socket.emit (events.js:211:7) at emitErrorNT (internal/streams/destroy.js:64:8) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickCallback (internal/process/next_tick.js:180:9) (node:14688) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:14688) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. @devsnek

shikhir-arora commented 6 years ago

Is your Discord client open when you're running that?

jamesxsc commented 6 years ago

No oops...

jamesxsc commented 6 years ago

HOW do I add a redirect URL in my code when I login?

hker9527 commented 6 years ago

The problem exists in current version 3.0.0 too. Falling back to 3.0.0-beta.12 solved my problem.

FYI, the error message is { code: 4000, message: 'No Client ID Specified' }