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

Assets not uploading for account with 2FA disabled #92

Closed
EmilieGonin opened this issue Nov 1, 2021 · 21 comments · Fixed by #96
Closed

Assets not uploading for account with 2FA disabled #92

EmilieGonin opened this issue Nov 1, 2021 · 21 comments · Fixed by #96
Assignees
Labels
bug Something isn't working

Comments

@EmilieGonin
Copy link

Describe the bug
I'm using the new released version of DiscordBee since yesterday and i've listened to several songs, but i've still 0 assets on Discord app. I don't have MusicBee logo neither.

To Reproduce

  1. Uninstall previous DiscordBee version
  2. Paste DiscordBee new version folder in DiscordBee Plugins folder
  3. Create Discord App named MusicBee
  4. Add Discord App ID to DiscordBee settings
  5. Tick "Upload album covers" option
  6. Listen to music for more than 15 minutes
  7. Close MusicBee to open it as admin this time
  8. Listen to music for several hours

Expected behavior
See uploaded assets on Discord App after playing songs. It shoudn't take more than 30 minutes, but even after several hours, I don't have any asset.

Screenshots
Capture

Capture2

Environment

  • MusicBee Version: 3.4.7764
  • Plugin Version: 2.0.0

Additional context

  • I'm mostly listening to japanese music, so songs titles and/or artist names includes japanese characters. But i've tried songs without any japanese characters too.
  • DiscordBee isn't considered as "Game" in my Discord activity
@HeartbeatingForCenturies

same issue for me

@sll552
Copy link
Owner

sll552 commented Nov 1, 2021

The localization of your songs should not matter as only the album cover data is parsed and uploaded. Also Musicbee does not need to be a "game" in Discords sense, as long as the presence shows up everything goes well in this regard.

Just a few things you can check if one of them resolves it:

The actual album covers wont start uploading until the base assets are available, these will be uploaded as soon as you pressed save in the settings, but as everything that is uploaded it can take a while until they are there.

  • check if you see the logo, play, pause, stop icons in the developer dashboard (under RichPresence -> Art Assets)
  • If they show up try to restart Musicbee, the presence should contain the logo and the small play/pause icons.

If they don't show up after let's say 20-30 minutes there is something wrong with the upload altogether so you can check the following things:

  • Discord with the account you used for creating the app must be running when MusicBee is started.
  • It should work with Discord Canary but i have not tested this, so if you are using Canary Discord try it with the stable/vanilla version.
  • The plugin has to read your auth token from an internal Discord database. If you installed Discord as admin this might be an issue.

@EmilieGonin
Copy link
Author

EmilieGonin commented Nov 1, 2021

I don't have any asset on my Discord App (logo, play, pause, etc.) so I guess there's something wrong with the upload. I logged out then logged in again on my Discord account, and I do have the vanilla version of Discord. I'm not sure about the installation part though, I don't remember installing Discord as admin but I can't be sure. I'll wait another 30 minutes and try this. Thank you for your prompt message !

Edit : could it be possible to have a button or else to know if the upload is working ?

@EmilieGonin
Copy link
Author

Okay so I tried to uninstall and install Discord again, I even deleted all files and config files of DiscordBee to do a clean new installation, but it still doesn't work. It seems it can't get my authToken :

01/11/2021 18:18:31 - 10.0.19043.0 - 3.4.7764.37422D - System.AggregateException: Aucune exception de tâche n'a été observée en attendant la tâche ou en accédant à sa propriété Exception. Par conséquent, l'exception non prise en charge a été à nouveau levée par le thread finaliseur. ---> System.ArgumentNullException: La valeur ne peut pas être null. Nom du paramètre : authToken à MusicBeePlugin.DiscordTools.AssetManager..ctor(String authToken, String discordAppId) à MusicBeePlugin.DiscordTools.DiscordClient.<AssetManagerInit>d__18.MoveNext() --- Fin de la trace de la pile d'exception interne --- ---> (Exception interne #0) System.ArgumentNullException: La valeur ne peut pas être null. Nom du paramètre : authToken à MusicBeePlugin.DiscordTools.AssetManager..ctor(String authToken, String discordAppId) à MusicBeePlugin.DiscordTools.DiscordClient.<AssetManagerInit>d__18.MoveNext()<---

