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

Replay filter returns invalid parameter #3115

Open
obydog002 opened this issue Jan 15, 2024 · 6 comments
Open

Replay filter returns invalid parameter #3115

obydog002 opened this issue Jan 15, 2024 · 6 comments
Labels

Comments

@obydog002
Copy link
Contributor

obydog002 commented Jan 15, 2024

Describe the bug
Trying to search in the Player Name field on replays gives the exception. Client 2024.1.1 but I've seen this bug at least since the 2023.12.1 client.

To Reproduce
Write something and search

Log or error message

com.faforever.commons.api.dto.ApiException: Invalid value: Combination of pagination, sorting over relationship and filtering over toMany relationships unsupported
	at com.faforever.client.api.FafApiAccessor.lambda$retrieveWithErrorHandling$20(FafApiAccessor.java:318)
	Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException: 
Assembly trace from producer [reactor.core.publisher.MonoOnErrorResume] :
	reactor.core.publisher.Mono.onErrorMap
	com.faforever.client.api.FafApiAccessor.lambda$retrieveWithErrorHandling$22(FafApiAccessor.java:318)
Error has been observed at the following site(s):
	*_______Mono.onErrorMap ⇢ at com.faforever.client.api.FafApiAccessor.lambda$retrieveWithErrorHandling$22(FafApiAccessor.java:318)
	|_                      ⇢ at org.springframework.web.reactive.function.client.DefaultWebClient$DefaultResponseSpec$StatusHandler.apply(DefaultWebClient.java:732)
	|_         Mono.flatMap ⇢ at org.springframework.web.reactive.function.client.DefaultWebClient$DefaultResponseSpec.applyStatusHandlers(DefaultWebClient.java:687)
	|_   Mono.onErrorResume ⇢ at org.springframework.web.reactive.function.client.DefaultWebClient$DefaultResponseSpec.applyStatusHandlers(DefaultWebClient.java:688)
	|_         Mono.flatMap ⇢ at org.springframework.web.reactive.function.client.DefaultWebClient$DefaultResponseSpec.applyStatusHandlers(DefaultWebClient.java:693)
	|_           checkpoint ⇢ 400 BAD_REQUEST from GET https://api.faforever.com/data/game [DefaultWebClient]
	|_   Mono.switchIfEmpty ⇢ at org.springframework.web.reactive.function.client.DefaultWebClient$DefaultResponseSpec.handleBodyMono(DefaultWebClient.java:656)
	|_                      ⇢ at org.springframework.web.reactive.function.client.DefaultWebClient$DefaultResponseSpec.lambda$bodyToMono$2(DefaultWebClient.java:573)
	*_____________Mono.then ⇢ at org.springframework.web.reactive.function.client.DefaultWebClient.releaseIfNotConsumed(DefaultWebClient.java:195)
	|_                      ⇢ at org.springframework.web.reactive.function.client.DefaultWebClient$DefaultResponseSpec.lambda$applyStatusHandlers$18(DefaultWebClient.java:688)
	*__________Mono.flatMap ⇢ at org.springframework.web.reactive.function.client.DefaultWebClient$DefaultResponseSpec.bodyToMono(DefaultWebClient.java:572)
	|_       Mono.retryWhen ⇢ at com.faforever.client.api.FafApiAccessor.retrieveMonoWithErrorHandling(FafApiAccessor.java:292)
	|_       Mono.doOnError ⇢ at com.faforever.client.api.FafApiAccessor.retrieveMonoWithErrorHandling(FafApiAccessor.java:293)
	|_             Mono.map ⇢ at com.faforever.client.api.FafApiAccessor.getFromEndpointWithPageCount(FafApiAccessor.java:282)
	|_         Mono.flatMap ⇢ at com.faforever.client.api.FafApiAccessor.getFromEndpointWithPageCount(FafApiAccessor.java:283)
	|_   Mono.switchIfEmpty ⇢ at com.faforever.client.api.FafApiAccessor.getFromEndpointWithPageCount(FafApiAccessor.java:285)
	|_           Mono.cache ⇢ at com.faforever.client.api.FafApiAccessor.getFromEndpointWithPageCount(FafApiAccessor.java:286)
	|_        Mono.doOnNext ⇢ at com.faforever.client.api.FafApiAccessor.getFromEndpointWithPageCount(FafApiAccessor.java:287)
	|_                      ⇢ at com.faforever.client.api.FafApiAccessor.getManyWithPageCount(FafApiAccessor.java:276)
	|_             Mono.map ⇢ at com.faforever.client.replay.ReplayService.getReplayPage(ReplayService.java:466)
	*________Flux.concatMap ⇢ at reactor.util.retry.RetryBackoffSpec.lambda$generateCompanion$5(RetryBackoffSpec.java:545)
	|_     Flux.onErrorStop ⇢ at reactor.util.retry.RetryBackoffSpec.lambda$generateCompanion$5(RetryBackoffSpec.java:608)
	*__Flux.deferContextual ⇢ at reactor.util.retry.RetryBackoffSpec.generateCompanion(RetryBackoffSpec.java:543)
Original Stack Trace:
		at com.faforever.client.api.FafApiAccessor.lambda$retrieveWithErrorHandling$20(FafApiAccessor.java:318)
		at reactor.core.publisher.Mono.lambda$onErrorMap$27(Mono.java:3785)
		at reactor.core.publisher.Mono.lambda$onErrorResume$29(Mono.java:3875)
		at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onError(FluxOnErrorResume.java:94)
		at reactor.core.publisher.MonoFlatMap$FlatMapMain.onError(MonoFlatMap.java:180)
		at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onError(FluxMapFuseable.java:142)
		at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:121)
		at reactor.core.publisher.MonoReduce$ReduceSubscriber.onComplete(MonoReduce.java:197)
		at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onComplete(FluxMapFuseable.java:152)
		at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onComplete(FluxMapFuseable.java:152)
		at reactor.core.publisher.FluxPeekFuseable$PeekFuseableSubscriber.onComplete(FluxPeekFuseable.java:277)
		at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onComplete(FluxMapFuseable.java:152)
		at reactor.netty.channel.FluxReceive.onInboundComplete(FluxReceive.java:415)
		at reactor.netty.channel.ChannelOperations.onInboundComplete(ChannelOperations.java:446)
		at reactor.netty.channel.ChannelOperations.terminate(ChannelOperations.java:500)
		at reactor.netty.http.client.HttpClientOperations.onInboundNext(HttpClientOperations.java:780)
		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.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:529)
		at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:468)
		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:1410)
		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:919)
		at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:800)
		at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:509)
		at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:407)
		at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
		at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
		at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
		at java.base/java.lang.Thread.run(Thread.java:1583)

Expected behavior
Filtered replays to appear

Screenshots

cantSearch

OS
Linux

@obydog002 obydog002 added the bug label Jan 15, 2024
@obydog002
Copy link
Contributor Author

Any ideas where to look so I can have a shot at fixing this for myself?

@bukajsytlos
Copy link
Member

bukajsytlos commented Jan 15, 2024 via email

@Sheikah45
Copy link
Member

The fix is to remove the illegal sorting option that doesn't work with filtering.

@obydog002
Copy link
Contributor Author

Ahh yes, the sort by option. I just didn't know how to use the filter panel
We can close this then

@Sheikah45
Copy link
Member

Well there still shouldn't be a combo that results in an invalid request. I had thought I got all of them before

@obydog002
Copy link
Contributor Author

Sort by: Average Reviews score

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

No branches or pull requests

3 participants