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

Unable to load library 'CoreFoundation': Native library #683

Closed
tresf opened this issue Jun 29, 2020 · 3 comments
Closed

Unable to load library 'CoreFoundation': Native library #683

tresf opened this issue Jun 29, 2020 · 3 comments
Labels
Milestone

Comments

@tresf
Copy link
Contributor

tresf commented Jun 29, 2020

Starting with macOS "Big Sur", JNA may fail to load libCoreFoundation.dylib

This is a placeholder to guard against this scenario.

java.lang.UnsatisfiedLinkError: Unable to load library 'CoreFoundation': Native library (darwin/libCoreFoundation.dylib) not found in resource path (../../qz-tray.jar)
	at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:303)
	at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:427)
	at com.sun.jna.Library$Handler.(Library.java:179)
	at com.sun.jna.Native.loadLibrary(Native.java:569)
	at com.sun.jna.Native.loadLibrary(Native.java:544)
	at purejavahidapi.macosx.CoreFoundationLibrary.(CoreFoundationLibrary.java:41)
	at purejavahidapi.macosx.MacOsXBackend.init(MacOsXBackend.java:116)
	at purejavahidapi.PureJavaHidApi.(PureJavaHidApi.java:117)
	at qz.common.SecurityInfo.getLibVersions(Unknown Source)
	at qz.common.AboutInfo.libraries(Unknown Source)
	at qz.common.AboutInfo.gatherAbout(Unknown Source)
	at qz.ws.HttpAboutServlet.generateHtmlResponse(Unknown Source)
	at qz.ws.HttpAboutServlet.doGet(Unknown Source)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:760)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1617)
	at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:226)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:545)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1589)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1296)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:485)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1559)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1211)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
	at org.eclipse.jetty.server.Server.handle(Server.java:500)
	at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:386)
	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:560)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:378)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:268)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
	at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:426)
	at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:320)
	at org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:158)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:367)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:782)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:914)
	at java.base/java.lang.Thread.run(Thread.java:834)
@tresf tresf added this to the 2.2 milestone Jun 29, 2020
@tresf tresf added the bug label Jun 29, 2020
@tresf tresf mentioned this issue Jun 29, 2020
8 tasks
@tresf
Copy link
Contributor Author

tresf commented Jun 30, 2020

@tresf tresf modified the milestones: 2.2, 2.1.3 Jun 30, 2020
tresf added a commit that referenced this issue Jun 30, 2020
Catch JNA issues introduced with Big Sur
Related #683
@tresf
Copy link
Contributor Author

tresf commented Jun 30, 2020

Guard put in place here #685
Upstream bug reported here: nyholku/purejavahidapi#75

I'm not sure if this bug is limited to PureJavaHIDAPI or if it's a bigger problem with JNA. Note, PureJavaHIDAPI has been updated to use JNA 5, but it must be built from source.

tresf added a commit that referenced this issue Jul 2, 2020
Fixes install on Arabic
Fixes cert year calculation for Thailand
Catches JNA issues introduced with Big Sur
Closes #680
Related #683
@tresf
Copy link
Contributor Author

tresf commented Aug 25, 2020

Closing since it's patched via #685 on master branch. We don't use purejavahidapi on macOS so closing unless this resurfaces using a component that's needed on macOS.

This patch will be available in 2.1.2.

@tresf tresf closed this as completed Aug 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant