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

[Bug] Wrong MIME Type for WebUI #767

Open
Throun opened this issue Nov 9, 2023 · 15 comments
Open

[Bug] Wrong MIME Type for WebUI #767

Throun opened this issue Nov 9, 2023 · 15 comments
Labels
bug Something isn't working

Comments

@Throun
Copy link

Throun commented Nov 9, 2023

Device information

  • Tachidesk version: Tachidesk-Server-v0.7.0-r1197.jar & Tachidesk-Server-v0.7.0-r1424.jar (preview)
  • Server Operating System: Fedora Kinoite 39
  • Server Desktop Environment: N/A
  • Server JVM version: OpenJDK 21.0.1
  • Client Operating System: Fedora Kinoite 39
  • Client Web Browser: Mozilla Firefox 119.0.1

Steps to reproduce

  1. Download jar and the latest version of OpenJDK from .
  2. Run the jar.

Expected behavior

The web ui should load normally.

Actual behavior

The tab Tachidesk opens is blank, accessing other pages via url gives the same result. Firefox's console shows:
The stylesheet "http://127.0.0.1:4567/static/css/2.8c49bb0a.chunk.css" was not loaded because its MIME type, "text/html", is not "text/css". The stylesheet "http://127.0.0.1:4567/static/css/main.efc3b6a7.chunk.css" was not loaded because its MIME type, "text/html", is not "text/css". The script from "http://127.0.0.1:4567/static/js/2.8953c29e.chunk.js" was loaded even though its MIME type ("text/html") is not a valid JavaScript MIME type. The script from "http://127.0.0.1:4567/static/js/main.9b92ea11.chunk.js" was loaded even though its MIME type ("text/html") is not a valid JavaScript MIME type. Uncaught SyntaxError: expected expression, got '<' Uncaught SyntaxError: expected expression, got '<'

Other details

I have tried deleting all files in the WebUI folder and restarting, as well as using the Sorayomi and preview WebUI. This was tested with both preinstalled and flatpak Firefox. I tested in a VM and on a HP laptop; both were clean installs.

My personal server on Arch Linux has not faced this issue, so I presume it has something to do with Fedora.

@Throun Throun added the bug Something isn't working label Nov 9, 2023
@Syer10
Copy link
Collaborator

Syer10 commented Nov 9, 2023

This is something we fixed in r1424, I am skeptical since it should be fixed, are you sure you are using r1424 on fedora?

@Throun
Copy link
Author

Throun commented Nov 9, 2023

Yes, I tested with both r1197 and r1424, same results. I also just tested them with OpenJDK 17.0.2 to see if it was something to due with the java version, but no difference I could find.

I double-checked the console output and it contains this:
13:31:11.466 [JettyServerThreadPool-41] INFO io.javalin.Javalin - Exception occurred while handling static resource

java.lang.NullPointerException: super.getResource(path) must not be null`
        `at io.javalin.jetty.ConfigurableHandler.getResource(JettyResourceHandler.kt:86)`
        `at io.javalin.jetty.JettyResourceHandler.handle(JettyResourceHandler.kt:41)`
        `at io.javalin.http.JavalinServlet$lifecycle$2$2.invoke(JavalinServlet.kt:51)`
        `at io.javalin.http.JavalinServlet$lifecycle$2$2.invoke(JavalinServlet.kt:46)`
        `at io.javalin.http.JavalinServletHandler.executeNextTask(JavalinServletHandler.kt:99)`
        `at io.javalin.http.JavalinServletHandler.queueNextTaskOrFinish$lambda-1(JavalinServletHandler.kt:85)`
        `at java.base/java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:1187)`
        `at java.base/java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:2309)`
        `at io.javalin.http.JavalinServletHandler.queueNextTaskOrFinish$javalin(JavalinServletHandler.kt:85)`
        `at io.javalin.http.JavalinServletHandler.executeNextTask$lambda-11$lambda-10(JavalinServletHandler.kt:119)`
        `at java.base/java.util.concurrent.CompletableFuture.uniApplyNow(CompletableFuture.java:684)`
        `at java.base/java.util.concurrent.CompletableFuture.uniApplyStage(CompletableFuture.java:662)`
        `at java.base/java.util.concurrent.CompletableFuture.thenApply(CompletableFuture.java:2168)`
        `at io.javalin.http.JavalinServletHandler.executeNextTask(JavalinServletHandler.kt:119)`
        `at io.javalin.http.JavalinServletHandler.queueNextTaskOrFinish$lambda-1(JavalinServletHandler.kt:85)`
        `at java.base/java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:1187)`
        `at java.base/java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:2309)`
        `at io.javalin.http.JavalinServletHandler.queueNextTaskOrFinish$javalin(JavalinServletHandler.kt:85)`
        `at io.javalin.http.JavalinServlet.service(JavalinServlet.kt:89)`
        `at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)`
        `at io.javalin.jetty.JavalinJettyServlet.service(JavalinJettyServlet.kt:58)`
        `at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)`
        `at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799)`
        `at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:554)`
        `at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)`
        `at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)`
        `at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)`
        `at io.javalin.jetty.JettyServer$start$wsAndHttpHandler$1.doHandle(JettyServer.kt:52)`
        `at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)`
        `at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:505)`
        `at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)`
        `at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)`
        `at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355)`
        `at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)`
        `at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:181)`
        `at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)`
        `at org.eclipse.jetty.server.Server.handle(Server.java:516)`
        `at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487)`
        `at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732)`
        `at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479)`
        `at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)`
        `at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)`
        `at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)`
        `at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)`
        `at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)`
        `at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)`
        `at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)`
        `at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)`
        `at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409)`
        `at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)`
        `at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)`
        `at java.base/java.lang.Thread.run(Thread.java:833)

EDIT: Ok, I just tested r1424 on a clean install of Fedora KDE 39(not Kinoite), and it worked as expected, so something Fedora does with regards to their immutable systems might be the cause.

@Andre-Oliveira
Copy link

Have the same issue in Fedora Onyx, also an immutable spin of Fedora, but not on Arch and Ubuntu.

@schroda
Copy link
Collaborator

schroda commented Nov 14, 2023

can you reproduce the issue with the latest preview version, enabled debug logs (via launcher or server.conf, requires server restart to take effect) and then provide the logs (logs folder in the root dir https://github.com/Suwayomi/Tachidesk-Server/wiki/The-Data-Directory)

@Throun
Copy link
Author

Throun commented Nov 15, 2023

Here's the logs, issue still persists (debug logs enabled, WebUI channel is 'preview').
application.log

@schroda
Copy link
Collaborator

schroda commented Nov 15, 2023

does the server create a webUI dir inside the root dir and is there content inside of it, according to the logs it should exist?
what happens if you download the latest webUI preview and extract it to this folder manually before starting the server?

@Throun
Copy link
Author

Throun commented Nov 15, 2023

The WebUI directory is created, and the server correctly downloads the WebUI to it if it's empty. Manually extracting the WebUI preview to the directory gives off the same errors as before.

I tested the sorayomi WebUI to see if it would make a difference. I got a similar result, but the page was the same light blue as sorayomi's startup:
sorayomi
So the browser must be getting something from the UI.

@schroda
Copy link
Collaborator

schroda commented Nov 15, 2023

what does the server respond with for the different requests (browser dev tools)?
is it always responding with the index.html content?

@Throun
Copy link
Author

Throun commented Nov 15, 2023

Here's what I got:
console
inspector
network
network2
style

@schroda
Copy link
Collaborator

schroda commented Nov 15, 2023

just to make sure, there is a assets folder in webUI and the requested files exist (index-3029e971.js, index-a0ebbc76.css)?
because the server can read the webUI/index.html file, but not the others and therefore, answers with the index.html file as a fallback, which causes the mime type issue.
if the folder and the files exist, something must be preventing the server from accessing them

@Throun
Copy link
Author

Throun commented Nov 15, 2023

Yeah, the folder and the files exist.
Everything else about the server appears to work normally, as I could connect to it from other clients, add extensions and download manga. Perhaps Fedora's the cause, but I can't think of anything they change that would affect Tachidesk like this.

@Throun
Copy link
Author

Throun commented Nov 21, 2023

Ok, I tested Tachidesk on the other official Fedora immutable desktops.
Kinoite and Onyx still don't work. However, the webUI DOES work on Silverblue, which leads me to think there is a package that is only installed in Silverblue causing the problem.
I'm going to try and layer some packages onto Kinoite to hopefully narrow down the issue. In the meanwhile, here's the package lists for each spin, plus regular Fedora KDE, in case they may help:
pkgs-silverblue.txt
pkgs-Onyx.txt
pkgs-kinoite.txt
pkgs-KDE.txt

@acavalin
Copy link

I encountered this error since the 1.0.0 release.

Device information

  • Suwayomi version: Suwayomi-Server-v1.0.0-r1498.jar
  • Server Desktop Environment: IceWM @ Xorg/X11
  • Server JVM version: openjdk 17.0.10 2024-01-16
  • Server Operating System: Debian 12 bookworm @ RaspberryPi5 aarch64 kernel 6.1.0-rpi8-rpi-2712
  • Client Operating System: same as above
  • Client Web Browser: Firefox/123, and Chrome/120

Steps to reproduce

I run this command (data and dl folders are empty initially):

#!/bin/sh
PWD=$HOME/suwayomi
exec /usr/bin/java \
  -Dsuwayomi.tachidesk.config.server.systemTrayEnabled=false \
  -Dsuwayomi.tachidesk.config.server.initialOpenInBrowserEnabled=false \
  -Dsuwayomi.tachidesk.config.server.rootDir=$PWD/data \
  -Dsuwayomi.tachidesk.config.server.downloadsPath=$PWD/dl \
  -Dsuwayomi.tachidesk.config.server.webUIEnabled=true \
  -Dsuwayomi.tachidesk.config.server.webUIInterface=browser \
  -Dsuwayomi.tachidesk.config.server.webUIFlavor=WebUI \
  -Dsuwayomi.tachidesk.config.server.ip=0.0.0.0 \
  -Dsuwayomi.tachidesk.config.server.port=3000 \
  -Dsuwayomi.tachidesk.config.server.downloadAsCbz=true \
  -jar $PWD/suwayomi.jar

Output

browser blank page
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <link rel="icon" href="/favicon.ico"/>
    <meta name="viewport" content="minimum-scale=1, initial-scale=1, width=device-width"/>
    <meta name="theme-color" content="#000000"/>
    <meta
            name="description"
            content="A manga reader that runs tachiyomi's extensions"
    />
    <link rel="apple-touch-icon" href="/favicon.png"/>
    <!--
      manifest.json provides metadata used when your web app is installed on a
      user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
    -->
    <link rel="manifest" href="/manifest.json"/>
    <title>Suwayomi</title>
  <script type="module" crossorigin src="/assets/index-K7hopUq-.js"></script>
  <link rel="stylesheet" crossorigin href="/assets/index-S3GDysPx.css">
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
  This HTML file is a template.
  If you open it directly in the browser, you will see an empty page.

  You can add webfonts, meta tags, or analytics to this file.
  The build step will place the bundled scripts into the <body> tag.

  To begin the development, run `npm start` or `yarn start`.
  To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
application log
12:49:51.818 [main] INFO suwayomi.tachidesk.server.ServerSetup -- Running Suwayomi-Server v1.0.0 revision r1498
12:49:52.519 [main] INFO suwayomi.tachidesk.server.util.AppMutex -- Mutex status is clear, Resuming startup.
12:49:53.382 [main] INFO suwayomi.tachidesk.server.database.DBManager -- Using h2 database version 1.4
12:49:53.675 [main] INFO de.neonew.exposed.migrations.RunMigrations -- Running migrations on database jdbc:h2:/home/cloud/suwayomi/data/database
12:49:53.756 [main] INFO de.neonew.exposed.migrations.RunMigrations -- Empty database found, creating table for migrations
12:49:53.896 [main] INFO de.neonew.exposed.migrations.RunMigrations -- Database version before migrations: null
12:49:53.897 [main] INFO de.neonew.exposed.migrations.RunMigrations -- Running migration version 1: Initial
12:49:54.433 [main] INFO de.neonew.exposed.migrations.RunMigrations -- Running migration version 2: ChapterTableIndexRename
12:49:54.461 [main] INFO de.neonew.exposed.migrations.RunMigrations -- Running migration version 3: DefaultCategory
12:49:54.508 [main] INFO de.neonew.exposed.migrations.RunMigrations -- Running migration version 4: AnimeTablesBatch1
12:49:54.618 [main] INFO de.neonew.exposed.migrations.RunMigrations -- Running migration version 5: AnimeTablesBatch2
12:49:54.702 [main] INFO de.neonew.exposed.migrations.RunMigrations -- Running migration version 6: AnimeTablesBatch3
12:49:54.818 [main] INFO de.neonew.exposed.migrations.RunMigrations -- Running migration version 7: ChapterIsDownloaded
12:49:54.888 [main] INFO de.neonew.exposed.migrations.RunMigrations -- Running migration version 8: ChapterPageCount
12:49:54.992 [main] INFO de.neonew.exposed.migrations.RunMigrations -- Running migration version 9: ChapterLastReadAt
12:49:55.030 [main] INFO de.neonew.exposed.migrations.RunMigrations -- Running migration version 10: MangaAndChapterMeta
12:49:55.076 [main] INFO de.neonew.exposed.migrations.RunMigrations -- Running migration version 11: SourceDropPartOfFactorySource
12:49:55.154 [main] INFO de.neonew.exposed.migrations.RunMigrations -- Running migration version 12: SourceIsNsfw
12:49:55.293 [main] INFO de.neonew.exposed.migrations.RunMigrations -- Running migration version 13: MangaRealUrl
12:49:55.356 [main] INFO de.neonew.exposed.migrations.RunMigrations -- Running migration version 14: MangaRemoveLengthLimit
12:49:55.461 [main] INFO de.neonew.exposed.migrations.RunMigrations -- Running migration version 15: SourceAndExtensionLangAddLengthLimit
12:49:55.586 [main] INFO de.neonew.exposed.migrations.RunMigrations -- Running migration version 16: ChapterIndexRenameToSourceOrder
12:49:55.647 [main] INFO de.neonew.exposed.migrations.RunMigrations -- Running migration version 17: ChapterFetchedAt
12:49:55.703 [main] INFO de.neonew.exposed.migrations.RunMigrations -- Running migration version 18: MangaInLibraryAt
12:49:55.739 [main] INFO de.neonew.exposed.migrations.RunMigrations -- Running migration version 19: RemoveAnime
12:49:55.863 [main] INFO de.neonew.exposed.migrations.RunMigrations -- Running migration version 20: AddMangaLastFetchedAtColumns
12:49:55.924 [main] INFO de.neonew.exposed.migrations.RunMigrations -- Running migration version 21: GlobalAndCategoryMeta
12:49:55.966 [main] INFO de.neonew.exposed.migrations.RunMigrations -- Running migration version 22: MangaThumbnailLastFetched
12:49:55.996 [main] INFO de.neonew.exposed.migrations.RunMigrations -- Running migration version 23: CategoryMetaRefFix
12:49:56.034 [main] INFO de.neonew.exposed.migrations.RunMigrations -- Running migration version 24: MangaUpdateStrategy
12:49:56.066 [main] INFO de.neonew.exposed.migrations.RunMigrations -- Running migration version 25: ChapterRealUrl
12:49:56.107 [main] INFO de.neonew.exposed.migrations.RunMigrations -- Running migration version 26: CategoryIncludeInUpdate
12:49:56.131 [main] INFO de.neonew.exposed.migrations.RunMigrations -- Running migration version 27: AddDefaultCategory
12:49:56.222 [main] INFO de.neonew.exposed.migrations.RunMigrations -- Running migration version 28: AddCascade
12:49:56.321 [main] INFO de.neonew.exposed.migrations.RunMigrations -- Running migration version 29: DropMangaDefaultCategory
12:49:56.404 [main] INFO de.neonew.exposed.migrations.RunMigrations -- Running migration version 30: FixDateUpload
12:49:56.461 [main] INFO de.neonew.exposed.migrations.RunMigrations -- Running migration version 31: AddExtensionRepo
12:49:56.517 [main] INFO de.neonew.exposed.migrations.RunMigrations -- Running migration version 32: FixExtensionRepos
12:49:56.580 [main] INFO de.neonew.exposed.migrations.RunMigrations -- Running migration version 33: TrackRecord
12:49:56.648 [main] INFO de.neonew.exposed.migrations.RunMigrations -- Running migration version 34: CategoryIncludeInDownload
12:49:56.671 [main] INFO de.neonew.exposed.migrations.RunMigrations -- Running migration version 35: TrackSearch
12:49:56.732 [main] INFO de.neonew.exposed.migrations.RunMigrations -- Running migration version 36: SourceMeta
12:49:56.775 [main] INFO de.neonew.exposed.migrations.RunMigrations -- Migrations finished successfully
12:49:56.834 [main] INFO Migration -- Running migrations, previous version 0, target version 1
12:49:56.835 [main] INFO Migration -- Running migration for version: 1
12:49:56.852 [DefaultDispatcher-worker-1] INFO suwayomi.tachidesk.server.ServerSetup -- Socks Proxy changed - enabled=false address=: , username=, password=[REDACTED]
12:49:56.966 [main] INFO suwayomi.tachidesk.manga.impl.backup.proto.ProtoBackupExport -- Creating automated backup...
12:49:57.239 [main] WARN suwayomi.tachidesk.server.util.WebInterfaceManager setupWebUI(flavor= WebUI, servedFlavor= WebUI) -- no webUI files found, starting download...
12:49:57.885 [main] INFO suwayomi.tachidesk.server.util.WebInterfaceManager downloadVersion(version= r1411, flavor= WebUI) -- Downloading WebUI zip from the Internet...
downloadVersionZipFile(WebUI): Download progress: % 00��00��00��00��00��00��00��00��00��00��00��00��00��00��01��01��01��01��01��01��01��01��01��01��01��01��01��02��02��02��02��02��02��02��02��02��02��02��02��02��02��03��03��03��03��03��03��03��03��03��03��03��03��03��03��04��04��04��04��04��04��04��04��04��04��04��04��04��04��05��05��05��05��05��05��05��05��05��05��05��05��05��05��06��06��06��06��06��06��06��06��06��06��06��06��07��07��07��07��07��07��07��07��07��08��08��08��08��08��08��08��08��08��09��09��09��09��09��09��09��09��09��10��10��10��10��10��10��10��10��10��10��11��11��11��11��11��11��11��11��11��12��12��12��12��12��12��12��12��12��13��13��13��13��13��13��13��13��13��14��14��14��14��14��14��14��14��14��15��15��15��15��15��15��15��15��15��16��16��16��16��16��16��16��16��16��17��17��17��17��17��17��17��17��17��17��18��18��18��18��18��18��18��18��18��19��19��19��19��19��19��19��19��19��20��20��20��20��20��20��20��20��20��21��21��21��21��21��21��21��21��21��22��22��22��22��22��22��22��22��22��23��23��23��23��23��23��23��23��23��24��24��24��24��24��24��24��24��24��24��25��25��25��25��25��25��25��25��25��26��26��26��26��26��26��26��26��26��27��27��27��27��27��27��27��27��27��28��28��28��28��28��28��28��28��28��29��29��29��29��29��29��29��29��29��30��30��30��30��30��30��30��30��30��31��31��31��31��31��31��31��31��31��31��32��32��32��32��32��32��32��32��32��33��33��33��33��33��33��33��33��33��34��34��34��34��34��34��34��34��34��35��35��35��35��35��35��35��35��35��36��36��36��36��36��36��36��36��36��37��37��37��37��37��37��37��37��37��38��38��38��38��38��38��38��38��38��39��39��39��39��39��39��39��39��39��39��40��40��40��40��40��40��40��40��40��41��41��41��41��41��41��41��41��41��42��42��42��42��42��42��42��42��42��43��43��43��43��43��43��43��43��43��44��44��44��44��44��44��44��44��44��45��45��45��45��45��45��45��45��45��46��46��46��46��46��46��46��46��46��46��47��47��47��47��47��47��47��47��47��48��48��48��48��48��48��48��48��48��49��49��49��49��49��49��49��49��49��50��50��50��50��50��50��50��50��50��51��51��51��51��51��51��51��51��51��52��52��52��52��52��52��52��52��52��53��53��53��53��53��53��53��53��53��53��54��54��54��54��54��54��54��54��54��55��55��55��55��55��55��55��55��55��56��56��56��56��56��56��56��56��56��57��57��57��57��57��57��57��57��57��58��58��58��58��58��58��58��58��58��59��59��59��59��59��59��59��59��59��60��60��60��60��60��60��60��60��60��60��61��61��61��61��61��61��61��61��61��62��62��62��62��62��62��62��62��62��63��63��63��63��63��63��63��63��63��64��64��64��64��64��64��64��64��64��65��65��65��65��65��65��65��65��65��66��66��66��66��66��66��66��66��66��67��67��67��67��67��67��67��67��67��67��68��68��68��68��68��68��68��68��68��69��69��69��69��69��69��69��69��69��70��70��70��70��70��70��70��70��70��71��71��71��71��71��71��71��71��71��72��72��72��72��72��72��72��72��72��73��73��73��73��73��73��73��73��73��74��74��74��74��74��74��74��74��74��75��75��75��75��75��75��75��75��75��75��76��76��76��76��76��76��76��76��76��77��77��77��77��77��77��77��77��77��78��78��78��78��78��78��78��78��78��79��79��79��79��79��79��79��79��79��80��80��80��80��80��80��80��80��80��81��81��81��81��81��81��81��81��81��82��82��82��82��82��82��82��82��82��82��83��83��83��83��83��83��83��83��83��84��84��84��84��84��84��84��84��84��85��85��85��85��85��85��85��85��85��86��86��86��86��86��86��86��86��86��87��87��87��87��87��87��87��87��87��88��88��88��88��88��88��88��88��88��89��89��89��89��89��89��89��89��89��89��90��90��90��90��90��90��90��90��90��91��91��91��91��91��91��91��91��91��92��92��92��92��92��92��92��92��92��93��93��93��93��93��93��93��93��93��94��94��94��94��94��94��94��94��94��95��95��95��95��95��95��95��95��95��96��96��96��96��96��96��96��96��96��96��97��97��97��97��97��97��97��97��97��98��98��98��98��98��98��98��98��98��99��99��99��99��99��99��99��99��99��100
12:49:59.789 [main] INFO suwayomi.tachidesk.server.util.WebInterfaceManager -- downloadVersionZipFile(WebUI): Downloading WebUI Done.
12:49:59.876 [main] INFO suwayomi.tachidesk.server.util.WebInterfaceManager isLocalWebUIValid(flavor= WebUI, path= /tmp/Suwayomi-WebUI-r1411) -- Verifying WebUI files...
12:50:00.721 [main] INFO suwayomi.tachidesk.server.util.WebInterfaceManager isLocalWebUIValid(flavor= WebUI, path= /tmp/Suwayomi-WebUI-r1411) -- Validation succeeded - md5: local= 8b156bacc8cf6172353c6223153334ca; expected= 8b156bacc8cf6172353c6223153334ca
12:50:00.725 [main] INFO suwayomi.tachidesk.server.util.WebInterfaceManager downloadVersion(version= r1411, flavor= WebUI) -- Extracting WebUI zip...
12:50:00.777 [main] INFO suwayomi.tachidesk.server.util.WebInterfaceManager downloadVersion(version= r1411, flavor= WebUI) -- Extracting WebUI zip Done.
12:50:00.781 [main] INFO suwayomi.tachidesk.server.JavalinSetup -- Serving web static files for WebUI
12:50:00.818 [main] WARN io.javalin.Javalin -- JDK15 and Kotlin 1.5 break reflection in different ways - the OpenAPI plugin will not work properly. Please visit https://github.com/tipsy/javalin/issues/1193 if you want to help fix this issue.
12:50:00.818 [main] WARN io.javalin.Javalin -- You can disable this warning by doing `OpenApiVersionUtil.logWarnings = false`
12:50:05.847 [Thread-9] INFO io.javalin.Javalin -- It looks like you created a Javalin instance, but you never started it.
12:50:05.848 [Thread-9] INFO io.javalin.Javalin -- Try: Javalin app = Javalin.create().start();
12:50:05.848 [Thread-9] INFO io.javalin.Javalin -- For more help, visit https://javalin.io/documentation#server-setup
12:50:05.849 [Thread-9] INFO io.javalin.Javalin -- To disable this message, do `JettyUtil.logIfNotStarted = false`
12:50:06.584 [main] INFO io.javalin.Javalin -- 
       __                      __ _            __ __
      / /____ _ _   __ ____ _ / /(_)____      / // /
 __  / // __ `/| | / // __ `// // // __ \    / // /_
/ /_/ // /_/ / | |/ // /_/ // // // / / /   /__  __/
\____/ \__,_/  |___/ \__,_//_//_//_/ /_/      /_/

          https://javalin.io/documentation

12:50:06.586 [main] INFO io.javalin.Javalin -- Starting Javalin ...
12:50:06.603 [main] INFO io.javalin.Javalin -- You are running Javalin 4.6.8 (released May 4, 2023. Your Javalin version is 300 days old. Consider checking for a newer version.).
12:50:06.822 [main] INFO io.javalin.Javalin -- Static file handler added: StaticFileConfig(hostedPath=/, directory=/home/cloud/suwayomi/data/webUI, location=EXTERNAL, precompress=false, aliasCheck=null, headers={Cache-Control=max-age=0}). File system location: '/home/cloud/suwayomi/data/webUI'
12:50:06.824 [main] INFO io.javalin.Javalin -- Static file handler added: StaticFileConfig(hostedPath=/, directory=META-INF/resources/webjars, location=CLASSPATH, precompress=false, aliasCheck=null, headers={Cache-Control=max-age=31622400}). File system location: 'jar:file:/home/cloud/suwayomi/Suwayomi-Server-v1.0.0-r1498.jar!/META-INF/resources/webjars'
12:50:06.824 [main] INFO io.javalin.Javalin -- Listening on http://0.0.0.0:3000/
12:50:06.825 [main] INFO io.javalin.Javalin -- Javalin started in 240ms \o/
12:50:14.968 [qtp240919651-95] INFO io.javalin.Javalin -- Exception occurred while handling static resource
java.lang.NullPointerException: super.getResource(path) must not be null
	at io.javalin.jetty.ConfigurableHandler.getResource(JettyResourceHandler.kt:86)
	at io.javalin.jetty.JettyResourceHandler.handle(JettyResourceHandler.kt:41)
	at io.javalin.http.JavalinServlet$lifecycle$2$2.invoke(JavalinServlet.kt:51)
	at io.javalin.http.JavalinServlet$lifecycle$2$2.invoke(JavalinServlet.kt:46)
	at io.javalin.http.JavalinServletHandler.executeNextTask(JavalinServletHandler.kt:99)
	at io.javalin.http.JavalinServletHandler.queueNextTaskOrFinish$lambda-1(JavalinServletHandler.kt:85)
	at java.base/java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:1187)
	at java.base/java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:2309)
	at io.javalin.http.JavalinServletHandler.queueNextTaskOrFinish$javalin(JavalinServletHandler.kt:85)
	at io.javalin.http.JavalinServletHandler.executeNextTask$lambda-11$lambda-10(JavalinServletHandler.kt:119)
	at java.base/java.util.concurrent.CompletableFuture.uniApplyNow(CompletableFuture.java:684)
	at java.base/java.util.concurrent.CompletableFuture.uniApplyStage(CompletableFuture.java:662)
	at java.base/java.util.concurrent.CompletableFuture.thenApply(CompletableFuture.java:2168)
	at io.javalin.http.JavalinServletHandler.executeNextTask(JavalinServletHandler.kt:119)
	at io.javalin.http.JavalinServletHandler.queueNextTaskOrFinish$lambda-1(JavalinServletHandler.kt:85)
	at java.base/java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:1187)
	at java.base/java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:2309)
	at io.javalin.http.JavalinServletHandler.queueNextTaskOrFinish$javalin(JavalinServletHandler.kt:85)
	at io.javalin.http.JavalinServlet.service(JavalinServlet.kt:89)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at io.javalin.jetty.JavalinJettyServlet.service(JavalinJettyServlet.kt:58)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:554)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
	at io.javalin.jetty.JettyServer$start$wsAndHttpHandler$1.doHandle(JettyServer.kt:52)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:505)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355)
	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:516)
	at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487)
	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
	at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
	at java.base/java.lang.Thread.run(Thread.java:840)
12:50:15.036 [qtp240919651-91] INFO io.javalin.Javalin -- Exception occurred while handling static resource
java.lang.NullPointerException: super.getResource(path) must not be null
	at io.javalin.jetty.ConfigurableHandler.getResource(JettyResourceHandler.kt:86)
	at io.javalin.jetty.JettyResourceHandler.handle(JettyResourceHandler.kt:41)
	at io.javalin.http.JavalinServlet$lifecycle$2$2.invoke(JavalinServlet.kt:51)
	at io.javalin.http.JavalinServlet$lifecycle$2$2.invoke(JavalinServlet.kt:46)
	at io.javalin.http.JavalinServletHandler.executeNextTask(JavalinServletHandler.kt:99)
	at io.javalin.http.JavalinServletHandler.queueNextTaskOrFinish$lambda-1(JavalinServletHandler.kt:85)
	at java.base/java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:1187)
	at java.base/java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:2309)
	at io.javalin.http.JavalinServletHandler.queueNextTaskOrFinish$javalin(JavalinServletHandler.kt:85)
	at io.javalin.http.JavalinServletHandler.executeNextTask$lambda-11$lambda-10(JavalinServletHandler.kt:119)
	at java.base/java.util.concurrent.CompletableFuture.uniApplyNow(CompletableFuture.java:684)
	at java.base/java.util.concurrent.CompletableFuture.uniApplyStage(CompletableFuture.java:662)
	at java.base/java.util.concurrent.CompletableFuture.thenApply(CompletableFuture.java:2168)
	at io.javalin.http.JavalinServletHandler.executeNextTask(JavalinServletHandler.kt:119)
	at io.javalin.http.JavalinServletHandler.queueNextTaskOrFinish$lambda-1(JavalinServletHandler.kt:85)
	at java.base/java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:1187)
	at java.base/java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:2309)
	at io.javalin.http.JavalinServletHandler.queueNextTaskOrFinish$javalin(JavalinServletHandler.kt:85)
	at io.javalin.http.JavalinServlet.service(JavalinServlet.kt:89)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at io.javalin.jetty.JavalinJettyServlet.service(JavalinJettyServlet.kt:58)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:554)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
	at io.javalin.jetty.JettyServer$start$wsAndHttpHandler$1.doHandle(JettyServer.kt:52)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:505)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355)
	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:516)
	at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487)
	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
	at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:137)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
	at java.base/java.lang.Thread.run(Thread.java:840)
12:50:15.179 [qtp240919651-90] INFO io.javalin.Javalin -- Exception occurred while handling static resource
java.lang.NullPointerException: super.getResource(path) must not be null
	at io.javalin.jetty.ConfigurableHandler.getResource(JettyResourceHandler.kt:86)
	at io.javalin.jetty.JettyResourceHandler.handle(JettyResourceHandler.kt:41)
	at io.javalin.http.JavalinServlet$lifecycle$2$2.invoke(JavalinServlet.kt:51)
	at io.javalin.http.JavalinServlet$lifecycle$2$2.invoke(JavalinServlet.kt:46)
	at io.javalin.http.JavalinServletHandler.executeNextTask(JavalinServletHandler.kt:99)
	at io.javalin.http.JavalinServletHandler.queueNextTaskOrFinish$lambda-1(JavalinServletHandler.kt:85)
	at java.base/java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:1187)
	at java.base/java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:2309)
	at io.javalin.http.JavalinServletHandler.queueNextTaskOrFinish$javalin(JavalinServletHandler.kt:85)
	at io.javalin.http.JavalinServletHandler.executeNextTask$lambda-11$lambda-10(JavalinServletHandler.kt:119)
	at java.base/java.util.concurrent.CompletableFuture.uniApplyNow(CompletableFuture.java:684)
	at java.base/java.util.concurrent.CompletableFuture.uniApplyStage(CompletableFuture.java:662)
	at java.base/java.util.concurrent.CompletableFuture.thenApply(CompletableFuture.java:2168)
	at io.javalin.http.JavalinServletHandler.executeNextTask(JavalinServletHandler.kt:119)
	at io.javalin.http.JavalinServletHandler.queueNextTaskOrFinish$lambda-1(JavalinServletHandler.kt:85)
	at java.base/java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:1187)
	at java.base/java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:2309)
	at io.javalin.http.JavalinServletHandler.queueNextTaskOrFinish$javalin(JavalinServletHandler.kt:85)
	at io.javalin.http.JavalinServlet.service(JavalinServlet.kt:89)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at io.javalin.jetty.JavalinJettyServlet.service(JavalinJettyServlet.kt:58)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:554)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
	at io.javalin.jetty.JettyServer$start$wsAndHttpHandler$1.doHandle(JettyServer.kt:52)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:505)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355)
	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:516)
	at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487)
	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
	at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:137)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
	at java.base/java.lang.Thread.run(Thread.java:840)

@Throun
Copy link
Author

Throun commented Aug 26, 2024

After coming back to this last week, I believe I found the problem. In short, atomic versions of Fedora set $HOME to /var/home, and symlinks /home to it. However, aside from Silverblue, they create users during installation, and that change has not yet been added to the installer, so initial users still have $HOME as /home (users created after install are not affected).

My wonder is why this is an issue; there should be no functional difference between the two, and other programs I use work as they should with this 'bug'. Maybe symlinks break how the server delivers files?

@Xananax
Copy link

Xananax commented Jan 4, 2025

Interesting! I backed up my Tachidesk directory on an external repo, and was symlinking it to $HOME/.local/share/Tachidesk.

Instead, I used this:
java -Dsuwayomi.tachidesk.config.server.rootDir=$(pwd) -jar Suwayomi-Server-v1.....

And this works! Thanks for your findings.

The weird part is that symlinking the directory from an external disk worked on another setup (Arch) but not on this one (Ubuntu).

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

No branches or pull requests

6 participants