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

Ban message fails to display during login #3097

Closed
Askaholic opened this issue Dec 24, 2023 · 0 comments · Fixed by #3103
Closed

Ban message fails to display during login #3097

Askaholic opened this issue Dec 24, 2023 · 0 comments · Fixed by #3103
Labels

Comments

@Askaholic
Copy link
Collaborator

Describe the bug
This is related to the server work here: FAForever/server#990

I'm adding a ban check when using token login just to avoid the situation where the user can have a valid token even if they've been issued a ban in the database before the token expired and can still log in. It looks like the display of notice messages during this step no longer works, as there is an exception about trying to start things from the wrong thread.

To Reproduce

  1. Deploy the PR to test server: Add ban appeal notice to ban messages server#990
  2. Add a ban to the bans table: insert into ban (player_id, author_id, reason, level) values (<your user id>, <your user id>, 'Test permanent ban', 'GLOBAL');
  3. Login to test with the client

Log or error message
This is my log file:

This is my log file:
2023-12-24T15:40:32.544-05:00  INFO 71805 --- [FAF Client] [ForkJoinPool.commonPool-worker-1] c.f.client.game.GamePrefsService         : Trying to read preferences file with charset: Big5
2023-12-24T15:40:32.547-05:00  INFO 71805 --- [FAF Client] [ForkJoinPool.commonPool-worker-1] c.f.client.game.GamePrefsService         : Successfully read preferences file with charset: Big5
2023-12-24T15:40:32.547-05:00 DEBUG 71805 --- [FAF Client] [ForkJoinPool.commonPool-worker-1] c.f.client.game.GamePrefsService         : game.prefs file already patched to allow multiple instances
2023-12-24T15:40:32.663-05:00 DEBUG 71805 --- [FAF Client] [JavaFX-Launcher] c.f.client.os.FileOpeningHandler         : Registering file opening handler: com.faforever.client.os.FileOpeningHandler
2023-12-24T15:40:32.786-05:00 DEBUG 71805 --- [FAF Client] [JavaFX-Launcher] c.f.c.d.DiscordRichPresenceService       : Cleared discord rich presence
2023-12-24T15:40:32.788-05:00 DEBUG 71805 --- [FAF Client] [JavaFX-Launcher] c.f.c.d.DiscordRichPresenceService       : Cleared discord rich presence
2023-12-24T15:40:32.881-05:00  INFO 71805 --- [FAF Client] [JavaFX-Launcher] c.faforever.client.steam.SteamService    : Starting the Steam API
2023-12-24T15:40:32.892-05:00 DEBUG 71805 --- [FAF Client] [JavaFX-Launcher] c.faforever.client.steam.SteamService    : Steam API failed to start
2023-12-24T15:40:33.234-05:00  INFO 71805 --- [FAF Client] [JavaFX-Launcher] o.s.boot.SpringApplication               : Started application in 5.948 seconds (process running for 6.965)
2023-12-24T15:40:33.239-05:00  INFO 71805 --- [FAF Client] [taskScheduler-1] c.f.client.config.PreferencesConfig      : Writing preferences file `%USER_PROFILE%/.faforever/client.prefs`
2023-12-24T15:40:33.239-05:00 DEBUG 71805 --- [FAF Client] [JavaFX-Launcher] c.faforever.client.util.StartupService   : Current preferences directory %USER_PROFILE%/.faforever
2023-12-24T15:40:33.553-05:00  INFO 71805 --- [FAF Client] [JavaFX Application Thread] com.faforever.client.update.Version      : The current application version is: 2023.12.1
2023-12-24T15:40:34.277-05:00  INFO 71805 --- [FAF Client] [JavaFX Application Thread] c.f.client.update.ClientUpdateService    : Current version: 2023.12.1
2023-12-24T15:40:34.287-05:00  INFO 71805 --- [FAF Client] [pool-3-thread-2] c.f.client.update.CheckForUpdateTask     : Checking for client update
2023-12-24T15:40:34.848-05:00 TRACE 71805 --- [FAF Client] [ForkJoinPool.commonPool-worker-2] com.faforever.client.update.Version      : Comparing current version `2023.12.1` to remote version `2023.11.2`
2023-12-24T15:40:34.850-05:00  INFO 71805 --- [FAF Client] [ForkJoinPool.commonPool-worker-2] com.faforever.client.update.Version      : fromVersion '2023.11.2' is not newer than toVersion '2023.12.1'. No update is required.
2023-12-24T15:40:34.851-05:00  INFO 71805 --- [FAF Client] [ForkJoinPool.commonPool-worker-2] com.faforever.client.user.LoginService   : Logging in with refresh token
2023-12-24T15:40:34.933-05:00 DEBUG 71805 --- [FAF Client] [ForkJoinPool.commonPool-worker-2] c.faforever.client.api.TokenRetriever    : Retrieving OAuth token
2023-12-24T15:40:35.845-05:00  INFO 71805 --- [FAF Client] [reactor-http-epoll-2] c.faforever.client.api.TokenRetriever    : Token valid until 2023-12-24T21:40:35.842244935Z
2023-12-24T15:40:36.375-05:00 TRACE 71805 --- [FAF Client] [reactor-http-epoll-2] c.faforever.client.api.FafApiAccessor    : Retrieved MeResult(userId=166198, userName=Askaholic) from /me with type MeResult
2023-12-24T15:40:36.400-05:00 DEBUG 71805 --- [FAF Client] [reactor-http-epoll-2] c.f.commons.lobby.FafLobbyClient         : Beginning connection process
2023-12-24T15:40:36.406-05:00 DEBUG 71805 --- [FAF Client] [reactor-http-epoll-2] c.f.commons.lobby.FafLobbyClient         : Starting login process
2023-12-24T15:40:36.408-05:00 DEBUG 71805 --- [FAF Client] [reactor-http-epoll-2] c.f.commons.lobby.FafLobbyClient         : Opening connection
2023-12-24T15:40:36.488-05:00  INFO 71805 --- [FAF Client] [reactor-http-epoll-2] c.f.commons.lobby.FafLobbyClient         : Connected to ws.faforever.xyz on port 443
2023-12-24T15:40:36.897-05:00 DEBUG 71805 --- [FAF Client] [reactor-http-epoll-2] c.f.commons.lobby.FafLobbyClient         : Starting session listener
2023-12-24T15:40:36.899-05:00 TRACE 71805 --- [FAF Client] [reactor-http-epoll-2] c.f.commons.lobby.FafLobbyClient         : Sending message of type class com.faforever.commons.lobby.SessionRequest
2023-12-24T15:40:36.963-05:00 TRACE 71805 --- [FAF Client] [single-1] c.f.commons.lobby.FafLobbyClient         : Outbound message: {"command":"ask_session","version":"2023.12.1","user_agent":"downlords-faf-client"}
2023-12-24T15:40:37.136-05:00 TRACE 71805 --- [FAF Client] [reactor-http-epoll-2] c.f.commons.lobby.FafLobbyClient         : Inbound message: {"command":"session","session":1867916311}
2023-12-24T15:40:37.207-05:00 TRACE 71805 --- [FAF Client] [reactor-http-epoll-2] c.f.commons.lobby.FafLobbyClient         : Sending message of type class com.faforever.commons.lobby.AuthenticateRequest
2023-12-24T15:40:37.218-05:00 TRACE 71805 --- [FAF Client] [reactor-http-epoll-2] c.f.commons.lobby.FafLobbyClient         : Outbound message: {"command":"auth","token":"**********","session":1867916311,"unique_id":"**********"}
2023-12-24T15:40:37.361-05:00 TRACE 71805 --- [FAF Client] [reactor-http-epoll-2] c.f.commons.lobby.FafLobbyClient         : Inbound message: {"command":"notice","style":"error","text":"You are banned from FAF forever. <br>Reason: <br>Test permanent ban<br><i>If you would like to appeal this ban, please send an email to: moderation@faforever.com</i>"}
2023-12-24T15:40:37.421-05:00 ERROR 71805 --- [FAF Client] [reactor-http-epoll-2] c.f.client.remote.FafServerAccessor      : Error processing notice

java.lang.IllegalStateException: Not on FX application thread; currentThread = reactor-http-epoll-2
       at com.sun.javafx.tk.Toolkit.checkFxUserThread(Toolkit.java:294)
       Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException: 
Assembly trace from producer [reactor.core.publisher.FluxPeekFuseable] :
       reactor.core.publisher.Flux.doOnNext
       com.faforever.client.remote.FafServerAccessor.afterPropertiesSet(FafServerAccessor.java:86)
Error has been observed at the following site(s):
       *__Flux.doOnNext ⇢ at com.faforever.client.remote.FafServerAccessor.afterPropertiesSet(FafServerAccessor.java:86)
Original Stack Trace:
               at com.sun.javafx.tk.Toolkit.checkFxUserThread(Toolkit.java:294)
               at com.sun.javafx.tk.quantum.QuantumToolkit.checkFxUserThread(QuantumToolkit.java:475)
               at javafx.scene.web.WebEngine.checkThread(WebEngine.java:1220)
               at javafx.scene.web.WebEngine.<init>(WebEngine.java:852)
               at javafx.scene.web.WebEngine.<init>(WebEngine.java:839)
               at javafx.scene.web.WebView.<init>(WebView.java:275)
               at com.faforever.client.fx2j.theme.ServerNotificationBuilder.build(ServerNotificationBuilder.java:59)
               at com.faforever.client.fx2j.theme.ServerNotificationBuilder.build(ServerNotificationBuilder.java:19)
               at io.github.sheikah45.fx2j.api.Fx2jLoader.load(Fx2jLoader.java:146)
               at com.faforever.client.theme.UiService.loadFxml(UiService.java:75)
               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:352)
               at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:713)
               at com.faforever.client.theme.UiService$$SpringCGLIB$$0.loadFxml(<generated>)
               at com.faforever.client.notification.NotificationService.displayServerNotification(NotificationService.java:118)
               at com.faforever.client.notification.NotificationService.addNotification(NotificationService.java:51)
               at com.faforever.client.remote.FafServerAccessor.onNotice(FafServerAccessor.java:275)
               at reactor.core.publisher.FluxPeekFuseable$PeekFuseableSubscriber.onNext(FluxPeekFuseable.java:196)
               at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:129)
               at reactor.core.publisher.FluxFilterFuseable$FilterFuseableSubscriber.onNext(FluxFilterFuseable.java:118)
               at reactor.core.publisher.FluxFilterFuseable$FilterFuseableConditionalSubscriber.onNext(FluxFilterFuseable.java:337)
               at reactor.core.publisher.FluxPublish$PublishSubscriber.drain(FluxPublish.java:571)
               at reactor.core.publisher.FluxPublish$PublishSubscriber.onNext(FluxPublish.java:310)
               at reactor.core.publisher.SinkManyUnicast.drainFused(SinkManyUnicast.java:321)
               at reactor.core.publisher.SinkManyUnicast.drain(SinkManyUnicast.java:363)
               at reactor.core.publisher.SinkManyUnicast.tryEmitNext(SinkManyUnicast.java:239)
               at reactor.core.publisher.SinkManySerialized.tryEmitNext(SinkManySerialized.java:100)
               at reactor.core.publisher.InternalManySink.emitNext(InternalManySink.java:27)
               at com.faforever.commons.lobby.FafLobbyClient.handle$lambda-45(FafLobbyClient.kt:248)
               at reactor.core.publisher.MonoCallable$MonoCallableSubscription.request(MonoCallable.java:137)
               at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.set(Operators.java:2367)
               at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onSubscribe(FluxOnErrorResume.java:74)
               at reactor.core.publisher.MonoCallable.subscribe(MonoCallable.java:48)
               at reactor.core.publisher.Mono.subscribe(Mono.java:4512)
               at reactor.core.publisher.FluxFlatMap$FlatMapMain.onNext(FluxFlatMap.java:430)
               at reactor.core.publisher.FluxFlatMap$FlatMapMain.tryEmit(FluxFlatMap.java:547)
               at reactor.core.publisher.FluxFlatMap$FlatMapInner.onNext(FluxFlatMap.java:988)
               at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onNext(FluxOnErrorResume.java:79)
               at reactor.core.publisher.MonoCallable$MonoCallableSubscription.request(MonoCallable.java:156)
               at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.set(Operators.java:2367)
               at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onSubscribe(FluxOnErrorResume.java:74)
               at reactor.core.publisher.MonoCallable.subscribe(MonoCallable.java:48)
               at reactor.core.publisher.Mono.subscribe(Mono.java:4512)
               at reactor.core.publisher.FluxFlatMap$FlatMapMain.onNext(FluxFlatMap.java:430)
               at reactor.core.publisher.FluxPeekFuseable$PeekFuseableSubscriber.onNext(FluxPeekFuseable.java:210)
               at reactor.core.publisher.FluxPeekFuseable$PeekFuseableSubscriber.onNext(FluxPeekFuseable.java:210)
               at reactor.core.publisher.FluxPeekFuseable$PeekFuseableSubscriber.onNext(FluxPeekFuseable.java:210)
               at reactor.core.publisher.FluxFlatMap$FlatMapMain.tryEmit(FluxFlatMap.java:547)
               at reactor.core.publisher.FluxFlatMap$FlatMapInner.onNext(FluxFlatMap.java:988)
               at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:129)
               at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:129)
               at reactor.core.publisher.Operators$BaseFluxToMonoOperator.completePossiblyEmpty(Operators.java:2097)
               at reactor.core.publisher.MonoCollectList$MonoCollectListSubscriber.onComplete(MonoCollectList.java:118)
               at reactor.core.publisher.FluxTakeWhile$TakeWhileSubscriber.onComplete(FluxTakeWhile.java:122)
               at reactor.core.publisher.FluxTakeWhile$TakeWhileSubscriber.onNext(FluxTakeWhile.java:96)
               at reactor.core.publisher.FluxWindowPredicate$WindowFlux.drainRegular(FluxWindowPredicate.java:670)
               at reactor.core.publisher.FluxWindowPredicate$WindowFlux.drain(FluxWindowPredicate.java:748)
               at reactor.core.publisher.FluxWindowPredicate$WindowFlux.onNext(FluxWindowPredicate.java:790)
               at reactor.core.publisher.FluxWindowPredicate$WindowPredicateMain.onNext(FluxWindowPredicate.java:241)
               at reactor.core.publisher.FluxFlattenIterable$FlattenIterableSubscriber.drainAsync(FluxFlattenIterable.java:453)
               at reactor.core.publisher.FluxFlattenIterable$FlattenIterableSubscriber.drain(FluxFlattenIterable.java:724)
               at reactor.core.publisher.FluxFlattenIterable$FlattenIterableSubscriber.onNext(FluxFlattenIterable.java:256)
               at reactor.core.publisher.FluxHandleFuseable$HandleFuseableSubscriber.onNext(FluxHandleFuseable.java:194)
               at reactor.core.publisher.FluxMapFuseable$MapFuseableConditionalSubscriber.onNext(FluxMapFuseable.java:299)
               at reactor.netty.channel.FluxReceive.drainReceiver(FluxReceive.java:294)
               at reactor.netty.channel.FluxReceive.onInboundNext(FluxReceive.java:403)
               at reactor.netty.channel.ChannelOperations.onInboundNext(ChannelOperations.java:426)
               at reactor.netty.http.client.HttpClientOperations.onInboundNext(HttpClientOperations.java:802)
               at reactor.netty.http.client.WebsocketClientOperations.onInboundNext(WebsocketClientOperations.java:166)
               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.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:324)
               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.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346)
               at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:333)
               at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:454)
               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.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)

2023-12-24T15:40:37.431-05:00  INFO 71805 --- [FAF Client] [reactor-http-epoll-2] c.f.commons.lobby.FafLobbyClient         : Outbound channel cancelled
2023-12-24T15:40:37.432-05:00  INFO 71805 --- [FAF Client] [reactor-http-epoll-2] c.f.commons.lobby.FafLobbyClient         : Inbound channel closed
2023-12-24T15:40:37.435-05:00  INFO 71805 --- [FAF Client] [reactor-http-epoll-2] c.f.commons.lobby.FafLobbyClient         : Disconnected from server
2023-12-24T15:41:00.491-05:00  INFO 71805 --- [FAF Client] [JavaFX Application Thread] c.faforever.client.FafClientApplication  : Stopping application
2023-12-24T15:41:02.540-05:00  INFO 71805 --- [FAF Client] [JavaFX Application Thread] c.faforever.client.steam.SteamService    : Stopping the Steam API
2023-12-24T15:41:02.546-05:00  INFO 71805 --- [FAF Client] [JavaFX Application Thread] c.f.client.fa.relay.ice.IceAdapterImpl   : Ignoring call to ICE adapter as we are not connected: quit([])
2023-12-24T15:41:02.548-05:00  INFO 71805 --- [FAF Client] [Thread-15] com.faforever.client.map.MapService      : Watcher terminated (null)
2023-12-24T15:41:02.548-05:00 DEBUG 71805 --- [FAF Client] [Thread-16] com.faforever.client.mod.ModService      : Watcher terminated (null)
2023-12-24T15:41:02.548-05:00  INFO 71805 --- [FAF Client] [JavaFX Application Thread] c.f.c.map.generator.MapGeneratorService  : Deleting generated maps
2023-12-24T15:41:02.552-05:00  INFO 71805 --- [FAF Client] [JavaFX Application Thread] c.f.client.remote.FafServerAccessor      : Closing lobby server connection
2023-12-24T15:41:02.553-05:00  WARN 71805 --- [FAF Client] [JavaFX Application Thread] o.s.b.f.support.DisposableBeanAdapter    : Invocation of destroy method failed on bean with name 'fafServerAccessor': java.util.concurrent.RejectedExecutionException: event executor terminated
2023-12-24T15:41:02.555-05:00  INFO 71805 --- [FAF Client] [pool-3-thread-1] c.faforever.client.theme.ThemeService    : Watcher service terminated
2023-12-24T15:41:02.557-05:00  INFO 71805 --- [FAF Client] [JavaFX Application Thread] c.f.client.config.PreferencesConfig      : Writing preferences file `%USER_PROFILE%/.faforever/client.prefs`
2023-12-24T15:41:02.560-05:00  INFO 71805 --- [FAF Client] [JavaFX Application Thread] com.faforever.client.config.BaseConfig   : Shutting down ExecutorService 'taskExecutor'
2023-12-24T15:41:02.563-05:00  INFO 71805 --- [FAF Client] [Thread-20] c.faforever.client.FafClientApplication  : Starting non-daemon detector thread

OS
Linux
Client: 2023.12.1

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

Successfully merging a pull request may close this issue.

1 participant