GeyserMC / GeyserDiscordBot

A bot for the GeyserMC Discord server
https://geysermc.org
MIT License
22 stars 42 forks source link

IllegalArgumentException: Cannot create file when running in docker container #273

Closed sentry-io[bot] closed 7 months ago

sentry-io[bot] commented 1 year ago

Sentry Issue: GEYSERDISCORDBOT-4G

IOException: Permission denied
    at java.io.UnixFileSystem.createFileExclusively(UnixFileSystem.java)
    at java.io.File.createNewFile(File.java:1043)
    at net.dv8tion.jda.api.entities.Message$Attachment.downloadToFile(Message.java:2492)
    at net.dv8tion.jda.api.entities.Message$Attachment.downloadToFile(Message.java:2450)
    at net.dv8tion.jda.api.entities.Message$Attachment.downloadToFile(Message.java:2411)
...
(20 additional frame(s) were not displayed)

IllegalArgumentException: Cannot create file
    at net.dv8tion.jda.api.entities.Message$Attachment.downloadToFile(Message.java:2498)
    at net.dv8tion.jda.api.entities.Message$Attachment.downloadToFile(Message.java:2450)
    at net.dv8tion.jda.api.entities.Message$Attachment.downloadToFile(Message.java:2411)
    at org.geysermc.discordbot.listeners.FileHandler.onMessageReceived(FileHandler.java:85)
    at net.dv8tion.jda.api.hooks.ListenerAdapter.onEvent(ListenerAdapter.java:424)
...
(18 additional frame(s) were not displayed)

One of the EventListeners had an uncaught exception
rtm516 commented 1 year ago

Likely just need to set a temp dir and set the correct permissions on it

rtm516 commented 7 months ago

Fixed in dda5f09