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

500 on /pages endpoint with PDFs on Linux Mint #1834

Closed
5 tasks done
DRWAUN opened this issue Jan 19, 2025 · 10 comments
Closed
5 tasks done

500 on /pages endpoint with PDFs on Linux Mint #1834

DRWAUN opened this issue Jan 19, 2025 · 10 comments

Comments

@DRWAUN
Copy link

DRWAUN commented Jan 19, 2025

Steps to reproduce

  1. Have a PDF in your library
  2. Open said PDF with Komga (browser, Mihon or Komelia)

Expected behavior

Book loads

Actual behavior

500 on the /pages/ endpoints with the book not loading and the console message: Could not initialize class java.awt.GraphicsEnvironment$LocalGE.

Logs

`2025-01-19T15:29:06.627+01:00 ERROR 36568 --- [io-25600-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Handler dispatch failed: java.lang.NoClassDefFoundError: Could not initialize class java.awt.GraphicsEnvironment$LocalGE] with root cause

java.lang.ExceptionInInitializerError: Exception java.awt.AWTError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable. [in thread "task-7"]
	at java.desktop/sun.awt.X11GraphicsEnvironment.initDisplay(Native Method) ~[na:na]
	at java.desktop/sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:105) ~[na:na]
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:319) ~[na:na]
	at java.desktop/sun.awt.X11GraphicsEnvironment.initStatic(X11GraphicsEnvironment.java:64) ~[na:na]
	at java.desktop/sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:59) ~[na:na]
	at java.desktop/sun.awt.PlatformGraphicsInfo.createGE(PlatformGraphicsInfo.java:37) ~[na:na]
	at java.desktop/java.awt.GraphicsEnvironment$LocalGE.createGE(GraphicsEnvironment.java:91) ~[na:na]
	at java.desktop/java.awt.GraphicsEnvironment$LocalGE.<clinit>(GraphicsEnvironment.java:82) ~[na:na]
	at java.desktop/java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:104) ~[na:na]
	at java.desktop/sun.awt.X11.XToolkit.<clinit>(XToolkit.java:225) ~[na:na]
	at java.desktop/sun.awt.PlatformGraphicsInfo.createToolkit(PlatformGraphicsInfo.java:41) ~[na:na]
	at java.desktop/java.awt.Toolkit.getDefaultToolkit(Toolkit.java:595) ~[na:na]
	at java.desktop/java.awt.Toolkit.getEventQueue(Toolkit.java:1489) ~[na:na]
	at java.desktop/java.awt.EventQueue.invokeLater(EventQueue.java:1316) ~[na:na]
	at java.desktop/javax.swing.SwingUtilities.invokeLater(SwingUtilities.java:1421) ~[na:na]
	at org.jetbrains.skiko.SwingDispatcher.dispatch(MainUIDispatcher.awt.kt:32) ~[skiko-awt-0.7.85.4.jar:na]
	at kotlinx.coroutines.internal.DispatchedContinuationKt.resumeCancellableWith(DispatchedContinuation.kt:318) ~[kotlinx-coroutines-core-jvm-1.8.1.jar:na]
	at kotlinx.coroutines.intrinsics.CancellableKt.startCoroutineCancellable(Cancellable.kt:26) ~[kotlinx-coroutines-core-jvm-1.8.1.jar:na]
	at kotlinx.coroutines.intrinsics.CancellableKt.startCoroutineCancellable$default(Cancellable.kt:21) ~[kotlinx-coroutines-core-jvm-1.8.1.jar:na]
	at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:168) ~[kotlinx-coroutines-core-jvm-1.8.1.jar:na]
	at kotlinx.coroutines.BuildersKt.withContext(Unknown Source) ~[kotlinx-coroutines-core-jvm-1.8.1.jar:na]
	at androidx.compose.ui.window.Application_desktopKt.awaitApplication(Application.desktop.kt:198) ~[ui-desktop-1.5.11.jar:na]
	at androidx.compose.ui.window.Application_desktopKt$application$1.invokeSuspend(Application.desktop.kt:114) ~[ui-desktop-1.5.11.jar:na]
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) ~[kotlin-stdlib-1.9.25.jar:1.9.25-release-852]
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104) ~[kotlinx-coroutines-core-jvm-1.8.1.jar:na]
	at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:277) ~[kotlinx-coroutines-core-jvm-1.8.1.jar:na]
	at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:95) ~[kotlinx-coroutines-core-jvm-1.8.1.jar:na]
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:69) ~[kotlinx-coroutines-core-jvm-1.8.1.jar:na]
	at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source) ~[kotlinx-coroutines-core-jvm-1.8.1.jar:na]
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:48) ~[kotlinx-coroutines-core-jvm-1.8.1.jar:na]
	at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source) ~[kotlinx-coroutines-core-jvm-1.8.1.jar:na]
	at androidx.compose.ui.window.Application_desktopKt.application(Application.desktop.kt:113) ~[ui-desktop-1.5.11.jar:na]
	at androidx.compose.ui.window.Application_desktopKt.application$default(Application.desktop.kt:105) ~[ui-desktop-1.5.11.jar:na]
	at org.gotson.komga.application.gui.TrayIconRunner.runTray(TrayIconRunner.kt:40) ~[komga-tray-1.18.0.jar:na]
	at org.gotson.komga.application.gui.TrayIconRunner.run(TrayIconRunner.kt:36) ~[komga-tray-1.18.0.jar:na]
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[na:na]
	at java.base/java.lang.reflect.Method.invoke(Method.java:580) ~[na:na]
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:359) ~[spring-aop-6.2.0.jar:6.2.0]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:196) ~[spring-aop-6.2.0.jar:6.2.0]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-6.2.0.jar:6.2.0]
	at org.springframework.aop.interceptor.AsyncExecutionInterceptor.lambda$invoke$0(AsyncExecutionInterceptor.java:114) ~[spring-aop-6.2.0.jar:6.2.0]
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317) ~[na:na]
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[na:na]
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[na:na]
	at java.base/java.lang.Thread.run(Thread.java:1570) ~[na:na]

2025-01-19T15:29:06.711+01:00 ERROR 36568 --- [io-25600-exec-5] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Handler dispatch failed: java.lang.NoClassDefFoundError: Could not initialize class java.awt.GraphicsEnvironment$LocalGE] with root cause

java.lang.ExceptionInInitializerError: Exception java.awt.AWTError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable. [in thread "task-7"]
	at java.desktop/sun.awt.X11GraphicsEnvironment.initDisplay(Native Method) ~[na:na]
	at java.desktop/sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:105) ~[na:na]
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:319) ~[na:na]
	at java.desktop/sun.awt.X11GraphicsEnvironment.initStatic(X11GraphicsEnvironment.java:64) ~[na:na]
	at java.desktop/sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:59) ~[na:na]
	at java.desktop/sun.awt.PlatformGraphicsInfo.createGE(PlatformGraphicsInfo.java:37) ~[na:na]
	at java.desktop/java.awt.GraphicsEnvironment$LocalGE.createGE(GraphicsEnvironment.java:91) ~[na:na]
	at java.desktop/java.awt.GraphicsEnvironment$LocalGE.<clinit>(GraphicsEnvironment.java:82) ~[na:na]
	at java.desktop/java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:104) ~[na:na]
	at java.desktop/sun.awt.X11.XToolkit.<clinit>(XToolkit.java:225) ~[na:na]
	at java.desktop/sun.awt.PlatformGraphicsInfo.createToolkit(PlatformGraphicsInfo.java:41) ~[na:na]
	at java.desktop/java.awt.Toolkit.getDefaultToolkit(Toolkit.java:595) ~[na:na]
	at java.desktop/java.awt.Toolkit.getEventQueue(Toolkit.java:1489) ~[na:na]
	at java.desktop/java.awt.EventQueue.invokeLater(EventQueue.java:1316) ~[na:na]
	at java.desktop/javax.swing.SwingUtilities.invokeLater(SwingUtilities.java:1421) ~[na:na]
	at org.jetbrains.skiko.SwingDispatcher.dispatch(MainUIDispatcher.awt.kt:32) ~[skiko-awt-0.7.85.4.jar:na]
	at kotlinx.coroutines.internal.DispatchedContinuationKt.resumeCancellableWith(DispatchedContinuation.kt:318) ~[kotlinx-coroutines-core-jvm-1.8.1.jar:na]
	at kotlinx.coroutines.intrinsics.CancellableKt.startCoroutineCancellable(Cancellable.kt:26) ~[kotlinx-coroutines-core-jvm-1.8.1.jar:na]
	at kotlinx.coroutines.intrinsics.CancellableKt.startCoroutineCancellable$default(Cancellable.kt:21) ~[kotlinx-coroutines-core-jvm-1.8.1.jar:na]
	at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:168) ~[kotlinx-coroutines-core-jvm-1.8.1.jar:na]
	at kotlinx.coroutines.BuildersKt.withContext(Unknown Source) ~[kotlinx-coroutines-core-jvm-1.8.1.jar:na]
	at androidx.compose.ui.window.Application_desktopKt.awaitApplication(Application.desktop.kt:198) ~[ui-desktop-1.5.11.jar:na]
	at androidx.compose.ui.window.Application_desktopKt$application$1.invokeSuspend(Application.desktop.kt:114) ~[ui-desktop-1.5.11.jar:na]
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) ~[kotlin-stdlib-1.9.25.jar:1.9.25-release-852]
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104) ~[kotlinx-coroutines-core-jvm-1.8.1.jar:na]
	at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:277) ~[kotlinx-coroutines-core-jvm-1.8.1.jar:na]
	at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:95) ~[kotlinx-coroutines-core-jvm-1.8.1.jar:na]
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:69) ~[kotlinx-coroutines-core-jvm-1.8.1.jar:na]
	at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source) ~[kotlinx-coroutines-core-jvm-1.8.1.jar:na]
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:48) ~[kotlinx-coroutines-core-jvm-1.8.1.jar:na]
	at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source) ~[kotlinx-coroutines-core-jvm-1.8.1.jar:na]
	at androidx.compose.ui.window.Application_desktopKt.application(Application.desktop.kt:113) ~[ui-desktop-1.5.11.jar:na]
	at androidx.compose.ui.window.Application_desktopKt.application$default(Application.desktop.kt:105) ~[ui-desktop-1.5.11.jar:na]
	at org.gotson.komga.application.gui.TrayIconRunner.runTray(TrayIconRunner.kt:40) ~[komga-tray-1.18.0.jar:na]
	at org.gotson.komga.application.gui.TrayIconRunner.run(TrayIconRunner.kt:36) ~[komga-tray-1.18.0.jar:na]
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[na:na]
	at java.base/java.lang.reflect.Method.invoke(Method.java:580) ~[na:na]
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:359) ~[spring-aop-6.2.0.jar:6.2.0]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:196) ~[spring-aop-6.2.0.jar:6.2.0]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-6.2.0.jar:6.2.0]
	at org.springframework.aop.interceptor.AsyncExecutionInterceptor.lambda$invoke$0(AsyncExecutionInterceptor.java:114) ~[spring-aop-6.2.0.jar:6.2.0]
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317) ~[na:na]
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[na:na]
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[na:na]
	at java.base/java.lang.Thread.run(Thread.java:1570) ~[na:na]`

Komga version

1.18.0

Operating system

Linux Mint 21.3

Installation method

from download.komga.org

Other details

I noticed this yesterday when I was still running an older version of Komga. I don´t know which one, but at least it was one that still launched like usual, so before 1.15.0 I suppose (see #1799 ). It seems to only happen to PDFs. cbz, epub and zip files don´t seem to be affected.
I had hoped that updating to the latest Komga version would fix it, but it seems not (and it introduced a new issue). It's strange, because it feels like it worked and then it didn´t anymore. I wouldn´t be surprised if Linux borked something, but I have no idea what it would be.
I used the workaround mentioned in #1799 to get 1.18.0 running.

Acknowledgements

  • I have searched the existing issues (open AND closed) and this is a new ticket, NOT a duplicate or related to another open issue.
  • I have written a short but informative title.
  • I have checked the FAQ.
  • I have updated the app to the latest version.
  • I will fill out all of the requested information in this form.
@DRWAUN DRWAUN added the triage label Jan 19, 2025
@gotson
Copy link
Owner

gotson commented Jan 20, 2025

Do you have X11 installed, or only Wayland ? Java does not work on Wayland yet.

@DRWAUN
Copy link
Author

DRWAUN commented Jan 20, 2025

Yes, I have X11 installed. Maybe good to mention it's Cinnamon Mint

@gotson
Copy link
Owner

gotson commented Jan 21, 2025

The error shown does not seem to have anything to do with PDF viewing. Could you provide a full logfile ?

@DRWAUN
Copy link
Author

DRWAUN commented Jan 21, 2025

Sure

komga.log

I restarted Komga and did a few actions to fill up the logs. I did notice something from the logs when running Komga from the terminal, but couldn´t find it in the actual log file strangely enough:

2025-01-21T19:28:20.464+01:00  INFO 159283 --- [askProcessor-26] o.g.komga.domain.service.BookAnalyzer    : Generate thumbnail for book: BookWithMedia(book=Book(name=The Everlasting Elf of the Evening Fragrant Dreams, url=file:/home/stmedia/resources/Komga/Test/The%20Everlasting%20Elf%20of%20the%20Evening/The%20Everlasting%20Elf%20of%20the%20Evening%20Fragrant%20Dreams.pdf, fileLastModified=2024-05-04T02:49:13.613, fileSize=94328687, fileHash=, fileHashKoreader=, number=2, id=0JJQE34N95T21, seriesId=0JJQE34N95T1Z, libraryId=0JJQE34GH5VZG, deletedDate=null, oneshot=false, createdDate=2025-01-21T19:28:15, lastModifiedDate=2025-01-21T19:28:15.681), media=Media(status=READY, mediaType=application/pdf, comment=null, bookId='0JJQE34N95T21', createdDate=2025-01-21T19:28:15, lastModifiedDate=2025-01-21T19:28:20.395))
2025-01-21T19:28:20.466+01:00  WARN 159283 --- [askProcessor-26] org.apache.pdfbox.pdfparser.COSParser    : found wrong object number. expected [142] found [143]
2025-01-21T19:28:20.466+01:00  WARN 159283 --- [askProcessor-26] org.apache.pdfbox.pdfparser.COSParser    : found wrong object number. expected [143] found [144]
2025-01-21T19:28:20.466+01:00  WARN 159283 --- [askProcessor-26] org.apache.pdfbox.pdfparser.COSParser    : found wrong object number. expected [144] found [145]
2025-01-21T19:28:20.466+01:00  WARN 159283 --- [askProcessor-26] org.apache.pdfbox.pdfparser.COSParser    : found wrong object number. expected [145] found [146]
2025-01-21T19:28:20.466+01:00  WARN 159283 --- [askProcessor-26] org.apache.pdfbox.pdfparser.COSParser    : found wrong object number. expected [146] found [147]
2025-01-21T19:28:20.466+01:00  WARN 159283 --- [askProcessor-26] org.apache.pdfbox.pdfparser.COSParser    : found wrong object number. expected [147] found [148]
2025-01-21T19:28:20.466+01:00  WARN 159283 --- [askProcessor-26] org.apache.pdfbox.pdfparser.COSParser    : found wrong object number. expected [148] found [149]
2025-01-21T19:28:20.466+01:00  WARN 159283 --- [askProcessor-26] org.apache.pdfbox.pdfparser.COSParser    : found wrong object number. expected [149] found [150]
2025-01-21T19:28:20.466+01:00  WARN 159283 --- [askProcessor-26] org.apache.pdfbox.pdfparser.COSParser    : found wrong object number. expected [150] found [151]
2025-01-21T19:28:20.466+01:00  WARN 159283 --- [askProcessor-26] org.apache.pdfbox.pdfparser.COSParser    : found wrong object number. expected [151] found [152]
2025-01-21T19:28:20.466+01:00  WARN 159283 --- [askProcessor-26] org.apache.pdfbox.pdfparser.COSParser    : found wrong object number. expected [152] found [153]
2025-01-21T19:28:20.466+01:00  WARN 159283 --- [askProcessor-26] org.apache.pdfbox.pdfparser.COSParser    : found wrong object number. expected [153] found [154]
2025-01-21T19:28:20.466+01:00  WARN 159283 --- [askProcessor-26] org.apache.pdfbox.pdfparser.COSParser    : found wrong object number. expected [154] found [155]
2025-01-21T19:28:20.466+01:00  WARN 159283 --- [askProcessor-26] org.apache.pdfbox.pdfparser.COSParser    : found wrong object number. expected [155] found [156]
Exception in thread "taskProcessor-26" java.lang.NoClassDefFoundError: Could not initialize class java.awt.GraphicsEnvironment$LocalGE
	at java.desktop/java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:104)
	at java.desktop/java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1182)
	at org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:310)
	at org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:247)
	at org.gotson.komga.infrastructure.mediacontainer.pdf.PdfExtractor.getPageContentAsImage(PdfExtractor.kt:48)
	at org.gotson.komga.domain.service.BookAnalyzer.getPoster(BookAnalyzer.kt:224)
	at org.gotson.komga.domain.service.BookAnalyzer.generateThumbnail(BookAnalyzer.kt:192)
	at org.gotson.komga.domain.service.BookLifecycle.generateThumbnailAndPersist(BookLifecycle.kt:143)
	at org.gotson.komga.application.tasks.TaskHandler.handleTask(TaskHandler.kt:96)
	at org.gotson.komga.application.tasks.TaskProcessor.takeAndProcess(TaskProcessor.kt:65)
	at org.gotson.komga.application.tasks.TaskProcessor.processAvailableTask$lambda$1(TaskProcessor.kt:48)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1570)
Caused by: java.lang.ExceptionInInitializerError: Exception java.awt.AWTError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable. [in thread "task-2"]
	at java.desktop/sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
	at java.desktop/sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:105)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:319)
	at java.desktop/sun.awt.X11GraphicsEnvironment.initStatic(X11GraphicsEnvironment.java:64)
	at java.desktop/sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:59)
	at java.desktop/sun.awt.PlatformGraphicsInfo.createGE(PlatformGraphicsInfo.java:37)
	at java.desktop/java.awt.GraphicsEnvironment$LocalGE.createGE(GraphicsEnvironment.java:91)
	at java.desktop/java.awt.GraphicsEnvironment$LocalGE.<clinit>(GraphicsEnvironment.java:82)
	at java.desktop/java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:104)
	at java.desktop/sun.awt.X11.XToolkit.<clinit>(XToolkit.java:225)
	at java.desktop/sun.awt.PlatformGraphicsInfo.createToolkit(PlatformGraphicsInfo.java:41)
	at java.desktop/java.awt.Toolkit.getDefaultToolkit(Toolkit.java:595)
	at java.desktop/java.awt.Toolkit.getEventQueue(Toolkit.java:1489)
	at java.desktop/java.awt.EventQueue.invokeLater(EventQueue.java:1316)
	at java.desktop/javax.swing.SwingUtilities.invokeLater(SwingUtilities.java:1421)
	at org.jetbrains.skiko.SwingDispatcher.dispatch(MainUIDispatcher.awt.kt:32)
	at kotlinx.coroutines.internal.DispatchedContinuationKt.resumeCancellableWith(DispatchedContinuation.kt:318)
	at kotlinx.coroutines.intrinsics.CancellableKt.startCoroutineCancellable(Cancellable.kt:26)
	at kotlinx.coroutines.intrinsics.CancellableKt.startCoroutineCancellable$default(Cancellable.kt:21)
	at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:168)
	at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
	at androidx.compose.ui.window.Application_desktopKt.awaitApplication(Application.desktop.kt:198)
	at androidx.compose.ui.window.Application_desktopKt$application$1.invokeSuspend(Application.desktop.kt:114)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
	at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:277)
	at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:95)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:69)
	at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:48)
	at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
	at androidx.compose.ui.window.Application_desktopKt.application(Application.desktop.kt:113)
	at androidx.compose.ui.window.Application_desktopKt.application$default(Application.desktop.kt:105)
	at org.gotson.komga.application.gui.TrayIconRunner.runTray(TrayIconRunner.kt:40)
	at org.gotson.komga.application.gui.TrayIconRunner.run(TrayIconRunner.kt:36)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:359)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:196)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
	at org.springframework.aop.interceptor.AsyncExecutionInterceptor.lambda$invoke$0(AsyncExecutionInterceptor.java:114)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
	... 3 more

I'm not sure how to enable debug logging as the documentation only mentions the jar and dockers options for that (and I don´t have the tray icon due to the other Mint issue)

@gotson
Copy link
Owner

gotson commented Jan 22, 2025

The logs don't show anything abnormal, except the X11 error. Can you try to run the jar and see if you have the same error with the PDF, so we can rule out the X11 error as noise ?

@DRWAUN
Copy link
Author

DRWAUN commented Jan 22, 2025

The logs don't show anything abnormal

So, the bit that I pasted into the comment is unrelated? Since that does mention some PDF renderer.

Can you try to run the jar and see if you have the same error with the PDF

Just tried this. Interestingly, the jar works just fine.

@DRWAUN
Copy link
Author

DRWAUN commented Jan 22, 2025

Alright, I did some more troubleshooting and started reinstalling, removing and installing again, clean installing. At first I thought the bug seemed to be happening from 1.15.0 onwards because 1.14.1 still worked and all the others didn´t.

However, while doing this I realised that for the newer versions, I was using the workaround described in #1799, since there was no other way of starting Komga Desktop from 1.15.0 onwards. But I was still starting 1.14.1 like how youŕe supposed to start the desktop application, since that one is unaffected by #1799. So when I realised I wasn´t doing a like-for-like scenario, I used the same command in the #1799 workaround and then got the error again.
This workaround unsets the GNOME_DESKTOP_SESSION_ID and I think that may well be the cause. I don´t know why, but that seems most likely so far.

I noticed this yesterday when I was still running an older version of Komga

I guess this wasn´t true then or something? I did get errors on the older version, but it must've been something else then... Or I was somehow running a version higher than 1.14.1 after all... Not sure.

If the workaround is indeed the cause, I think I'll use 1.14.1 until #1799 is resolved.

@gotson
Copy link
Owner

gotson commented Jan 23, 2025

@DRWAUN the log file you posted does not contain the snippet in your comment, so i overlooked the snippet.

@gotson
Copy link
Owner

gotson commented Jan 23, 2025

So it seems the PDFRenderer is tied to the display somehow (i don't know the specifics of the PDFBox library). As snd mentioned in #1799 (comment) the issue seems to lie with Linux Mint, not with Komga. There won't be any resolution to #1799 from Komga's end, so you could end up waiting a long time.

I would suggest you use Docker or Jar instead.

@DRWAUN
Copy link
Author

DRWAUN commented Jan 23, 2025

Alright. Thanks for looking into it. I'll close this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants