[spacemacs] Elcord in an infinite loop of connecting and disconnecting
SillyIngenuity opened this issue · comments
@SillyIngenuity I know this will happen if Discord is logged out or something because it disconnects when unauthorized. Maybe you can give more details about what's happening with Discord while this is happening? On the same subject, I'd like to see some of Discord's logs which should show if you hit ctrl-shift-i and enter the console tab. You'll probably want to reload (ctrl-r) so there isn't a ton of unnecessary information to sift through :)
@SillyIngenuity You're running the win32 version of emacs right? it's not in WSL or something strange like that?
@SillyIngenuity Looks like it, sorry... I'm not really sure why it's not working for you and I don't use Windows. Just a thought: what happens if you run powershell -NoProfile -ExecutionPolicy Bypass -Command stdpipe.ps1 . discord-ipc-0
in the elcord directory? Does it error out? It's possible that's causing issues for you. Also I guess make sure you have a working C# compiler?
@SillyIngenuity Try .\stdpipe.ps1
? (in the aforementioned command)
That means it ran successfully (stdpipe is just a way to get emacs talking to a named pipe on Windows).
@SillyIngenuity So to be clear, you're using the browser version of Discord? I don't know that I've ever tried that but I can test (also on Windows).
@Zulu-Inuoe Browser version is unsupported (impossible to support). They are using the desktop version.
Should I try installing a C# compilier as previously suggested?
@SillyIngenuity Certainly worth a shot... Sorry I can't be more help, I'm a Linux user (:
@SillyIngenuity Hm. I have never run emacs this way. Can you give me some information on how you're running this? I can try and diagnose. And I don't believe a C# compiler is necessary or will help - it looks like you were able to successfully run stdpipe.ps1 already
@Zulu-Inuoe I'm running a daemon server and then just create an instance of it. If I run emacs normally, same error occurs...
emacs --daemon
emacsclient --create-frame
For reference, I am using spacemacs, maybe elcord doesn't work on spacemacs?
Also noteworthy, @Zulu-Inuoe I made a Windows branch but unfortunately I'm not sure how to get emacs to keep the handle from CreateFile... Maybe you have a clever idea? I was thinking if I opened a buffer it might still keep the handle, but this doesn't appear to be the case. TL;DR: You can actually write to named pipes using CreateFile and normal FS operations; win32 api is wacky.
@Mstrodl That's pretty clever. I'd tried going down a similar approach by opening a process pointed at the file path of the pipe and that didn't work either. I hadn't considered using a buffer. I'll play around with that idea this weekend.
Per this issue @SillyIngenuity I can't reproduce right now. I am also running emacs 27.1 on Windows 10 x64.
I don't see Spacemacs affecting this in any way.
When I run emacs --daemon
on the command-line, the process just starts and exits. Yours seems to stay open.
Can you replicate the infinite connect/reconnect on runemacs
?
I may also have other things in my init.el that might be affecting this. I'll try with a vanilla setup to see if it behaves any differently.
@SillyIngenuity If you have a working C# compiler and still have this issue, please feel free to reopen it