-
Notifications
You must be signed in to change notification settings - Fork 331
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
[Bug] MacOS incompatibility in the JVM #170
Comments
Have had some offline discussion around this. Initial thoughts are: I have no idea why this is wrong. After some googling, it seemsthat Digging continues. |
Not sure if related, but I'm statically linking However, none of my events are firing, presence isn't updating and no errors are triggering. |
@Dids I think the newest working theory here is that registration is grabbing the bundle url of the java binary, and then Your issue sounds separate. Are you calling If that doesn't work, please feel free to open a separate issue and we can debug. |
Just wanted to see if I could get some more about my specific problem. I feel like the not only our Java library will benefit from finding a fix but as will many others. But on the same note I worry the issue lies out of simple control. |
I think the best fix would be to forego this method of registration altogether on macOS, and stick strictly to registered the command in json like we do for steam games. Screwing around with info.plist seems like it will open itself to more unforseen problems in the future. |
@msciotti Currently, the wrapper works in a way that allows the user to decide wether or not the initialization should rely on the automatic registration or the custom one using the register methods. And it‘s the same regardless of the option, so I doubt it's a issue with the registration of paths. No unsatisfied link exceptions are thrown either, only the infamous L-something error, which means the libdiscord-rpc.dylib is indeed found and loaded. So my best guess is, that it‘s some sort of issue with macOS permission system, since the app enables without issues, but no connection to the discord client can be established. I've heard about two interesting keywords though, „sandboxing“ and „gatekeeping“ but I am not a macOS developer, so those are pretty much a dead end to me. This is everything we were able to figure out so far. |
Well, theoretically, if we bypass this: https://github.com/discordapp/discord-rpc/blob/master/src/discord_register_osx.m#L32 And instead make the default the https://github.com/discordapp/discord-rpc/blob/master/src/discord_register_osx.m#L8 There should be no problems involving LSRegisterURL, since it won't be calling it. I'm not saying to remove automatic registration or not, sorry. What I'm saying is to force macOS registration to always use the |
We tested with #187 to no avail. Now we're just getting a silent failure. |
EDIT: I'm going to guess I'm getting a different error now since users aren't crashing anymore. TL;DR: I had a backup file that I didn't think was being picked up, but was. More in a reply below. I'm also seeing an err in the latest version -- works fine for Windows, but not for Mac (Linux doesn't seem to work, either, but haven't checked those logs yet) in Unity with dynamic files:
|
This looks like an error coming from one of the callbacks. |
Ah, I had a backup file that it seemed to pick up as if it wasn't a backup. My users don't crash anymore, but RP doesn't work. Works fine on Linux and Windows, so leads me to believe it's something in the dylib (I followed placement instructions very carefully on the Unity tutorial), as suggested above. I'm waiting to find new logs from a Mac user. EDIT: Fixed typo (Works fine on Linux [not Mac] and Windows) |
We believe the same thing @dylanh724. Investigating why the library has this issue on Mac is a personal priority |
I'm confused.
What do you mean by it works fine on mac and windows if RP isn't working? Is it not crashing, but RP isn't working? Is everything working on mac and windows, but not on linux? |
@msciotti Typo: Works fine on Linux + Windows, rather |
@dylanh724 OK thank you for the clarification. Your original comment in this thread was about another crash. Is that what you're trying to solve right now, or are you also noting that game registration on macOS is not working? If it is a different issue, could I please ask you to open a new issue here? Just to keep things on topic and help my brain stay organized lol |
A little bit of an update from my side: I recently got a MacBook Air to test this issue (and for other reasons) and in my investigation learned more about the Mac OS and how URLs are handled: Whenever an app runs LSRegisterURL (in our case the Discord SDK) it writes to a handy little file that can be read with: Here's a snippet of an example output: You can see the URL scheme, and the app meant to handle it. My prime example being FaceTime. I don't know the URI scheme, but I know that @MinnDevelopment's java-discord-rpc is also in the above image being used by IntelliJ through @sorenbug's discord-intellij. (This integration works, as explained below.) The issue comes down to how the process using the SDK is being started. When it is started through a verified app with a real handle on the OS everything is okay. But when it's started through the JDK there's two different layers of sandboxing and virtualization and the impl simply cannot call out to Discord and run the Ready Callbacks regardless of how much modding I do to the SDK myself: This example (logging prefixed with Though, the same SDK mod on Vatuu/discord-rpc results: Simply, no LSRegisterURL fires. I fear this may be impossible to do through Java. |
Any idea ? |
Since this got necro'd a bit—it seems that it is unfortunately not possible to work around this With the digging that we've done in this thread, and the deprecated status of this SDK, I'll close this as a can't/won't fix. |
Hello!
I am a maintainer of Vatuu/discord-rpc and we're finding that whenever we load
libdiscord-rpc.dylib
on our test device running MacOS X El Capitan (10.11.5) we're met with anError in LSRegisterURL: -10811
.Our research is only providing us with this link.
We think, the issue lies within the lib and not in our execution of it (however, we can be very wrong). The most "stable" version of our usage of discord-rpc is on my fork at DeJayDevelopment/discord-rpc.
Update: We're only getting this error on Mac devices.
The text was updated successfully, but these errors were encountered: