Open CarlosNunezMX opened 2 years ago
Hmm.. That's weird Can you check what path comes out from running the code below?
(Deno.env.get("XDG_RUNTIME_DIR") ?? Deno.env.get("TMPDIR") ?? Deno.env.get("TMP") ?? Deno.env.get("TEMP") ?? "/tmp")
And also check if there's something called discord-ipc-(number)
in that directory
Hmm.. That's weird Can you check what path comes out from running the code below?
(Deno.env.get("XDG_RUNTIME_DIR") ?? Deno.env.get("TMPDIR") ?? Deno.env.get("TMP") ?? Deno.env.get("TEMP") ?? "/tmp")
And also check if there's something called
discord-ipc-(number)
in that directory
Got same error, and there's no file/directory named like that under temp folder (tried to restart discord few times, but they don't generate it)
Hmm.. That's weird Can you check what path comes out from running the code below?
(Deno.env.get("XDG_RUNTIME_DIR") ?? Deno.env.get("TMPDIR") ?? Deno.env.get("TMP") ?? Deno.env.get("TEMP") ?? "/tmp")
And also check if there's something called
discord-ipc-(number)
in that directoryGot same error, and there's no file/directory named like that under temp folder (tried to restart discord few times, but they don't generate it)
@Preta-Crowz can you try with this? https://raw.githubusercontent.com/harmonyland/discord_rpc/not-found-patch/mod.ts
@Preta-Crowz can you try with this?
https://raw.githubusercontent.com/harmonyland/discord_rpc/not-found-patch/mod.ts
Got same error
Which OS are you on? And what directory does that expression return? Can you check what each part of it returns? Maybe there is priority issue in looking up tmpdir path.
Which OS are you on? And what directory does that expression return? Can you check what each part of it returns? Maybe there is priority issue in looking up tmpdir path.
Windows 11 21H2, C:\\Users\\preta\\AppData\\Local\\Temp
Right then the issue isn’t temp dir, Windows support is not working once again because FFI bindings are outdated. I’ll update them when I have time and release new version of deno namedpipe.
Try again with v0.3.1, it should work.
I'm getting the same error on Windows 10 22H2 w/ 0.3.1
deno run --unstable --allow-all mod.ts
C:\\Users\\Gino\\AppData\\Local\\Temp
Try again with v0.3.1, it should work.
sorry for late, it's still not working with another error
return lpBufferView.getCString();
^
at UnsafePointerView.getCString (deno:ext/ffi/00_ffi.js:117:18)
at FormatMessage (https://deno.land/x/win@0.2.0/error.ts:20:23)
at new Win32Error (https://deno.land/x/win@0.2.0/error.ts:28:23)
at unwrap (https://deno.land/x/win@0.2.0/error.ts:41:11)
at NamedPipe.write (https://deno.land/x/namedpipe@0.1.1/client.ts:78:5)
at DiscordIPC.send (https://deno.land/x/discord_rpc@0.3.1/src/conn.ts:81:27)
at https://deno.land/x/discord_rpc@0.3.1/src/conn.ts:123:12
at new Promise (<anonymous>)
at DiscordIPC.login (https://deno.land/x/discord_rpc@0.3.1/src/conn.ts:121:12)
at Client.connect (https://deno.land/x/discord_rpc@0.3.1/src/client.ts:87:20)```
seems like namedpipe is still having some issues @DjDeveloperr
I'll look into it... it somehow works fine on Windows for me
Still not working...
Can you provide the error you got? @pagoru
@DjDeveloperr I'm using Deno, when I compile it to production, the problem doesn't occur, it only occurs when I launch it on development. It happens on linux, mac and windows. Maybe a permissions thing?
RangeError: IPC ID must be between 0-9 at getIPCPath (https://deno.land/x/discord_rpc@0.3.2/src/util.ts:14:31) at findIPC (https://deno.land/x/discord_rpc@0.3.2/src/util.ts:30:16) at findIPC (https://deno.land/x/discord_rpc@0.3.2/src/util.ts:41:12) at eventLoopTick (ext:core/01_core.js:168:7) at async Function.connect (https://deno.land/x/discord_rpc@0.3.2/src/conn.ts:40:18) at async Client.connect (https://deno.land/x/discord_rpc@0.3.2/src/client.ts:85:16) at async _setActivity (file:///home/pagoru/c/voidpixel/game/app/services/src/wss/events/discord/discord-rich-presence.event.ts:30:5)
I think the cause is poor error handling. I'll update the library to show better errors as to why the IPC path could not be found.
I think the cause is poor error handling. I'll update the library to show better errors as to why the IPC path could not be found.
That's really cool, if you need help, ping me! :dancers:
@pagoru Can you try importing from latest commit i.e. https://raw.githubusercontent.com/harmonyland/discord_rpc/c68f9dde6ddad243f67d252d4409fe1117a98822/mod.ts ?
@pagoru Can you try importing from latest commit i.e. https://raw.githubusercontent.com/harmonyland/discord_rpc/c68f9dde6ddad243f67d252d4409fe1117a98822/mod.ts ?
RangeError: Tried all possible IPC paths 0-9, make sure Discord is open. It must be installed locally, not just open on a web browser. at getIPCPath (https://raw.githubusercontent.com/harmonyland/discord_rpc/c68f9dde6ddad243f67d252d4409fe1117a98822/src/util.ts:15:11) at findIPC (https://raw.githubusercontent.com/harmonyland/discord_rpc/c68f9dde6ddad243f67d252d4409fe1117a98822/src/util.ts:34:16) at findIPC (https://raw.githubusercontent.com/harmonyland/discord_rpc/c68f9dde6ddad243f67d252d4409fe1117a98822/src/util.ts:39:18) at eventLoopTick (ext:core/01_core.js:168:7) at async findIPC (https://raw.githubusercontent.com/harmonyland/discord_rpc/c68f9dde6ddad243f67d252d4409fe1117a98822/src/util.ts:39:12) at async findIPC (https://raw.githubusercontent.com/harmonyland/discord_rpc/c68f9dde6ddad243f67d252d4409fe1117a98822/src/util.ts:39:12) at async findIPC (https://raw.githubusercontent.com/harmonyland/discord_rpc/c68f9dde6ddad243f67d252d4409fe1117a98822/src/util.ts:39:12) at async findIPC (https://raw.githubusercontent.com/harmonyland/discord_rpc/c68f9dde6ddad243f67d252d4409fe1117a98822/src/util.ts:39:12) at async findIPC (https://raw.githubusercontent.com/harmonyland/discord_rpc/c68f9dde6ddad243f67d252d4409fe1117a98822/src/util.ts:39:12) at async findIPC (https://raw.githubusercontent.com/harmonyland/discord_rpc/c68f9dde6ddad243f67d252d4409fe1117a98822/src/util.ts:39:12)
That is weird. It means that the IPC path simply did not exist on your system... You're on Windows right? Edit: nvm, you seem to be on Linux from your previous error message.
What do you get when you run this expression in Deno REPL?
(Deno.env.get("XDG_RUNTIME_DIR") ?? Deno.env.get("TMPDIR") ?? Deno.env.get("TMP") ?? Deno.env.get("TEMP") ?? "/tmp")
Does the directory exist? And is there a socket called discord-ipc-{0,9}
in it?
(Deno.env.get("XDG_RUNTIME_DIR") ?? Deno.env.get("TMPDIR") ?? Deno.env.get("TMP") ?? Deno.env.get("TEMP") ?? "/tmp")
/run/user/1000
When I check the contents of the path returned by that expression on macOS,
ls -l $(deno eval -p '(Deno.env.get("XDG_RUNTIME_DIR") ?? Deno.env.get("TMPDIR") ?? Deno.env.get("TMP") ?? Deno.env.get("TEMP") ?? "/tmp")') | grep discord
I get this:
Can you check the contents?
When I start the app with all required flags that shows this errors
I give this flags
And this is the connection part