I'm developing a Gluon application on a Windows 10 machine using IntelliJ Ultimate. Whenever I call:
StorageService.create()
I get an Optional.empty returned to me. In the application output, I see:
com.gluonhq.attach.util.impl.DefaultServiceFactory createInstance
WARNING: No new instance for interface com.gluonhq.attach.storage.StorageService and class com.gluonhq.attach.storage.impl.DesktopStorageService
May 26, 2022 8:37:25 PM com.gluonhq.impl.charm.glisten.tracking.TrackingManager <clinit>
SEVERE: null
java.io.IOException: Private storage file not available
at [email protected]/com.gluonhq.impl.charm.glisten.tracking.TrackingManager.lambda$static$0(TrackingManager.java:28)
at java.base/java.util.Optional.orElseThrow(Optional.java:403)
at [email protected]/com.gluonhq.impl.charm.glisten.tracking.TrackingManager.<clinit>(TrackingManager.java:28)
at [email protected]/com.gluonhq.charm.glisten.application.MobileApplication.continueInit(MobileApplication.java:266)
at [email protected]/com.gluonhq.charm.glisten.application.MobileApplication.start(MobileApplication.java:232)
at [email protected]/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:847)
at [email protected]/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:484)
at [email protected]/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:457)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at [email protected]/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:456)
at [email protected]/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
at [email protected]/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at [email protected]/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:184)
at java.base/java.lang.Thread.run(Thread.java:833)
What can I do to make private storage available to me while developing my app?
I'm not sure which maven version of the attach service Storage you're using but I found a bug earlier that was patched. See this link: https://stackoverflow.com/a/69484071/16394182