manami-project / manami

A tool to catalog anime on your hard drive and discover new anime to watch.
GNU Affero General Public License v3.0
109 stars 9 forks source link

java.lang.UnsupportedOperationException: The BROWSE action is not supported on the current platform! #402

Closed ghost closed 7 months ago

ghost commented 9 months ago

Before posting: Please check if you have the newest version. If there is a newer version please check if the problem still occurs with the newest version.

Manami version: 3.11.4 operating system + version: Arch Linux latest with KDE PLASMA JDK/JRE + version: Oracle 21 jdk
Steps to reproduce: Click an anime's image to open its url. What is the current behavior: kill itselfs

09:21:50.606 [pool-3-thread-1] INFO io.github.manamiproject.manami.app.versioning.DefaultLatestVersionChecker$Companion -- Checking if there is a new version available.
Jan 22, 2024 9:21:50 AM com.sun.javafx.application.PlatformImpl startup
WARNING: Unsupported JavaFX configuration: classes were loaded from 'unnamed module @34710b93'
09:21:50.632 [Network-Dispatcher-1] INFO io.github.manamiproject.modb.core.httpclient.UserAgents -- Initializing user-agents for [FIREFOX (DESKTOP)]
09:21:50.632 [Network-Dispatcher-1] DEBUG io.github.manamiproject.modb.core.httpclient.UserAgents -- Checking for user-agent file [modb-firefox-desktop-user-agents.txt] in classpath.
09:21:50.633 [Network-Dispatcher-1] DEBUG io.github.manamiproject.modb.core.httpclient.UserAgents -- Checking for property [modb.httpclient.useragents.firefox.desktop.path]
09:21:50.633 [Network-Dispatcher-1] DEBUG io.github.manamiproject.modb.core.httpclient.UserAgents -- None of the above could be found. Falling back to hard coded user agents.
09:21:50.633 [Network-Dispatcher-1] INFO io.github.manamiproject.modb.core.httpclient.UserAgents -- Initializing user-agents for [FIREFOX (MOBILE)]
09:21:50.633 [Network-Dispatcher-1] DEBUG io.github.manamiproject.modb.core.httpclient.UserAgents -- Checking for user-agent file [modb-firefox-mobile-user-agents.txt] in classpath.
09:21:50.633 [Network-Dispatcher-1] DEBUG io.github.manamiproject.modb.core.httpclient.UserAgents -- Checking for property [modb.httpclient.useragents.firefox.mobile.path]
09:21:50.633 [Network-Dispatcher-1] DEBUG io.github.manamiproject.modb.core.httpclient.UserAgents -- None of the above could be found. Falling back to hard coded user agents.
09:21:50.633 [Network-Dispatcher-1] INFO io.github.manamiproject.modb.core.httpclient.UserAgents -- Initializing user-agents for [CHROME (DESKTOP)]
09:21:50.633 [Network-Dispatcher-1] DEBUG io.github.manamiproject.modb.core.httpclient.UserAgents -- Checking for user-agent file [modb-chrome-desktop-user-agents.txt] in classpath.
09:21:50.633 [Network-Dispatcher-1] DEBUG io.github.manamiproject.modb.core.httpclient.UserAgents -- Checking for property [modb.httpclient.useragents.chrome.desktop.path]
09:21:50.633 [Network-Dispatcher-1] DEBUG io.github.manamiproject.modb.core.httpclient.UserAgents -- None of the above could be found. Falling back to hard coded user agents.
09:21:50.633 [Network-Dispatcher-1] INFO io.github.manamiproject.modb.core.httpclient.UserAgents -- Initializing user-agents for [CHROME (MOBILE)]
09:21:50.633 [Network-Dispatcher-1] DEBUG io.github.manamiproject.modb.core.httpclient.UserAgents -- Checking for user-agent file [modb-chrome-mobile-user-agents.txt] in classpath.
09:21:50.634 [Network-Dispatcher-1] DEBUG io.github.manamiproject.modb.core.httpclient.UserAgents -- Checking for property [modb.httpclient.useragents.chrome.mobile.path]
09:21:50.634 [Network-Dispatcher-1] DEBUG io.github.manamiproject.modb.core.httpclient.UserAgents -- None of the above could be found. Falling back to hard coded user agents.
Jan 22, 2024 9:21:50 AM tornadofx.Stylesheet$Companion detectAndInstallUrlHandler
INFO: Installing CSS url handler, since it was not picked up automatically
09:21:51.601 [pool-3-thread-1] INFO io.github.manamiproject.manami.app.cache.populator.AnimeCachePopulator$Companion -- Populating cache with anime from [https://raw.githubusercontent.com/manami-project/anime-offline-database/master/anime-offline-database-minified.json].
09:21:51.603 [CPU-Dispatcher-1] INFO io.github.manamiproject.modb.dbparser.DatabaseFileParser$Companion -- Downloading database file from [https://raw.githubusercontent.com/manami-project/anime-offline-database/master/anime-offline-database-minified.json]
09:21:52.956 [CPU-Dispatcher-2] INFO io.github.manamiproject.modb.dbparser.AnimeDatabaseJsonStringParser$Companion -- Parsing database
09:21:54.786 [pool-3-thread-1] INFO io.github.manamiproject.manami.app.cache.populator.AnimeCachePopulator$Companion -- Finished populating cache with anime from [https://raw.githubusercontent.com/manami-project/anime-offline-database/master/anime-offline-database-minified.json].
09:21:54.787 [pool-3-thread-1] INFO io.github.manamiproject.manami.app.cache.populator.DeadEntriesCachePopulator$Companion -- Populating cache with dead entries from [anidb.net]
09:21:54.788 [CPU-Dispatcher-3] INFO io.github.manamiproject.modb.dbparser.DatabaseFileParser$Companion -- Downloading database file from [https://raw.githubusercontent.com/manami-project/anime-offline-database/master/dead-entries/anidb.json]
09:21:54.835 [CPU-Dispatcher-4] INFO io.github.manamiproject.modb.dbparser.DeadEntriesJsonStringParser$Companion -- Parsing dead entries
09:21:54.853 [pool-3-thread-1] INFO io.github.manamiproject.manami.app.cache.populator.DeadEntriesCachePopulator$Companion -- Finished populating cache with dead entries from [anidb.net]
09:21:54.853 [pool-3-thread-1] INFO io.github.manamiproject.manami.app.cache.populator.DeadEntriesCachePopulator$Companion -- Populating cache with dead entries from [anilist.co]
09:21:54.853 [CPU-Dispatcher-5] INFO io.github.manamiproject.modb.dbparser.DatabaseFileParser$Companion -- Downloading database file from [https://raw.githubusercontent.com/manami-project/anime-offline-database/master/dead-entries/anilist.json]
09:21:54.965 [CPU-Dispatcher-6] INFO io.github.manamiproject.modb.dbparser.DeadEntriesJsonStringParser$Companion -- Parsing dead entries
09:21:55.131 [pool-3-thread-1] INFO io.github.manamiproject.manami.app.cache.populator.DeadEntriesCachePopulator$Companion -- Finished populating cache with dead entries from [anilist.co]
09:21:55.131 [pool-3-thread-1] INFO io.github.manamiproject.manami.app.cache.populator.DeadEntriesCachePopulator$Companion -- Populating cache with dead entries from [kitsu.io]
09:21:55.132 [CPU-Dispatcher-7] INFO io.github.manamiproject.modb.dbparser.DatabaseFileParser$Companion -- Downloading database file from [https://raw.githubusercontent.com/manami-project/anime-offline-database/master/dead-entries/kitsu.json]
09:21:55.187 [CPU-Dispatcher-8] INFO io.github.manamiproject.modb.dbparser.DeadEntriesJsonStringParser$Companion -- Parsing dead entries
09:21:55.213 [pool-3-thread-1] INFO io.github.manamiproject.manami.app.cache.populator.DeadEntriesCachePopulator$Companion -- Finished populating cache with dead entries from [kitsu.io]
09:21:55.213 [pool-3-thread-1] INFO io.github.manamiproject.manami.app.cache.populator.DeadEntriesCachePopulator$Companion -- Populating cache with dead entries from [myanimelist.net]
09:21:55.213 [CPU-Dispatcher-9] INFO io.github.manamiproject.modb.dbparser.DatabaseFileParser$Companion -- Downloading database file from [https://raw.githubusercontent.com/manami-project/anime-offline-database/master/dead-entries/myanimelist.json]
09:21:55.270 [CPU-Dispatcher-10] INFO io.github.manamiproject.modb.dbparser.DeadEntriesJsonStringParser$Companion -- Parsing dead entries
09:21:55.298 [pool-3-thread-1] INFO io.github.manamiproject.manami.app.cache.populator.DeadEntriesCachePopulator$Companion -- Finished populating cache with dead entries from [myanimelist.net]
Jan 22, 2024 9:22:00 AM javafx.scene.CssStyleHelper calculateValue
WARNING: Could not resolve '-fx-text-background-color' while resolving lookups for '-fx-text-fill' from rule '*.label' in stylesheet jar:file:/home/kaguya/manami.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Jan 22, 2024 9:22:00 AM javafx.scene.CssStyleHelper calculateValue
WARNING: Could not resolve '-fx-text-background-color' while resolving lookups for '-fx-text-fill' from rule '*.label' in stylesheet jar:file:/home/kaguya/manami.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Jan 22, 2024 9:22:00 AM javafx.scene.CssStyleHelper calculateValue
WARNING: Could not resolve '-fx-text-background-color' while resolving lookups for '-fx-text-fill' from rule '*.label' in stylesheet jar:file:/home/kaguya/manami.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Jan 22, 2024 9:22:00 AM javafx.scene.CssStyleHelper calculateValue
WARNING: Could not resolve '-fx-text-background-color' while resolving lookups for '-fx-text-fill' from rule '*.label' in stylesheet jar:file:/home/kaguya/manami.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Jan 22, 2024 9:22:00 AM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: class java.lang.String cannot be cast to class javafx.scene.paint.Paint (java.lang.String is in module java.base of loader 'bootstrap'; javafx.scene.paint.Paint is in unnamed module of loader 'app')' while converting value for '-fx-background-color' from rule '*.list-view' in stylesheet jar:file:/home/kaguya/manami.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Jan 22, 2024 9:22:10 AM tornadofx.DefaultErrorHandler uncaughtException
SEVERE: Uncaught error
java.lang.UnsupportedOperationException: The BROWSE action is not supported on the current platform!
        at java.desktop/java.awt.Desktop.checkActionSupport(Desktop.java:381)
        at java.desktop/java.awt.Desktop.browse(Desktop.java:531)
        at io.github.manamiproject.manami.gui.extensions.EventTargetExtensionsKt.hyperlink$lambda$1$lambda$0(EventTargetExtensions.kt:33)
        at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
        at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:232)
        at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:189)
        at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
        at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
        at javafx.event.Event.fireEvent(Event.java:198)
        at javafx.scene.Scene$ClickGenerator.postProcess(Scene.java:3689)
        at javafx.scene.Scene$MouseHandler.process(Scene.java:3994)
        at javafx.scene.Scene.processMouseEvent(Scene.java:1891)
        at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2709)
        at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:411)
        at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:301)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
        at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(GlassViewEventHandler.java:450)
        at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:424)
        at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:449)
        at com.sun.glass.ui.View.handleMouseEvent(View.java:551)
        at com.sun.glass.ui.View.notifyMouse(View.java:937)
        at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
        at com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$10(GtkApplication.java:263)
        at java.base/java.lang.Thread.run(Thread.java:1583)

(java:169546): Gdk-WARNING **: 09:22:10.659: XSetErrorHandler() called with a GDK error trap pushed. Don't do that.
09:24:08.562 [tornadofx-thread-2] INFO io.github.manamiproject.manami.app.Manami$Companion -- Terminating manami

What is the expected behavior: open the url. i searched the net some users recommended to use xdg-open to open urls.

manami-project commented 8 months ago

I'm using java.awt.Desktop to open URLs in the default browser. So as the message indicates The BROWSE action is not supported on the current platform!, the platform is not support and this is strictly speaking not a bug. I'm not really willing to make a individual implementations or make command line calls. However there is HostServices directly from JavaFX. I decided to migrate to that, because that way I can get rid of dependencies from the awt package.

@toprak Can you check if this works for you using the newest release?