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

/friends add OFFLINEUSER causes uncaught error #29

Closed
TheDeafCreeper opened this issue Aug 10, 2023 · 1 comment · Fixed by #35
Closed

/friends add OFFLINEUSER causes uncaught error #29

TheDeafCreeper opened this issue Aug 10, 2023 · 1 comment · Fixed by #35
Labels
bug Something isn't working patched The issue has been patched and should be fixed

Comments

@TheDeafCreeper
Copy link
Contributor

When attempting to add an offline player as a friend, it causes the following error:

[23:48:19 INFO]: Exception occurred while running command for TheDeafCreeper
java.util.concurrent.CompletionException: java.lang.RuntimeException: Unable to invoke command friends add TheMuteCreeper for [connected player] TheDeafCreeper (/96.41.244.222:58703)
        at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315) ~[?:?]
        at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320) ~[?:?]
        at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1770) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:833) [?:?]
Caused by: java.lang.RuntimeException: Unable to invoke command friends add TheMuteCreeper for [connected player] TheDeafCreeper (/96.41.244.222:58703)
        at com.velocitypowered.proxy.command.VelocityCommandManager.executeImmediately0(VelocityCommandManager.java:239) ~[proxy.jar:3.2.0-SNAPSHOT (git-bda1430d-b259)]
        at com.velocitypowered.proxy.command.VelocityCommandManager.lambda$executeImmediatelyAsync$1(VelocityCommandManager.java:264) ~[proxy.jar:3.2.0-SNAPSHOT (git-bda1430d-b259)]
        at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?]
        ... 3 more
Caused by: java.lang.NullPointerException: Cannot invoke "com.velocitypowered.api.proxy.Player.getUniqueId()" because "player" is null
        at group.aelysium.rustyconnector.plugin.velocity.lib.players.FakePlayer.from(FakePlayer.java:15) ~[?:?]
        at group.aelysium.rustyconnector.plugin.velocity.lib.friends.FriendsService.areFriends(FriendsService.java:95) ~[?:?]
        at group.aelysium.rustyconnector.plugin.velocity.lib.friends.commands.CommandFriends.lambda$create$4(CommandFriends.java:84) ~[?:?]
        at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:262) ~[proxy.jar:3.2.0-SNAPSHOT (git-bda1430d-b259)]
        at com.velocitypowered.proxy.command.VelocityCommandManager.executeImmediately0(VelocityCommandManager.java:226) ~[proxy.jar:3.2.0-SNAPSHOT (git-bda1430d-b259)]
        at com.velocitypowered.proxy.command.VelocityCommandManager.lambda$executeImmediatelyAsync$1(VelocityCommandManager.java:264) ~[proxy.jar:3.2.0-SNAPSHOT (git-bda1430d-b259)]
        at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?]
        ... 3 more
@nathan-i-martin
Copy link
Contributor

iirc this is currently intended behavior because RC doesn't have any sort of longer term way of starting requests.
Even if that's the case, it should still fail gracefully, so I'll look into that.

The ability to send invites to offline players (assuming theyv e joined the network at least once) is something I can add in v0.6.1

@nathan-i-martin nathan-i-martin added the bug Something isn't working label Aug 11, 2023
nathan-i-martin added a commit that referenced this issue Aug 21, 2023
@nathan-i-martin nathan-i-martin added the patched The issue has been patched and should be fixed label Aug 21, 2023
@nathan-i-martin nathan-i-martin mentioned this issue Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working patched The issue has been patched and should be fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants