Image Fetch method returns InternalError
Describe the bug
Attempting to call IDiscordImageManager::fetch will always return an DiscordResult_InternalError via callback. We then can't run get_dimensions or get_data, as these return DiscordResult_NotFetched.
Steps to reproduce Minimal reproduction project:
#include "discord_game_sdk.h"
#include <stdio.h>
#include <stdlib.h>
void fetch_callback(void *p_callback_data, enum EDiscordResult p_result, struct DiscordImageHandle p_handle)
{
printf("Result: %i\n", p_result);
}
int main(void)
{
struct IDiscordCore *core;
struct DiscordCreateParams params;
DiscordCreateParamsSetDefault(¶ms);
params.client_id = APPLICATION_ID;
params.flags = DiscordCreateFlags_Default;
enum EDiscordResult result = DiscordCreate(DISCORD_VERSION, ¶ms, &core);
printf("Initialised Discord core with result %i\n", result);
if (!result)
{
struct IDiscordImageManager *images = core->get_image_manager(core);
struct DiscordImageHandle handle = {
.type = DiscordImageType_User,
.id = 425340416531890178, // For the purpose of this test, this is my user ID.
.size = 16, // Size could be any power of 2 from 16 to 256.
};
images->fetch(images, handle, false, NULL, fetch_callback);
while (!result)
{
result = core->run_callbacks(core);
}
printf("Callbacks failed: %i", result);
core->destroy(core);
}
printf("Exiting...\n");
return result;
}
Initialised Discord core with result 0
Result: 4
Expected behavior
fetch to return DiscordResult_Ok via callback.
Implementation specifics
- Language: C
- No Engine
- Tested on both Windows and Linux
Additional context It should be noted that this worked perfectly up until recently, so it could be related to the new Discord Client updates?
Can reproduce on Unity C# via Windows x64.
InternalErrors everytime on runtime via callback.
Previously this was working fine in my project as I know of during development.
Can reproduce on Godotcord, it was working before.