-
Notifications
You must be signed in to change notification settings - Fork 154
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
WebTorrent not working due to JRE/JDK version-conflicts #2774
Comments
Posting BiglyBT questions
I'm not aware of any other way, really -- at least, not any official resources. Though (@parg) maybe it would be worth enabling GitHub Discussions on the repo, to provide an alternative resource more geared to asking/answering questions instead of reporting bugs / requesting features? The actual Java compatibility issueSo... by default, the Windows installer downloads a Java runtime inside of the BiglyBT install directory (at I'm guessing your installation is using But BiglyBT's private JRE is Oracle 1.8.0_202, which seems like it would have exactly the same issue with the PeerConnectionFactory class. If that's the case, then the real issue is that the plugin is mispackaged, since it (apparently) contains compiled classes that aren't compatible with Java 1.8.0. Correcting that is the real fix for this. But in the meantime, here's one thing you could try, though I'm well aware how annoyingly convoluted it is. You could:
(Upgrading the private JRE would hopefully just be a matter of downloading a newer installer and pointing it to |
OK, now that java.com is loading for me... never mind that upgrade stuff above, since there don't appear to be any Windows JRE installers for versions newer than Java 8. But I can confirm that downloading the 64-bit JDK 17 offline installer, installing it to the default That's without having a JRE 8 installed systemwide. If Oh, hey, here's a question: What version of the WebTorrent plugin are you having this issue with, @forenta? I ask because, when I downloaded it from https://plugins.biglybt.com/ I ended up with Whatever version you're on, it might be worth trying the other one to see if the same issue is present. (In particular, if 1.4.1 is the one causing you issues, you could try downgrading to 1.3.2 by manual download and install-from-file. Perhaps it's the 1.4.1 build that requires a newer runtime.) |
1.4.1
I just downgraded to the 1.3.2 x86 and indeed it's working fine. Is there a way to disable auto-update for a single BiglyBT-plugin? And @parg are you aware of the JRE-issue? |
Not only is @parg aware, but the version history for 1.4.1 reads, I now see:
So, version 1.4.0+ are expected to be incompatible with Java 8. And there's actually a field in the plugin properties, So I guess the real question is, how did you end up with 1.4.1 if you're running BiglyBT under JRE 1.8.0? It should've been prevented from updating. (And that should prevent it from auto-updating, assuming that check is working correctly. If it's not, then that's the real bug here, I guess.) It doesn't appear, from a quick skim of the code, that there's any way to freeze a plugin version and prevent it checking for updates. It's possible I missed something, if not then adding a (Though it doesn't change the fact that there's already a JDK version check that's supposed to prevent WebTorrent 1.4.x from being installed under Java 8. If that's broken we should figure out how and why, manual freezing would just be a workaround.) |
The other thing, I guess, is that if BiglyBT launches under a JRE version that's lower than the Right now an installed plugin that's not compatible with the JRE version of the current BiglyBT instance still attempts to run, leading to breakage like what you originally experienced. |
@parg: Hmmm. I think there may be something broken, but on the plugin-server side. This is the plugin-lookup URL generated by Win32 BiglyBT running under the installer-downloaded private JRE 1.8.0 install, in response to a click on the appropriate "Install" button @ https://plugins.biglybt.com/:
It produces this plugin listing:
And then proceeds to download WebTorrent 1.4.1 despite it not being compatible with JRE 1.8.0. Should the plugin service be offering 1.4.1 to a client that reports |
The plugin does "fail to install" in BiglyBT, with this log in the install window (so I'm still not sure how @forenta ended up with 1.4.1 actually installed under Java 8):
But, it seems to me like things should never even get that far. Instead of offering a plugin that fails to install, shouldn't the server respond with a listing for WebTorrent 1.3.2 when the JRE version is lower than |
Whoa. This is freaky. If I change that plugin lookup URL from this:
to this:
The service switches to offering me WebTorrent 1.3.2 instead of 1.4.1! Something's definitely broken there. |
Related: #2660 Though the approach taken there was upgrading the JRE. We know that works, @forenta said as much. But it doesn't change the fact that 1.4.1 isn't compatible with the default -- and Oracle-recommended -- JRE version in Windows. JRE 1.8.0 is even the version the BiglyBT Windows installer will auto-download when needed. So there's a presumptive supermajority of Windows clients running under Java 8. Those clients should probably either stick with the 1.3.2 version, or refuse to even attempt downloading 1.4.1. All the necessary information is available to determine that it's incompatible, without actually having to download it first. |
Obviously. 🤷♂️ |
The plugin update stuff isn't currently able to differentiate plugin versions based on the Java version the client has. I dropped the ball on the webtorrent plugin somewhat. Initially it used an separate Chromium browser instance to proxy the WebRTC through, that was pretty crap. So I switched to using https://github.com/devopvoid/webrtc-java which was a lot better but I burnt a lot of time arsing around with it and lost momentum. |
Hmm. Too bad, since the server is even sent that info in the request. The thing that most confused me, though, was what I discovered about the server responses:
...What's that all about? I could understand if the page was just always serving 1.4.1, but after a fashion it's apparently smarter than that. But why would removing all of the system configuration parameters cause it to fall back to 1.3.2, when it doesn't do that in cases where the parameters indicate that it should? |
shit code (PHP...)? |
Hmm. That checks out! |
I did, I don't think it will happen as I'm not sure I want that crappy code public (security through obscurity and all that) |
I'd feel a little better if you had "security" in air-quotes there, but understood. 😉 |
Java 1.8.0_351 (64 bit) Oracle Corporation
c:\program files\java\jre1.8.0_351
I apologize for asking the question at Github - however, since the website is not accessible atm (at least from my device?), I don't know how else to approach the community - and I'm not sure wether it's a question or a feature request.
When trying to distribute videos from PeerTube via WebTorrent (ws/wss), the connection fails with the following error message:
Plugin failed java.lang.UnsupportedClassVersionError: dev/onvoid/webrtc/PeerConnectionFactory has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
So, to get it run, I uninstalled Oracle JRE 8 aka 52 and installed OpenJDK 19 aka... eh... 63? Anyway, WebTorrent worked pretty fine with this, but other applications I use did not start anymore, requesting JRE 8 and nothing else. So I re-installed JRE 8, the other applications were working again, but WebTorrent is broken again.
Is there a way to point BiglyBT to the OpenJDK-binaries instead of the Oracle JRE´s?
The text was updated successfully, but these errors were encountered: