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

Image length longer than 32 characters + "ActivityType" does not exist in the current context #170

Open
FrostJonass opened this issue Feb 4, 2025 · 0 comments

Comments

@FrostJonass
Copy link

Version Info
AMWin-RP version: v1.4.8
Apple Music Version: 1.5.2.62 (1.1282.15873.0)
Apple Music region: 'PT'

Describe the bug
I cloned the project into my PC: I wanted to make some changes for the app behavior for when the tracks were from Local Files.
So as I cloned, the first thing I did was to run the application to make sure it was alright, but I had some code errors: when mapping the RichPresence object, the "Type" and the "ActivityType" methods were not recognized within the solution. (To be more specific: the errors were of the type "The name 'ActivityType' does not exist in the current context", and the same one for 'Type'.) I checked in the class, in the Entire Solution, I updated the DiscordRichPresence NuGet package (from v1.143.0 to v1.3.0.28, since it was saying that version 1.143 had "critical bugs"), but the methods were still not recognized. This is one of the issues I found.

Image

Image

But upon commenting the mapping of this "Type" method, I did manage to run the application, but it was not displaying in my Discord activity. When I checked the logs, the error was the following: "DiscordRPC.Exceptions.StringOutOfRangeException: Length of string is out of range. Expected a value with a maximum length of 32".
After some debugging, I saw that the image link trying to be added was indeed longer than expected (although it seems to work):
https://is1-ssl.mzstatic.com/image/thumb/Music221/v4/7d/4c/3b/7d4c3bdf-a33b-2985-3cf7-5aacbefb3289/25UMGIM09489.rgb.jpg/96x96bb-60.jpg

I'm sending the logs below. Has this happened before? How can I solve these 2 issues?
Note: I added a new log message, which is the one starting with [FJ].

Have the symptoms of this bug already been reported in another issue?
I haven't found these issues in the Issue list of the project.

Log Files
[18:24:36] Application started
[18:24:36] Using region pt
[18:24:36] No AMWin-RP updates available.
[18:24:37] No ListenBrainz user token found
[18:24:37] No Last.FM API key found
[18:24:38] [GetAlbumArtUrl] LastFM lookup failed, falling back to Apple Music Web
[18:24:38] [SearchSongs] HTTP GET for https://music.apple.com/pt/search?term=Wake%20Me%20Up%20Hurry%20Up%20Tomorrow%20The%20Weeknd%20%26%20Justice
[18:24:40] [SearchSongs] Request took 1375ms
[18:24:40] [SearchSongs] Caching result for Wake Me Up
[18:24:40] [SearchSongs] Using cached result for Wake Me Up
[18:24:40] Previous message repeated 1 times
[18:24:40] [FJ] amInfo.CoverArtUrl is https://is1-ssl.mzstatic.com/image/thumb/Music221/v4/7d/4c/3b/7d4c3bdf-a33b-2985-3cf7-5aacbefb3289/25UMGIM09489.rgb.jpg/96x96bb-60.jpg
[18:24:40] Couldn't set Discord RP:
DiscordRPC.Exceptions.StringOutOfRangeException: Length of string is out of range. Expected a value with a maximum length of 32
at DiscordRPC.Assets.set_LargeImageKey(String value)
at AppleMusicDiscordClient.SetPresence(AppleMusicInfo amInfo, Boolean showSmallImage, Boolean showBigImage) in [my path]\AMWin-RichPresence\AppleMusicDiscordClient.cs:line 140
[18:24:40] [Last.FM scrobbler] New Song: The Weeknd & JusticeWake Me UpHurry Up Tomorrow
[18:24:40] [Last.FM scrobbler] Updated now playing: The Weeknd & JusticeWake Me UpHurry Up Tomorrow
[18:24:40] [ListenBrainz scrobbler] New Song: The Weeknd & JusticeWake Me UpHurry Up Tomorrow
[18:24:40] [ListenBrainz scrobbler] Updated now playing: The Weeknd & JusticeWake Me UpHurry Up Tomorrow

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

No branches or pull requests

1 participant