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

Error when trying to play #80

Open
Saidas25 opened this issue Nov 4, 2024 · 8 comments
Open

Error when trying to play #80

Saidas25 opened this issue Nov 4, 2024 · 8 comments

Comments

@Saidas25
Copy link

Saidas25 commented Nov 4, 2024

Tried downloading many different mp3 files, other players tried too, all we get is "An error has occurred while trying to play this disc."
Console log:

[17:35:03] [AudioPlayerThread/WARN]: javax.sound.sampled.UnsupportedAudioFileException: not a MPEG stream:Cannot invoke "javazoom.jl.decoder.Header.version()" because "m_header" is null
[17:35:03] [AudioPlayerThread/WARN]: at custom-discs-3.0.jar//javazoom.spi.mpeg.sampled.file.MpegAudioFileReader.getAudioFileFormat(MpegAudioFileReader.java:449)
[17:35:03] [AudioPlayerThread/WARN]: at custom-discs-3.0.jar//org.tritonus.share.sampled.file.TAudioFileReader.getAudioInputStream(TAudioFileReader.java:387)
[17:35:03] [AudioPlayerThread/WARN]: at custom-discs-3.0.jar//org.tritonus.share.sampled.file.TAudioFileReader.getAudioInputStream(TAudioFileReader.java:329)
[17:35:03] [AudioPlayerThread/WARN]: at custom-discs-3.0.jar//javazoom.spi.mpeg.sampled.file.MpegAudioFileReader.getAudioInputStream(MpegAudioFileReader.java:583)
[17:35:03] [AudioPlayerThread/WARN]: at custom-discs-3.0.jar//javazoom.spi.mpeg.sampled.file.MpegAudioFileReader.getAudioInputStream(MpegAudioFileReader.java:493)
[17:35:03] [AudioPlayerThread/WARN]: at custom-discs-3.0.jar//me.Navoei.customdiscsplugin.PlayerManager.convertFormat(PlayerManager.java:134)
[17:35:03] [AudioPlayerThread/WARN]: at custom-discs-3.0.jar//me.Navoei.customdiscsplugin.PlayerManager.readSoundFile(PlayerManager.java:123)
[17:35:03] [AudioPlayerThread/WARN]: at custom-discs-3.0.jar//me.Navoei.customdiscsplugin.PlayerManager.playChannel(PlayerManager.java:107)
[17:35:03] [AudioPlayerThread/WARN]: at custom-discs-3.0.jar//me.Navoei.customdiscsplugin.PlayerManager.lambda$playLocationalAudio$4(PlayerManager.java:73)
[17:35:03] [AudioPlayerThread/WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
[17:35:03] [AudioPlayerThread/WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
[17:35:03] [AudioPlayerThread/WARN]: at java.base/java.lang.Thread.run(Thread.java:1583)
@Saidas25
Copy link
Author

Saidas25 commented Nov 4, 2024

Paper 1.21.1 server

@Athar42
Copy link
Contributor

Athar42 commented Nov 7, 2024

What command did you use ?

Just this partial error log isn't enought to say what's going on here.

From the error, my best guess is that you use a bad URL (not a sound file) but more like an audio streaming service and for sure, this will not work (javax.sound.sampled.UnsupportedAudioFileException: not a MPEG stream).

@Saidas25
Copy link
Author

Saidas25 commented Nov 8, 2024

Used filebin for the music

@Athar42
Copy link
Contributor

Athar42 commented Nov 8, 2024

Ok, never used this service, but I think this will not be "fixable".

Each file you download from this server will weight 5.29KB (5 427B).
The reason is simple, just look inside the file :

                    <small><em>This warning will be shown only once.</em></small>
                </div>

                <div class="row p-3 mt-4 gx-5">
                    <div class="col-md-1">
                    </div>
                    <div class="col-md-5">
                        <p><b>Filebin is</b> a file sharing service built to make it easy to share files with other people on the Internet or between your own devices.</p>
                        <p><b>Malicious actors can abuse Filebin</b> to spread files containing malware and other illegal content.</p>
                    </div>
                    <div class="col-md-5">
                        <p><b>You are one click away</b> from downloading content that was shared via Filebin. This content may be dangerous.</p>
                        <p><b>You must decide</b> if you want to proceed to download the content or not. If you did not expect to end up here, it may be a good idea to not proceed.</p>
                    </div>
                    <div class="col-md-1">

In short : You download a web page, not the audio file, due to some kind of warning.

You can see this page when you first try to open the direct link :
image

Issue there, the plugin didn't handle cookies, and so, even doing a "double download" will end up on this page and never go through.

I don't see a way to avoid this behavior.

Edit : There could be a solution, but it'll need a "big" code change to handle a way to send headers first.

@Saidas25
Copy link
Author

I see, the Fabric version Audioplayer uses filebin for the music, switched to Paper recently so naturally we tried using filebin. I'll try using some other site, thank you.

@Athar42
Copy link
Contributor

Athar42 commented Nov 10, 2024

Yeah, that's two differents plugins (even more, for fabric, more like a "mod" :D )

Thinking of it, there should be a way to implement a different download behavior when a "filebin" url is used (if filebin, use this download function, else use the generic one).

Shouldn't be too hard to do that, but as my fork is slighty different, I'll not be able to make a push request for such change :D

@selut06
Copy link

selut06 commented Dec 20, 2024

what website do i need to use?

@Saidas25
Copy link
Author

what website do i need to use?

My server uses https://catbox.moe/, very simple

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

3 participants