@sll552
Copy link
Owner

sll552 commented Nov 1, 2021

Ok that helps, at least a little bit 😉

I now need a few Infos:

  • When Discord is running, please copy the commandline of the process that contains --type=crashpad-handler. You can do so by executing Get-CimInstance Win32_Process -Filter "name = 'Discord.exe'" | Select-Object CommandLine in powershell.
  • Give me a directory listing of %APPDATA%\discord\Local Storage. This can be done by exeuting tree /F $env:APPDATA'\discord\Local Storage\' in powershell

@EmilieGonin
Copy link
Author

EmilieGonin commented Nov 1, 2021

Okay here it is :)

CommandLine

C:\Users\emili\AppData\Local\Discord\app-1.0.9003\Discord.exe --type=crashpad-handler --user-data-dir=C:\Users\emili\AppData\Roaming\discord /prefetch:7 --no-rate-limit --monitor-self-annotation=ptype=crashpad-handler --database=C:\Users\emili\AppData\Roaming\discord...

Structure du dossier
Le numéro de série du volume est 00000068 4C0B:DA93

C:\USERS\EMILI\APPDATA\ROAMING\DISCORD\LOCAL STORAGE
└───leveldb
        000005.ldb
        024659.ldb
        024661.ldb
        024663.ldb
        024664.log
        024665.ldb
        CURRENT
        LOCK
        LOG
        LOG.old
        MANIFEST-000001

@usyboi
Copy link

usyboi commented Nov 1, 2021

just noitced that in placeholders it gets artwork from the mp3 file it self does that have to do with album arts not showing ??

@sll552
Copy link
Owner

sll552 commented Nov 1, 2021

Okay here it is :)

CommandLine

C:\Users\emili\AppData\Local\Discord\app-1.0.9003\Discord.exe --type=crashpad-handler --user-data-dir=C:\Users\emili\AppData\Roaming\discord /prefetch:7 --no-rate-limit --monitor-self-annotation=ptype=crashpad-handler --database=C:\Users\emili\AppData\Roaming\discord...

Structure du dossier Le numéro de série du volume est 00000068 4C0B:DA93

C:\USERS\EMILI\APPDATA\ROAMING\DISCORD\LOCAL STORAGE
└───leveldb
        000005.ldb
        024659.ldb
        024661.ldb
        024663.ldb
        024664.log
        024665.ldb
        CURRENT
        LOCK
        LOG
        LOG.old
        MANIFEST-000001

Hmm that looks like it should be working, I guess I need to add a little more debugging information to know whats actually failing.

If you like you can basically try to do everything that the plugin does manually and maybe something comes up:

  1. Go to the folder that is the --user-data-dir e.g. for you C:\Users\emili\AppData\Roaming\discord.
  2. Go further into Local Storage\leveldb.
  3. Now open every *.ldb file with the Editor (Notepad) and search for mfa. using the search function (CTRL-F).
  4. In one of those files you should find that string. It is the start of an alphanumeric (meaning characters 0-9, A-Z and _ and -). The whole string should look something like "mfa.1YsdaAS4_DS34g5y....". Do not post this string here or anywhere else, it can be used to steal your Discord account

If any of this fails thats what fails the plugin.

just noitced that in placeholders it gets artwork from the mp3 file it self does that have to do with album arts not showing ??

No that has nothing to do with the upload. The artwork data is retrieved using a MusicBee API.

@sll552 sll552 self-assigned this Nov 1, 2021
@EmilieGonin
Copy link
Author

I do find three *.ldb files but I can't find any string starting with mfa except for MFA_WARNING. :(

@sll552
Copy link
Owner

sll552 commented Nov 1, 2021

Ok then thats the problem. I guess you could try to logout and sign in again in the app.

By any chance, could it be that you have not enabled 2-factor authentication for your discord account? If so please enable it and try again

@EmilieGonin
Copy link
Author

It worked ! Thank you so much.

At first I enabled 2-factor authentication but it didn't do anything - except that DiscordBee presence wasn't working anymore. I logged out then in - I could find the mfa string and the assets are now uploaded correctly ! Unfortunetly, I won't know if the answer was to enable 2-factor authentification or just logged out from Discord app. But uninstalling Discord didn't logged me out.

Now that i've tested this new (incredible) functionality, maybe I can leave a small request. I can open a new ticket if needed.

When using auto DJ, it's possible to always generate the next x songs to play (10 by default). Would it be possible to upload these next songs album art for example ? I've a lot of songs, and i'm worried that the uploaded album arts would be constantly replaced when the limit is almost reached and never use twice : so with the upload delay, i would never be able to have my album arts displayed when listening to my songs. Or maybe is it possible to use several Discord app as album arts storage ?

@HeartbeatingForCenturies

Anyway to upload the covers manually and it read it "artist - album.jpg" instead of a random string? e.g "3edbf4ba67bfffa7801f2f9b3191e507.jpg"

@sll552
Copy link
Owner

sll552 commented Nov 2, 2021

Anyway to upload the covers manually and it read it "artist - album.jpg" instead of a random string? e.g "3edbf4ba67bfffa7801f2f9b3191e507.jpg"

No as there is a max length for the name and cutting off the string would cause duplicates. Is it still not working for you even if you enable 2FA? Please do the steps mentioned throughout this issue.

@sll552 sll552 changed the title Assets not uploading Assets not uploading for account with 2FA disabled Nov 2, 2021
@sll552 sll552 added the bug Something isn't working label Nov 2, 2021
@HeartbeatingForCenturies

Anyway to upload the covers manually and it read it "artist - album.jpg" instead of a random string? e.g "3edbf4ba67bfffa7801f2f9b3191e507.jpg"

No as there is a max length for the name and cutting off the string would cause duplicates. Is it still not working for you even if you enable 2FA? Please do the steps mentioned throughout this issue.

works for me now, 2fa was already enabled I just had to reinstall discord

@L0Lock
Copy link

L0Lock commented Nov 2, 2021

It didn't worked for me yesterday after doing everything listed above.

BUT, since then, I rebooted my computer and also reset DiscordBee to its default values, and now it works. I don't know which one did the trick, nor if it actually did. Will investigate later if I feel courageous.

@sll552
Copy link
Owner

sll552 commented Nov 2, 2021

I have a few ideas how to make this process a little more robust. But for now am adding a remark that 2FA needs to be enabled and after doing so discord might need a restart.

@L0Lock
Copy link

L0Lock commented Nov 2, 2021

Would there be a way to not need 2FA? Personally I find it quite constraining.

@sll552
Copy link
Owner

sll552 commented Nov 2, 2021

Yes, thats why this issue is still open. There will be a release with a fix for "normal" accounts asap.

@lkprod3
Copy link

lkprod3 commented Nov 7, 2021

Not sure if this is the best place to report this but I'm still having issues with getting the assets uploaded.
I've had 2FA enabled for the past year and even with the latest update, not a single asset gets uploaded to the application. I've tried following the steps you gave someone else above related to the whole .ldb file and the string mfa., and can confirm the latter is present in the files. I've tried logging out and back in both manually using the 2FA authentication, and also using the mobile QR code login; no dice. I've also tried rolling back to version 2.0 of the plugin, restoring the default tags in the DiscordBee settings, but nothing works. No matter what I do, nothing gets uploaded and the result is always the following:
Discord_vlFPY8YuW6

@sll552
Copy link
Owner

sll552 commented Nov 7, 2021

Please take a look at your Discord dev dashboard and check if the base assets are there (logo, etc.). If not check the error log (MusicBee->Help->Support->Error Log) for anything related to DiscordBee.

@lkprod3
Copy link

lkprod3 commented Nov 8, 2021

None of the assets are there; it says 0 of 300 and there's not a single image.
I've checked the error log, and there was nothing related to the plugin there either -- emptied the file then did everything I listed on the previous post again but nothing comes up on the error log still.
Tried uninstalling the plugin through the Settings -> Plugin window and then installing it again, following the configuration guide (barring the creation of another application), and have the exact same results. Genuinely no idea what I'm doing wrong here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants