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

Unable to auto download mods with brackets in their file names #2983

Closed
mgrinspan opened this issue Jul 13, 2024 · 13 comments · Fixed by #2985 or #2986
Closed

Unable to auto download mods with brackets in their file names #2983

mgrinspan opened this issue Jul 13, 2024 · 13 comments · Fixed by #2985 or #2986

Comments

@mgrinspan
Copy link

Describe the problem

While trying to auto download the "meatballcraft" modpack, the server crashes with the error

Caused by: java.net.URISyntaxException: Illegal character in path at index 55: https://edge.forgecdn.net/files/3177/845/ItemFavorites-[1.12.2]-1.2.2.jar?api-key=********

This seems fixable via this SO solution or otherwise URL encoding brackets in URLs ([ -> %5B and ] -> %5D to be specific)

Container definition

docker run
  -d
  --name='minecraft-server'
  --net='br0'
  --ip='192.168.100.17'
  -e TZ="America/New_York"
  -e HOST_OS="Unraid"
  -e HOST_HOSTNAME="UNRAID-0"
  -e HOST_CONTAINERNAME="minecraft-server"
  -e 'TCP_PORT_25575'='25575'
  -e 'TCP_PORT_25565'='25565'
  -e 'EULA'='TRUE'
  -e 'TYPE'='AUTO_CURSEFORGE'
  -e 'TZ'='America/New_York'
  -e 'MEMORY'='18G'
  -e 'USE_AIKAR_FLAGS'='TRUE'
  -l net.unraid.docker.managed=dockerman
  -v '/mnt/cache/minecraft/curseforge-meatballcraft-2024-07-12':'/data':'rw'
  -e CF_SLUG=meatballcraft
  -e CF_API_KEY='$2a$10$REDACTEDREDACTEDREDACTEDREDACTEDREDACTED' 'itzg/minecraft-server:java8'

Container logs

                at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:501)
                at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:399)
                at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:994)
                at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
                at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
                at java.lang.Thread.run(Thread.java:748)
        Suppressed: java.lang.Exception: #block terminated with an error
                at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:103)
                at reactor.core.publisher.Mono.block(Mono.java:1712)
                at me.itzg.helpers.curseforge.CurseForgeInstaller.processModpack(CurseForgeInstaller.java:586)
                at me.itzg.helpers.curseforge.CurseForgeInstaller.resolveModpackFileAndProcess(CurseForgeInstaller.java:400)
                at me.itzg.helpers.curseforge.CurseForgeInstaller.installByRetrievingModpackZip(CurseForgeInstaller.java:262)
                at me.itzg.helpers.curseforge.CurseForgeInstaller.lambda$install$3(CurseForgeInstaller.java:181)
                at me.itzg.helpers.curseforge.CurseForgeInstaller.install(CurseForgeInstaller.java:218)
                at me.itzg.helpers.curseforge.CurseForgeInstaller.install(CurseForgeInstaller.java:180)
                at me.itzg.helpers.curseforge.InstallCurseForgeCommand.call(InstallCurseForgeCommand.java:213)
                at me.itzg.helpers.curseforge.InstallCurseForgeCommand.call(InstallCurseForgeCommand.java:29)
                at picocli.CommandLine.executeUserObject(CommandLine.java:2045)
                at picocli.CommandLine.access$1500(CommandLine.java:148)
                at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2465)
                at picocli.CommandLine$RunLast.handle(CommandLine.java:2457)
                at picocli.CommandLine$RunLast.handle(CommandLine.java:2419)
                at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2277)
                at picocli.CommandLine$RunLast.execute(CommandLine.java:2421)
                at picocli.CommandLine.execute(CommandLine.java:2174)
                at me.itzg.helpers.McImageHelper.main(McImageHelper.java:159)
Caused by: java.net.URISyntaxException: Illegal character in path at index 55: https://edge.forgecdn.net/files/3177/845/ItemFavorites-[1.12.2]-1.2.2.jar?api-key=REDACTED
        at java.net.URI$Parser.fail(URI.java:2847)
        at java.net.URI$Parser.checkChars(URI.java:3020)
        at java.net.URI$Parser.parseHierarchical(URI.java:3104)
        at java.net.URI$Parser.parse(URI.java:3052)
        at java.net.URI.<init>(URI.java:588)
        at reactor.netty.http.client.HttpClientConnect$HttpClientHandler.redirect(HttpClientConnect.java:633)
        at reactor.netty.http.client.HttpClientConnect$HttpClientHandler.test(HttpClientConnect.java:685)
        at reactor.netty.http.client.HttpClientConnect$HttpClientHandler.test(HttpClientConnect.java:450)
        at reactor.util.retry.RetrySpec.lambda$null$5(RetrySpec.java:369)
        at reactor.core.publisher.FluxConcatMapNoPrefetch$FluxConcatMapNoPrefetchSubscriber.onNext(FluxConcatMapNoPrefetch.java:183)
        at reactor.core.publisher.FluxContextWrite$ContextWriteSubscriber.onNext(FluxContextWrite.java:107)
        at reactor.core.publisher.SinkManyEmitterProcessor.drain(SinkManyEmitterProcessor.java:471)
        at reactor.core.publisher.SinkManyEmitterProcessor$EmitterInner.drainParent(SinkManyEmitterProcessor.java:615)
        at reactor.core.publisher.FluxPublish$PubSubInner.request(FluxPublish.java:873)
        at reactor.core.publisher.FluxContextWrite$ContextWriteSubscriber.request(FluxContextWrite.java:136)
        at reactor.core.publisher.FluxConcatMapNoPrefetch$FluxConcatMapNoPrefetchSubscriber.request(FluxConcatMapNoPrefetch.java:336)
        at reactor.core.publisher.FluxContextWrite$ContextWriteSubscriber.request(FluxContextWrite.java:136)
        at reactor.core.publisher.Operators$DeferredSubscription.request(Operators.java:1717)
        at reactor.core.publisher.FluxRetryWhen$RetryWhenMainSubscriber.onError(FluxRetryWhen.java:192)
        at reactor.core.publisher.MonoCreate$DefaultMonoSink.error(MonoCreate.java:201)
        at reactor.netty.http.client.HttpClientConnect$HttpObserver.onUncaughtException(HttpClientConnect.java:403)
        at reactor.netty.ReactorNetty$CompositeConnectionObserver.onUncaughtException(ReactorNetty.java:708)
        at reactor.netty.resources.DefaultPooledConnectionProvider$DisposableAcquire.onUncaughtException(DefaultPooledConnectionProvider.java:223)
        at reactor.netty.resources.DefaultPooledConnectionProvider$PooledConnection.onUncaughtException(DefaultPooledConnectionProvider.java:476)
        at reactor.netty.http.client.HttpClientOperations.afterInboundComplete(HttpClientOperations.java:335)
        at reactor.netty.channel.ChannelOperations.terminate(ChannelOperations.java:501)
        at reactor.netty.http.client.HttpClientOperations.onInboundNext(HttpClientOperations.java:793)
        at reactor.netty.channel.ChannelOperationsHandler.channelRead(ChannelOperationsHandler.java:114)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
        at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:289)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
        at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:436)
        at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346)
        at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318)
        at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
        at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1475)
        at io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1338)
        at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1387)
        at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:530)
        at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:469)
        at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:290)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
        at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1407)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
        at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:918)
        at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:799)
        at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:501)
        at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:399)
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:994)
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.lang.Thread.run(Thread.java:748)
[init] ERROR failed to auto-install CurseForge modpack

** Press ANY KEY to close this window ** 
@itzg
Copy link
Owner

itzg commented Jul 13, 2024

So far I am finding it will be non-trivial to fix this. The invalid URL is caused by a redirect being processed within a library used by my tool

https://github.com/reactor/reactor-netty/blob/v1.1.20/reactor-netty-http/src/main/java/reactor/netty/http/client/HttpClientConnect.java#L633

It's really not a valid URL even though, yes, there's a "common practice" of fixing up square brackets that people incorrectly include in URLs. The mod or modpack author should really fix their metadata. I'll take a little more time to investigate, but I will quickly get annoyed having to work around other people's mistakes.

@mgrinspan
Copy link
Author

I hadn't considered that it could be a redirect and therefore somewhat out of your control, that's very unfortunate. Would it instead be possible to handle the URISyntaxException (and maybe other exceptions) similarly to mods that don't allow automated downloading? If I recall correctly, that system spits out a list of mods to download manually and then resumes gracefully afterwards.

@itzg
Copy link
Owner

itzg commented Jul 13, 2024

Speaking of which, the only practical solution I can think is for you to pre-download that particular one and put it in /downloads directory attached to the container

https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/mod-platforms/auto-curseforge/#manual-downloads

The startup should grab the file form there rather than attempting to download.

@mgrinspan
Copy link
Author

I've tried that, but it still attempts to download the mod in question. Is there some sort of naming convention? I'm sure I'm doing something wrong but I can't figure out what.

@itzg
Copy link
Owner

itzg commented Jul 13, 2024

It turns out I remembered the logic wrong. It was only looking in downloads directory when the mod didn't declare a URL. I'm working on enhancing that now.

@itzg
Copy link
Owner

itzg commented Jul 13, 2024

After this build pushes, re-pull the image and see if that also solves the download directory approach for you

https://github.com/itzg/docker-minecraft-server/actions/runs/9921068538

@mgrinspan
Copy link
Author

Unfortunately that doesn't seem to have made a difference.

Log
...
[mc-image-helper] 11:49:42.078 DEBUG : FILE FETCH: uri=https://mediafilez.forgecdn.net/files/2755/785/ChickenChunks-1.12.2-2.4.2.74-universal.jar headers=[user-agent: itzg/mc-image-helper/1.39.4 (cmd=install-curseforge), x-fetch-session: 518f8d02-8ac7-480c-8b5f-34dd8a7b553f, x-api-key: [redacted], host: mediafilez.forgecdn.net, accept: */*]
[mc-image-helper] 11:49:42.115 ERROR : 'install-curseforge' command failed. Version is 1.39.4
java.lang.IllegalArgumentException: Cannot resolve location header
	at reactor.netty.http.client.HttpClientConnect$HttpClientHandler.redirect(HttpClientConnect.java:641)
	Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException: 
Assembly trace from producer [reactor.core.publisher.MonoOnErrorResume] :
	reactor.core.publisher.Mono.checkpoint(Mono.java:2190)
	me.itzg.helpers.curseforge.CurseForgeInstaller.lambda$processFileFromModpack$19(CurseForgeInstaller.java:748)
Error has been observed at the following site(s):
	*__checkpoint() ⇢ at me.itzg.helpers.curseforge.CurseForgeInstaller.lambda$processFileFromModpack$19(CurseForgeInstaller.java:748)
	*____checkpoint ⇢ Downloading file from modpack 358194:3177845
	|_ checkpoint() ⇢ at me.itzg.helpers.curseforge.CurseForgeInstaller.lambda$processModpack$15(CurseForgeInstaller.java:587)
Original Stack Trace:
		at reactor.netty.http.client.HttpClientConnect$HttpClientHandler.redirect(HttpClientConnect.java:641)
		at reactor.netty.http.client.HttpClientConnect$HttpClientHandler.test(HttpClientConnect.java:685)
		at reactor.netty.http.client.HttpClientConnect$HttpClientHandler.test(HttpClientConnect.java:450)
		at reactor.util.retry.RetrySpec.lambda$null$5(RetrySpec.java:369)
		at reactor.core.publisher.FluxConcatMapNoPrefetch$FluxConcatMapNoPrefetchSubscriber.onNext(FluxConcatMapNoPrefetch.java:183)
		at reactor.core.publisher.FluxContextWrite$ContextWriteSubscriber.onNext(FluxContextWrite.java:107)
		at reactor.core.publisher.SinkManyEmitterProcessor.drain(SinkManyEmitterProcessor.java:471)
		at reactor.core.publisher.SinkManyEmitterProcessor$EmitterInner.drainParent(SinkManyEmitterProcessor.java:615)
		at reactor.core.publisher.FluxPublish$PubSubInner.request(FluxPublish.java:873)
		at reactor.core.publisher.FluxContextWrite$ContextWriteSubscriber.request(FluxContextWrite.java:136)
		at reactor.core.publisher.FluxConcatMapNoPrefetch$FluxConcatMapNoPrefetchSubscriber.request(FluxConcatMapNoPrefetch.java:336)
		at reactor.core.publisher.FluxContextWrite$ContextWriteSubscriber.request(FluxContextWrite.java:136)
		at reactor.core.publisher.Operators$DeferredSubscription.request(Operators.java:1717)
		at reactor.core.publisher.FluxRetryWhen$RetryWhenMainSubscriber.onError(FluxRetryWhen.java:192)
		at reactor.core.publisher.MonoCreate$DefaultMonoSink.error(MonoCreate.java:201)
		at reactor.netty.http.client.HttpClientConnect$HttpObserver.onUncaughtException(HttpClientConnect.java:403)
		at reactor.netty.ReactorNetty$CompositeConnectionObserver.onUncaughtException(ReactorNetty.java:708)
		at reactor.netty.resources.DefaultPooledConnectionProvider$DisposableAcquire.onUncaughtException(DefaultPooledConnectionProvider.java:223)
		at reactor.netty.resources.DefaultPooledConnectionProvider$PooledConnection.onUncaughtException(DefaultPooledConnectionProvider.java:476)
		at reactor.netty.http.client.HttpClientOperations.afterInboundComplete(HttpClientOperations.java:335)
		at reactor.netty.channel.ChannelOperations.terminate(ChannelOperations.java:501)
		at reactor.netty.http.client.HttpClientOperations.onInboundNext(HttpClientOperations.java:793)
		at reactor.netty.channel.ChannelOperationsHandler.channelRead(ChannelOperationsHandler.java:114)
		at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
		at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
		at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
		at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:289)
		at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)
		at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
		at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
		at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:436)
		at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346)
		at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318)
		at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251)
		at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)
		at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
		at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
		at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1475)
		at io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1338)
		at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1387)
		at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:530)
		at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:469)
		at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:290)
		at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
		at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
		at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
		at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1407)
		at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440)
		at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
		at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:918)
		at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:799)
		at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:501)
		at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:399)
		at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:994)
		at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
		at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
		at java.lang.Thread.run(Thread.java:748)
	Suppressed: java.lang.Exception: #block terminated with an error
		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:103)
		at reactor.core.publisher.Mono.block(Mono.java:1712)
		at me.itzg.helpers.curseforge.CurseForgeInstaller.processModpack(CurseForgeInstaller.java:590)
		at me.itzg.helpers.curseforge.CurseForgeInstaller.resolveModpackFileAndProcess(CurseForgeInstaller.java:401)
		at me.itzg.helpers.curseforge.CurseForgeInstaller.installByRetrievingModpackZip(CurseForgeInstaller.java:263)
		at me.itzg.helpers.curseforge.CurseForgeInstaller.lambda$install$3(CurseForgeInstaller.java:182)
		at me.itzg.helpers.curseforge.CurseForgeInstaller.install(CurseForgeInstaller.java:219)
		at me.itzg.helpers.curseforge.CurseForgeInstaller.install(CurseForgeInstaller.java:181)
		at me.itzg.helpers.curseforge.InstallCurseForgeCommand.call(InstallCurseForgeCommand.java:213)
		at me.itzg.helpers.curseforge.InstallCurseForgeCommand.call(InstallCurseForgeCommand.java:29)
		at picocli.CommandLine.executeUserObject(CommandLine.java:2045)
		at picocli.CommandLine.access$1500(CommandLine.java:148)
		at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2465)
		at picocli.CommandLine$RunLast.handle(CommandLine.java:2457)
		at picocli.CommandLine$RunLast.handle(CommandLine.java:2419)
		at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2277)
		at picocli.CommandLine$RunLast.execute(CommandLine.java:2421)
		at picocli.CommandLine.execute(CommandLine.java:2174)
		at me.itzg.helpers.McImageHelper.main(McImageHelper.java:159)
Caused by: java.net.URISyntaxException: Illegal character in path at index 55: https://edge.forgecdn.net/files/3177/845/ItemFavorites-[1.12.2]-1.2.2.jar?api-key=REDACTED
	at java.net.URI$Parser.fail(URI.java:2847)
	at java.net.URI$Parser.checkChars(URI.java:3020)
	at java.net.URI$Parser.parseHierarchical(URI.java:3104)
	at java.net.URI$Parser.parse(URI.java:3052)
	at java.net.URI.\u003cinit\u003e(URI.java:588)
	at reactor.netty.http.client.HttpClientConnect$HttpClientHandler.redirect(HttpClientConnect.java:633)
	at reactor.netty.http.client.HttpClientConnect$HttpClientHandler.test(HttpClientConnect.java:685)
	at reactor.netty.http.client.HttpClientConnect$HttpClientHandler.test(HttpClientConnect.java:450)
	at reactor.util.retry.RetrySpec.lambda$null$5(RetrySpec.java:369)
	at reactor.core.publisher.FluxConcatMapNoPrefetch$FluxConcatMapNoPrefetchSubscriber.onNext(FluxConcatMapNoPrefetch.java:183)
	at reactor.core.publisher.FluxContextWrite$ContextWriteSubscriber.onNext(FluxContextWrite.java:107)
	at reactor.core.publisher.SinkManyEmitterProcessor.drain(SinkManyEmitterProcessor.java:471)
	at reactor.core.publisher.SinkManyEmitterProcessor$EmitterInner.drainParent(SinkManyEmitterProcessor.java:615)
	at reactor.core.publisher.FluxPublish$PubSubInner.request(FluxPublish.java:873)
	at reactor.core.publisher.FluxContextWrite$ContextWriteSubscriber.request(FluxContextWrite.java:136)
	at reactor.core.publisher.FluxConcatMapNoPrefetch$FluxConcatMapNoPrefetchSubscriber.request(FluxConcatMapNoPrefetch.java:336)
	at reactor.core.publisher.FluxContextWrite$ContextWriteSubscriber.request(FluxContextWrite.java:136)
	at reactor.core.publisher.Operators$DeferredSubscription.request(Operators.java:1717)
	at reactor.core.publisher.FluxRetryWhen$RetryWhenMainSubscriber.onError(FluxRetryWhen.java:192)
	at reactor.core.publisher.MonoCreate$DefaultMonoSink.error(MonoCreate.java:201)
	at reactor.netty.http.client.HttpClientConnect$HttpObserver.onUncaughtException(HttpClientConnect.java:403)
	at reactor.netty.ReactorNetty$CompositeConnectionObserver.onUncaughtException(ReactorNetty.java:708)
	at reactor.netty.resources.DefaultPooledConnectionProvider$DisposableAcquire.onUncaughtException(DefaultPooledConnectionProvider.java:223)
	at reactor.netty.resources.DefaultPooledConnectionProvider$PooledConnection.onUncaughtException(DefaultPooledConnectionProvider.java:476)
	at reactor.netty.http.client.HttpClientOperations.afterInboundComplete(HttpClientOperations.java:335)
	at reactor.netty.channel.ChannelOperations.terminate(ChannelOperations.java:501)
	at reactor.netty.http.client.HttpClientOperations.onInboundNext(HttpClientOperations.java:793)
	at reactor.netty.channel.ChannelOperationsHandler.channelRead(ChannelOperationsHandler.java:114)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
	at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:289)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
	at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:436)
	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346)
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318)
	at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
	at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1475)
	at io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1338)
	at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1387)
	at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:530)
	at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:469)
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:290)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1407)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:918)
	at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:799)
	at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:501)
	at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:399)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:994)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.lang.Thread.run(Thread.java:748)
+ log 'ERROR failed to auto-install CurseForge modpack'
+ local oldState
++ shopt -po xtrace
+ oldState='set -o xtrace'
+ shopt -u -o xtrace
[init] 2024-07-13 11:49:42-04:00 ERROR failed to auto-install CurseForge modpack
+ exit 1

@itzg
Copy link
Owner

itzg commented Jul 13, 2024

Hmm, that's odd. For comparison here's the compose file I'm using:

services:
  mc:
    image: itzg/minecraft-server:java8
    ports:
      - "25565:25565"
    environment:
      EULA: true
      MOD_PLATFORM: AUTO_CURSEFORGE
      CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/meatballcraft
      # from .env
      CF_API_KEY: ${CF_API_KEY}
      MEMORY: 4G
    volumes:
      - ./downloads:/downloads:ro
      - data:/data

volumes:
  data:

and my file setup looks like
image

@itzg
Copy link
Owner

itzg commented Jul 13, 2024

...after that it looks like there's an unrelated bug I'm seeing that I'll investigate:

mc-1  | [mc-image-helper] 16:08:33.732 ERROR : 'install-curseforge' command failed. Version is 1.39.4
mc-1  | java.lang.IllegalArgumentException: 'other' is different type of Path
mc-1  |         at sun.nio.fs.UnixPath.relativize(UnixPath.java:416)
mc-1  |         at sun.nio.fs.UnixPath.relativize(UnixPath.java:43)
mc-1  |         at me.itzg.helpers.files.Manifests.lambda$relativizeAll$1(Manifests.java:94)

@mgrinspan
Copy link
Author

Ah, I had the mods in /downloads/mods not /downloads. I'm also getting that same error now.

Worth noting: the ItemFavorites mod doesn't seem to have been copied to the mods folder

@itzg
Copy link
Owner

itzg commented Jul 13, 2024

Yep it turns out you're seeing symptoms of the new bug I found :)

@itzg
Copy link
Owner

itzg commented Jul 13, 2024

This build should fix the remaining issues. /downloads/mods will be correctly usable with this too.

https://github.com/itzg/docker-minecraft-server/actions/runs/9922092016

@mgrinspan
Copy link
Author

Thank you! It all works now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
2 participants