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

app crashed when discord isn't opened #12

Open
rickmartensnl opened this issue Aug 3, 2018 · 3 comments
Open

app crashed when discord isn't opened #12

rickmartensnl opened this issue Aug 3, 2018 · 3 comments
Labels

Comments

@rickmartensnl
Copy link

How to fix it that the app crashes when discord isn't opened?

`IPCClient client = new IPCClient(/ID not for you/);
client.setListener(new IPCListener() {
private Minecraft mc;

			@Override
			public void onReady(IPCClient client) {
				RichPresence.Builder builder = new RichPresence.Builder();
				builder.setState("Versie: " + getMinecraft().getVersion())
						.setDetails("Naam: " + getMinecraft().getSession().getUsername())
						.setStartTimestamp(OffsetDateTime.now())
						.setLargeImage("monkey-logo", "Client Side Anicheat");
				client.sendRichPresence(builder.build());
			}
		});
		try {
			client.connect();
		} catch (NoDiscordClientException e) {
			e.printStackTrace();
		}`
@rickmartensnl
Copy link
Author

rickmartensnl commented Aug 3, 2018

IPCClient client = new IPCClient(Not for you);
client.setListener(new IPCListener() {
private Minecraft mc;

			@Override
			public void onReady(IPCClient client) {
				RichPresence.Builder builder = new RichPresence.Builder();
				builder.setState("Versie: " + getMinecraft().getVersion())
						.setDetails("Naam: " + getMinecraft().getSession().getUsername())
						.setStartTimestamp(OffsetDateTime.now())
						.setLargeImage("monkey-logo", "Client Side Anicheat");
				client.sendRichPresence(builder.build());
			}
		});
		try {
			client.connect();
		} catch (NoDiscordClientException e) {
			e.printStackTrace();
		}

@jagrosh
Copy link
Owner

jagrosh commented Aug 3, 2018

Please provide debug logs of the exception, as well as a hastebin or link to the full code if possible.

@rickmartensnl
Copy link
Author

java.lang.RuntimeException: org.newsclub.net.unix.AFUNIXSocketException: Connection refused (socket: /private/var/folders/s8/gdj6mr5x6zx0nhdnl35gvcs40000gp/T/discord-ipc-0)
at com.jagrosh.discordipc.entities.pipe.Pipe.createPipe(Pipe.java:167)
at com.jagrosh.discordipc.entities.pipe.Pipe.openPipe(Pipe.java:67)
at com.jagrosh.discordipc.IPCClient.connect(IPCClient.java:116)
at net.minecrafthydra.HydraClient.RunDiscordRPC(HydraClient.java:53)
at net.minecrafthydra.HydraClient.StartClient(HydraClient.java:26)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:564)
at net.minecraft.client.Minecraft.run(Minecraft.java:401)
at net.minecraft.client.main.Main.main(Main.java:113)
at Start.main(Start.java:11)
Caused by: org.newsclub.net.unix.AFUNIXSocketException: Connection refused (socket: /private/var/folders/s8/gdj6mr5x6zx0nhdnl35gvcs40000gp/T/discord-ipc-0)
at org.newsclub.net.unix.NativeUnixSocket.connect(Native Method)
at org.newsclub.net.unix.AFUNIXSocketImpl.connect(AFUNIXSocketImpl.java:136)
at org.newsclub.net.unix.AFUNIXSocket.connect(AFUNIXSocket.java:107)
at org.newsclub.net.unix.AFUNIXSocket.connect(AFUNIXSocket.java:98)
at com.jagrosh.discordipc.entities.pipe.UnixPipe.(UnixPipe.java:46)
at com.jagrosh.discordipc.entities.pipe.Pipe.createPipe(Pipe.java:163)
... 8 more

A detailed walkthrough of the error, its code path and all known details is as follows:

-- Head --
Stacktrace:
at com.jagrosh.discordipc.entities.pipe.Pipe.createPipe(Pipe.java:167)
at com.jagrosh.discordipc.entities.pipe.Pipe.openPipe(Pipe.java:67)
at com.jagrosh.discordipc.IPCClient.connect(IPCClient.java:116)
at net.minecrafthydra.HydraClient.RunDiscordRPC(HydraClient.java:53)
at net.minecrafthydra.HydraClient.StartClient(HydraClient.java:26)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:564)

-- Initialization --
Details:
Stacktrace:
at net.minecraft.client.Minecraft.run(Minecraft.java:401)
at net.minecraft.client.main.Main.main(Main.java:113)
at Start.main(Start.java:11)

@jagrosh jagrosh added the bug label Nov 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants