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

Images do not show #21

Closed
Aida-Enna opened this issue Nov 10, 2017 · 15 comments
Closed

Images do not show #21

Aida-Enna opened this issue Nov 10, 2017 · 15 comments

Comments

@Aida-Enna
Copy link

Aida-Enna commented Nov 10, 2017

I'm using the example code provided in a C# project and everything is working fine except for the images, both large and small. I've uploaded them to the dashboard and am using the corresponding key (the name I gave the image, that shows up next to it post upload). I've yet to get any of the images to show.

presence.largeImageKey = "lobby";

image

image

@Chaosvex
Copy link

Chaosvex commented Nov 10, 2017

Exactly the same issue here. Restarting the client as suggested in #14 doesn't help.

Discord isn't even showing the default rich presence artwork so I'm assuming this is something on their side that needs fixed.

@Aida-Enna
Copy link
Author

Restarting both discord clients and the program didn't fix the issue, unfortunately.

@Chaosvex
Copy link

The pictures eventually decided to join the party but freshly uploaded pictures still don't work. I'm assuming there's a huge delay (6-8 hours?) on uploading pictures and actually being able to make use of them.

@YaLTeR
Copy link
Contributor

YaLTeR commented Nov 10, 2017

Same issue. I guess I'll have to wait.

@night
Copy link

night commented Nov 15, 2017

This should be fixed now.

If you're still having issues you probably have old cached data. Follow these steps to clear it:

  1. Open Discord console with ctrl + shift + I (cmd + shift + I on macOS)
  2. Go to the Network tab
  3. Toggle "Disable cache"
  4. Refresh the app with ctrl + R (cmd + R on macOS).
  5. Send rich presence containing an asset to confirm it's fixed

@night night closed this as completed Nov 15, 2017
@Aida-Enna
Copy link
Author

Just came back to this after a long break - My images are still not showing, even after doing the instructions provided by @night. Can anyone else confirm that this is fixed for them? =/

@YaLTeR
Copy link
Contributor

YaLTeR commented Dec 13, 2017

Yeah, the images showed up for me after a couple hours. No idea if anything was done about the long wait since then.

@msciotti
Copy link
Collaborator

Did you disable the cache as previously instructed? And is your app up to date?

@Aida-Enna
Copy link
Author

Yep, I disabled the cache and I tried the latest versions of Discord and Canary. Would the pictures need to be re-uploaded to work?

@msciotti
Copy link
Collaborator

They shouldn't, but as with all things programming related, it never hurts to try it lol

@DeepDoge
Copy link

The pictures eventually decided to join the party but freshly uploaded pictures still don't work. I'm assuming there's a huge delay (6-8 hours?) on uploading pictures and actually being able to make use of them.

i know this is an old thread but i need to share this because it was a pain for me

i have a personal youtube and soundcloud rpc and it uploads thumbnails automatically
i had the same problem

then realized that the page where you upload assets is using
( https://discordapp.com/api/oauth2/applications/{your app id}/assets )
to get the assets list.
it works instantly
after you upload the asset you can instantly see it on the list

BUT discord client uses
( https://discordapp.com/api/v6/oauth2/applications/{your app id}/assets )
to get the assets list
and it doesn't work instantly all the time
im not sure why

im using both.
using the first one to get a list of already uploaded assets
and using the second one to check if the asset is ready to show on rpc

@Lachee
Copy link
Contributor

Lachee commented Feb 16, 2019

uploading of images automatically is technically not supported (since its not documented anywhere) and teeechnically against the ToS. This upload delay is probably a one of the many reasons they havn't opened this endpoint to the public.

As for the V6 part of the URL, that shouldnt change anything as the default API is version 6 at the moment. The reason you can see it instantly is if you are uploading via the page, it has some JS to insert a new element into the list for you.

In short, with the intended use of Rich Presence this is a non-issue sadly.

@DeepDoge
Copy link

DeepDoge commented Feb 16, 2019

Well, v6 changing things. and as i said I'm not sure why. And JS has nothing to do with that.
I'm talking about direct HTTP requests to the API.

When you update the RPC asset key, discord client asks for an array of assets then finds the id of the asset and uses that id to create that URL ( https://cdn.discordapp.com/app-assets/{app_id}/{asset_id}.png ).

The upload request also returns you the generated id of the asset too.
So after uploading the asset, first, I tried to check if its useable by sending a request to URL above.
But it works instantly too just like ( https://discordapp.com/api/oauth2/applications/{app_id}/assets ).
(reminder I'm talking about HTTP requests)

So after uploading the picture and discord told you its "DONE", you can instantly access it from both of the URLs above. I checked it many times. The only thing that has a delay on it sometimes is v6.
Discord can't show the image because it can't get the id of the asset key because it can't find it in the array. So it can't create the png URL.
I have a few guesses but I'm not sure why it delays.

@msciotti
Copy link
Collaborator

Hey @DeepDoge - would you mind opening a separate issue for this? Just so we aren't spamming OP with GitHub notifications.

@brr53
Copy link

brr53 commented May 26, 2021

I am still having this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants