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

Doesn't start on MacOS #49

Open
zapek opened this issue Feb 12, 2022 · 8 comments
Open

Doesn't start on MacOS #49

zapek opened this issue Feb 12, 2022 · 8 comments
Labels
bug Something isn't working build Build issue macos MacOS specific

Comments

@zapek
Copy link
Owner

zapek commented Feb 12, 2022

What happened?

Reported by AdamH:

Once the DMG is installed, the executable starts with the following error:
"Xeres.app is damaged and can't be opened"

This seems to be because the bundled JRE is signed but not Xeres itself or something. More details available at:
https://bugs.openjdk.java.net/browse/JDK-8276150

Possible solutions:

  • wait for the next JDK (LTS)
  • sign the executable
  • tell users to use 'xattr'

How to reproduce

Install the DMG and run the executable.

Version

0.3.1

Which OS are you running?

MacOS

Relevant log output

No response

@zapek zapek added bug Something isn't working build Build issue macos MacOS specific labels Feb 12, 2022
@zapek
Copy link
Owner Author

zapek commented Feb 18, 2022

Linked to #2

@zapek
Copy link
Owner Author

zapek commented Jun 24, 2022

Fixed in JDK 18.

@zapek
Copy link
Owner Author

zapek commented Aug 30, 2022

Should be fixed since we use JDK 18 now.

@zapek zapek closed this as completed Aug 30, 2022
@zapek
Copy link
Owner Author

zapek commented Sep 8, 2022

Apparently still happens with JDK 18.

@zapek zapek reopened this Sep 8, 2022
@zapek
Copy link
Owner Author

zapek commented Sep 8, 2022

Current workaround: sudo xattr -cr /Applications/Xeres.app

@zapek
Copy link
Owner Author

zapek commented Sep 8, 2022

And next error 🙂

Caused by: java.awt.AWTError: WindowServer is not available at java.desktop/sun.lwawt.macosx.LWCToolkit.<clinit>(Unknown Source) at java.desktop/sun.awt.PlatformGraphicsInfo.createToolkit(Unknown Source) at java.desktop/java.awt.Toolkit.getDefaultToolkit(Unknown Source) at java.desktop/java.awt.SystemTray.isSupported(Unknown Source) at io.xeres.ui.support.tray.TrayService.addSystemTray(TrayService.java:62) at io.xeres.ui.controller.MainWindowController.initialize(MainWindowController.java:229)

@zapek
Copy link
Owner Author

zapek commented Nov 14, 2023

Currently requires typing:

sudo spctl --master-disable

to be able to install the .dmg because it's not signed and I don't intend to sign it. Now the next issue is that the class loader is somehow null for the UI package.

@zapek
Copy link
Owner Author

zapek commented Sep 19, 2024

Exception in thread "AppKit Thread" java.lang.NullPointerException: Cannot invoke "java.lang.ClassLoader.getResource(String)" because "<local2>" is null
	at com.sun.javafx.css.StyleManager.getURL(StyleManager.java:898)
	at com.sun.javafx.css.StyleManager.loadStylesheetUnPrivileged(StyleManager.java:1097)
	at com.sun.javafx.css.StyleManager.loadStylesheet(StyleManager.java:952)
	at com.sun.javafx.css.StyleManager._setDefaultUserAgentStylesheet(StyleManager.java:1454)
	at com.sun.javafx.css.StyleManager.setUserAgentStylesheets(StyleManager.java:1305)
	at com.sun.javafx.application.PlatformImpl.lambda$_setPlatformUserAgentStylesheet$20(PlatformImpl.java:881)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at com.sun.javafx.application.PlatformImpl._setPlatformUserAgentStylesheet(PlatformImpl.java:880)
	at com.sun.javafx.application.PlatformImpl.lambda$setPlatformUserAgentStylesheet$17(PlatformImpl.java:724)
	at com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:456)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:455)
	at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
Exception in thread "AppKit Thread" java.lang.ExceptionInInitializerError
	at net.rgielen.fxweaver.core.FxWeaver.loadByView(FxWeaver.java:385)
	at net.rgielen.fxweaver.core.FxWeaver.lambda$load$0(FxWeaver.java:380)
	at java.base/java.util.Optional.map(Unknown Source)
	at net.rgielen.fxweaver.core.FxWeaver.load(FxWeaver.java:380)
	at net.rgielen.fxweaver.core.FxWeaver.loadView(FxWeaver.java:184)
	at net.rgielen.fxweaver.core.FxWeaver.loadView(FxWeaver.java:125)
	at io.xeres.ui.support.window.WindowManager$UiWindow.builder(WindowManager.java:674)
	at io.xeres.ui.support.window.WindowManager.lambda$openAccountCreation$28(WindowManager.java:482)
	at com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:456)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:455)
	at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
Caused by: java.lang.NullPointerException
	at javafx.fxml.JavaFXBuilderFactory.<init>(JavaFXBuilderFactory.java:101)
	at javafx.fxml.JavaFXBuilderFactory.<init>(JavaFXBuilderFactory.java:90)
	at javafx.fxml.FXMLLoader.<clinit>(FXMLLoader.java:1905)
	... 12 more

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

No branches or pull requests

1 participant