DiscordSRV

DiscordSRV

86.8k Downloads

java.lang.UnsupportedOperationException: File system access has been limited, can't process attachment.

OoLunar opened this issue · 8 comments

commented

I was attempting to upload a server jar file when I got this error. First time ever doing it, and I just upgraded to Java 11 using the debian package: openjdk-11-jre and openjdk-11-jdk. Here's the complete stack trace:

[16:55:32 ERROR]: [DiscordSRV] [JDA] One of the EventListeners had an uncaught exception
java.lang.UnsupportedOperationException: File system access has been limited, can't process attachment.
	at github.scarsz.discordsrv.listeners.DiscordConsoleListener.handleAttachment(DiscordConsoleListener.java:106)
	at github.scarsz.discordsrv.listeners.DiscordConsoleListener.onGuildMessageReceived(DiscordConsoleListener.java:65)
	at github.scarsz.discordsrv.dependencies.jda.api.hooks.ListenerAdapter.onEvent(ListenerAdapter.java:399)
	at github.scarsz.discordsrv.dependencies.jda.api.hooks.InterfacedEventManager.handle(InterfacedEventManager.java:96)
	at github.scarsz.discordsrv.dependencies.jda.internal.hooks.EventManagerProxy.handleInternally(EventManagerProxy.java:88)
	at github.scarsz.discordsrv.dependencies.jda.internal.hooks.EventManagerProxy.handle(EventManagerProxy.java:70)
	at github.scarsz.discordsrv.dependencies.jda.internal.JDAImpl.handleEvent(JDAImpl.java:149)
	at github.scarsz.discordsrv.dependencies.jda.internal.handle.MessageCreateHandler.handleInternally(MessageCreateHandler.java:97)
	at github.scarsz.discordsrv.dependencies.jda.internal.handle.SocketHandler.handle(SocketHandler.java:36)
	at github.scarsz.discordsrv.dependencies.jda.internal.requests.WebSocketClient.onDispatch(WebSocketClient.java:952)
	at github.scarsz.discordsrv.dependencies.jda.internal.requests.WebSocketClient.onEvent(WebSocketClient.java:839)
	at github.scarsz.discordsrv.dependencies.jda.internal.requests.WebSocketClient.handleEvent(WebSocketClient.java:817)
	at github.scarsz.discordsrv.dependencies.jda.internal.requests.WebSocketClient.onBinaryMessage(WebSocketClient.java:990)
	at github.scarsz.discordsrv.dependencies.ws.client.ListenerManager.callOnBinaryMessage(ListenerManager.java:385)
	at github.scarsz.discordsrv.dependencies.ws.client.ReadingThread.callOnBinaryMessage(ReadingThread.java:276)
	at github.scarsz.discordsrv.dependencies.ws.client.ReadingThread.handleBinaryFrame(ReadingThread.java:996)
	at github.scarsz.discordsrv.dependencies.ws.client.ReadingThread.handleFrame(ReadingThread.java:755)
	at github.scarsz.discordsrv.dependencies.ws.client.ReadingThread.main(ReadingThread.java:108)
	at github.scarsz.discordsrv.dependencies.ws.client.ReadingThread.runMain(ReadingThread.java:64)
	at github.scarsz.discordsrv.dependencies.ws.client.WebSocketThread.run(WebSocketThread.java:45)

Yes, correct file permissions are set. I don't believe it'd matter anyways since I'm running paper-1.16.4-339.jar as root. Is any other information needed?

commented

Isn’t an “error” per se, that means you have the LimitFS environment/property enabled which prevents uploading jars to the console channel

commented

Where can I find this property? I'm not seeing it anywhere in the config

commented

Also, perhaps we can convert the error into a warning? Maybe it's just me, but the error seems really misleading

commented

As I said, it’s an environment variable or a JRE property, not a config option

commented

OH. Pardon my ignorance

commented

Alright, I've tried searching everywhere on the Internet, only to find beginner articles. Here are the commands I've tried:

java -jar paper.jar --limitfs=false
java -DLimitFS=false -jar paper.jar
LimitFS=false java -jar paper.jar
limitfs=false java -jar paper.jar

None of these worked. What am I missing?

commented

To be clear, that being defined at all is what triggers the LimitFS limitation, setting it to false would still enable it

Also, was unaware, but plugin uploading is disabled by default now, enable it with DiscordConsoleChannelAllowPluginUpload and you should be good

commented

Currently away from my laptop, so I can't SSH in and figure it out. The config option is likely the issue though, as I don't recall editing it before hand. I'll give an update when I'm available 👍