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] 20.09添加标签出现403 禁止访问: No authentication found #763

Closed
1 task done
gsxgmpkt9020 opened this issue Jan 9, 2025 · 12 comments
Closed
1 task done
Labels
bug Something isn't working

Comments

@gsxgmpkt9020
Copy link

提问前查询

  • 我已经在 issues 列表 里查询过,并且没找到类似的问题。

组件

服务端 (server)

运行环境

git.branch:HEAD
git.commit.id:1ac529e
git.commit.time:2025-01-08T17:00:54Z
build.artifact:server
build.name:server
build.time:2025-01-08T17:07:54.504Z
build.version:0.20.9
build.group:run.ikaros.server
java.version:23.0.1
java.vendor.name:Oracle Corporation
java.runtime.name:Java(TM) SE Runtime Environment
java.runtime.version:23.0.1+11-39
java.jvm.name:Java HotSpot(TM) 64-Bit Server VM
java.jvm.vendor:Oracle Corporation
java.jvm.version:23.0.1+11-39
os.name:Windows 10
os.version:10.0
os.arch:amd64
subjectCollection.wish:0
subjectCollection.discard:0
subjectCollection.total:1
subjectCollection.doing:1
subjectCollection.done:0
subjectCollection.shelve:0
character.total:0
attachment.total:9
attachment.file:4
attachment.folder:5
subject.total:2
subject.game:0
subject.other:0
subject.music:0
subject.real:0
subject.comic:0
subject.anime:2
subject.novel:0
person.total:0

报错相关的日志

2025-01-09 17:36:18 [reactor-http-nio-10] ERROR r.i.s.c.GlobalExceptionHandlerConfig - [AuthenticationCredentialsNotFoundException] No authentication found.
org.springframework.security.authentication.AuthenticationCredentialsNotFoundException: No authentication found.
	at run.ikaros.server.core.user.UserServiceImpl.getUserFromSecurityContext(UserServiceImpl.java:233)
	Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException: 
Error has been observed at the following site(s):
	*__checkpoint ⇢ run.ikaros.server.security.authentication.basicauth.BasicAuthenticationFilter [DefaultWebFilterChain]
Original Stack Trace:
		at run.ikaros.server.core.user.UserServiceImpl.getUserFromSecurityContext(UserServiceImpl.java:233)
		at run.ikaros.server.core.user.UserServiceImpl.getUserIdFromSecurityContext(UserServiceImpl.java:244)
		at run.ikaros.server.core.tag.TagEndpoint.lambda$create$9(TagEndpoint.java:153)
		at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:132)
		at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onNext(FluxOnErrorResume.java:79)
		at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onNext(FluxOnErrorResume.java:79)
		at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:158)
		at reactor.core.publisher.FluxContextWrite$ContextWriteSubscriber.onNext(FluxContextWrite.java:107)
		at reactor.core.publisher.FluxMapFuseable$MapFuseableConditionalSubscriber.onNext(FluxMapFuseable.java:299)
		at reactor.core.publisher.FluxFilterFuseable$FilterFuseableConditionalSubscriber.onNext(FluxFilterFuseable.java:337)
		at reactor.core.publisher.Operators$BaseFluxToMonoOperator.completePossiblyEmpty(Operators.java:2071)
		at reactor.core.publisher.MonoCollect$CollectSubscriber.onComplete(MonoCollect.java:145)
		at reactor.core.publisher.FluxMap$MapSubscriber.onComplete(FluxMap.java:144)
		at reactor.core.publisher.FluxPeek$PeekSubscriber.onComplete(FluxPeek.java:260)
		at reactor.core.publisher.FluxMap$MapSubscriber.onComplete(FluxMap.java:144)
		at reactor.netty.channel.FluxReceive.terminateReceiver(FluxReceive.java:481)
		at reactor.netty.channel.FluxReceive.drainReceiver(FluxReceive.java:273)
		at reactor.netty.channel.FluxReceive.request(FluxReceive.java:134)
		at reactor.core.publisher.FluxMap$MapSubscriber.request(FluxMap.java:164)
		at reactor.core.publisher.FluxPeek$PeekSubscriber.request(FluxPeek.java:138)
		at reactor.core.publisher.FluxMap$MapSubscriber.request(FluxMap.java:164)
		at reactor.core.publisher.Operators$BaseFluxToMonoOperator.request(Operators.java:2041)
		at reactor.core.publisher.FluxFilterFuseable$FilterFuseableConditionalSubscriber.request(FluxFilterFuseable.java:411)
		at reactor.core.publisher.FluxMapFuseable$MapFuseableConditionalSubscriber.request(FluxMapFuseable.java:360)
		at reactor.core.publisher.FluxContextWrite$ContextWriteSubscriber.request(FluxContextWrite.java:136)
		at reactor.core.publisher.MonoFlatMap$FlatMapMain.request(MonoFlatMap.java:194)
		at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.set(Operators.java:2341)
		at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onSubscribe(FluxOnErrorResume.java:74)
		at reactor.core.publisher.MonoFlatMap$FlatMapMain.onSubscribe(MonoFlatMap.java:117)
		at reactor.core.publisher.FluxContextWrite$ContextWriteSubscriber.onSubscribe(FluxContextWrite.java:101)
		at reactor.core.publisher.FluxMapFuseable$MapFuseableConditionalSubscriber.onSubscribe(FluxMapFuseable.java:265)
		at reactor.core.publisher.FluxFilterFuseable$FilterFuseableConditionalSubscriber.onSubscribe(FluxFilterFuseable.java:305)
		at reactor.core.publisher.Operators$BaseFluxToMonoOperator.onSubscribe(Operators.java:2025)
		at reactor.core.publisher.FluxMap$MapSubscriber.onSubscribe(FluxMap.java:92)
		at reactor.core.publisher.FluxPeek$PeekSubscriber.onSubscribe(FluxPeek.java:171)
		at reactor.core.publisher.FluxMap$MapSubscriber.onSubscribe(FluxMap.java:92)
		at reactor.netty.channel.FluxReceive.startReceiver(FluxReceive.java:172)
		at reactor.netty.channel.FluxReceive.lambda$subscribe$2(FluxReceive.java:151)
		at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174)
		at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167)
		at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
		at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569)
		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:1575)
2025-01-09 17:36:24 [reactor-http-nio-10] ERROR r.i.s.c.GlobalExceptionHandlerConfig - [AuthenticationCredentialsNotFoundException] No authentication found.
org.springframework.security.authentication.AuthenticationCredentialsNotFoundException: No authentication found.
	at run.ikaros.server.core.user.UserServiceImpl.getUserFromSecurityContext(UserServiceImpl.java:233)
	Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException: 
Error has been observed at the following site(s):
	*__checkpoint ⇢ run.ikaros.server.security.authentication.basicauth.BasicAuthenticationFilter [DefaultWebFilterChain]
Original Stack Trace:
		at run.ikaros.server.core.user.UserServiceImpl.getUserFromSecurityContext(UserServiceImpl.java:233)
		at run.ikaros.server.core.user.UserServiceImpl.getUserIdFromSecurityContext(UserServiceImpl.java:244)
		at run.ikaros.server.core.tag.TagEndpoint.lambda$create$9(TagEndpoint.java:153)
		at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:132)
		at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onNext(FluxOnErrorResume.java:79)
		at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onNext(FluxOnErrorResume.java:79)
		at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:158)
		at reactor.core.publisher.FluxContextWrite$ContextWriteSubscriber.onNext(FluxContextWrite.java:107)
		at reactor.core.publisher.FluxMapFuseable$MapFuseableConditionalSubscriber.onNext(FluxMapFuseable.java:299)
		at reactor.core.publisher.FluxFilterFuseable$FilterFuseableConditionalSubscriber.onNext(FluxFilterFuseable.java:337)
		at reactor.core.publisher.Operators$BaseFluxToMonoOperator.completePossiblyEmpty(Operators.java:2071)
		at reactor.core.publisher.MonoCollect$CollectSubscriber.onComplete(MonoCollect.java:145)
		at reactor.core.publisher.FluxMap$MapSubscriber.onComplete(FluxMap.java:144)
		at reactor.core.publisher.FluxPeek$PeekSubscriber.onComplete(FluxPeek.java:260)
		at reactor.core.publisher.FluxMap$MapSubscriber.onComplete(FluxMap.java:144)
		at reactor.netty.channel.FluxReceive.terminateReceiver(FluxReceive.java:481)
		at reactor.netty.channel.FluxReceive.drainReceiver(FluxReceive.java:273)
		at reactor.netty.channel.FluxReceive.request(FluxReceive.java:134)
		at reactor.core.publisher.FluxMap$MapSubscriber.request(FluxMap.java:164)
		at reactor.core.publisher.FluxPeek$PeekSubscriber.request(FluxPeek.java:138)
		at reactor.core.publisher.FluxMap$MapSubscriber.request(FluxMap.java:164)
		at reactor.core.publisher.Operators$BaseFluxToMonoOperator.request(Operators.java:2041)
		at reactor.core.publisher.FluxFilterFuseable$FilterFuseableConditionalSubscriber.request(FluxFilterFuseable.java:411)
		at reactor.core.publisher.FluxMapFuseable$MapFuseableConditionalSubscriber.request(FluxMapFuseable.java:360)
		at reactor.core.publisher.FluxContextWrite$ContextWriteSubscriber.request(FluxContextWrite.java:136)
		at reactor.core.publisher.MonoFlatMap$FlatMapMain.request(MonoFlatMap.java:194)
		at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.set(Operators.java:2341)
		at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onSubscribe(FluxOnErrorResume.java:74)
		at reactor.core.publisher.MonoFlatMap$FlatMapMain.onSubscribe(MonoFlatMap.java:117)
		at reactor.core.publisher.FluxContextWrite$ContextWriteSubscriber.onSubscribe(FluxContextWrite.java:101)
		at reactor.core.publisher.FluxMapFuseable$MapFuseableConditionalSubscriber.onSubscribe(FluxMapFuseable.java:265)
		at reactor.core.publisher.FluxFilterFuseable$FilterFuseableConditionalSubscriber.onSubscribe(FluxFilterFuseable.java:305)
		at reactor.core.publisher.Operators$BaseFluxToMonoOperator.onSubscribe(Operators.java:2025)
		at reactor.core.publisher.FluxMap$MapSubscriber.onSubscribe(FluxMap.java:92)
		at reactor.core.publisher.FluxPeek$PeekSubscriber.onSubscribe(FluxPeek.java:171)
		at reactor.core.publisher.FluxMap$MapSubscriber.onSubscribe(FluxMap.java:92)
		at reactor.netty.channel.FluxReceive.startReceiver(FluxReceive.java:172)
		at reactor.netty.channel.FluxReceive.lambda$subscribe$2(FluxReceive.java:151)
		at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174)
		at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167)
		at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
		at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569)
		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:1575)

发生了什么

添加标签出现403 禁止访问: No authentication found

预期是怎样

成功添加标签

如何复现

添加标签

其它补充内容

No response

@gsxgmpkt9020 gsxgmpkt9020 added the bug Something isn't working label Jan 9, 2025
@gsxgmpkt9020 gsxgmpkt9020 changed the title [Bug] 添加标签出现403 禁止访问: No authentication found [Bug] 20.09添加标签出现403 禁止访问: No authentication found Jan 9, 2025
@gsxgmpkt9020
Copy link
Author

我看日志20.09已经修复了,但是还是403

[v0.20.9](https://github.com/ikaros-dev/ikaros/releases/tag/v0.20.9) Pre-release
问题修复
修复新条目收藏时没有一起新建剧集收藏的问题
创建标签检测唯一性时关联用户ID
高亮自定义的标签 https://github.com/ikaros-dev/ikaros/issues/755 可鼠标移动到标签区域右键,打开标签编辑框,自定义标签颜色,修改时记得同时修改下颜色的透明度
修复创建条目标签时的异常403
What's Changed

@chivehao
Copy link
Member

chivehao commented Jan 9, 2025

我看日志20.09已经修复了,但是还是403

[v0.20.9](https://github.com/ikaros-dev/ikaros/releases/tag/v0.20.9) Pre-release
问题修复
修复新条目收藏时没有一起新建剧集收藏的问题
创建标签检测唯一性时关联用户ID
高亮自定义的标签 https://github.com/ikaros-dev/ikaros/issues/755 可鼠标移动到标签区域右键,打开标签编辑框,自定义标签颜色,修改时记得同时修改下颜色的透明度
修复创建条目标签时的异常403
What's Changed

Docker 重新拉取下v0.20.9的镜像,并重建应用试试。

@chivehao
Copy link
Member

chivehao commented Jan 9, 2025

这是修复后的镜像的关于页构建信息:
git.branch:HEAD
git.commit.id:6c036b7
git.commit.time:2025-01-08T17:54:09Z
build.artifact:server
build.name:server
build.time:2025-01-08T17:57:36.248Z
build.version:0.20.9

主要看git.commit.id

@gsxgmpkt9020
Copy link
Author

我看日志20.09已经修复了,但是还是403

[v0.20.9](https://github.com/ikaros-dev/ikaros/releases/tag/v0.20.9) Pre-release
问题修复
修复新条目收藏时没有一起新建剧集收藏的问题
创建标签检测唯一性时关联用户ID
高亮自定义的标签 https://github.com/ikaros-dev/ikaros/issues/755 可鼠标移动到标签区域右键,打开标签编辑框,自定义标签颜色,修改时记得同时修改下颜色的透明度
修复创建条目标签时的异常403
What's Changed

Docker 重新拉取下v0.20.9的镜像,并重建应用试试。

我是fastjar的,不是docker。意思是重启下电脑估计就能好吗?

@chivehao
Copy link
Member

chivehao commented Jan 9, 2025

我看日志20.09已经修复了,但是还是403

[v0.20.9](https://github.com/ikaros-dev/ikaros/releases/tag/v0.20.9) Pre-release
问题修复
修复新条目收藏时没有一起新建剧集收藏的问题
创建标签检测唯一性时关联用户ID
高亮自定义的标签 https://github.com/ikaros-dev/ikaros/issues/755 可鼠标移动到标签区域右键,打开标签编辑框,自定义标签颜色,修改时记得同时修改下颜色的透明度
修复创建条目标签时的异常403
What's Changed

Docker 重新拉取下v0.20.9的镜像,并重建应用试试。

我是fastjar的,不是docker。意思是重启下电脑估计就能好吗?

那重下这个tag的release的jar包覆盖原有文件,最好是操作前先停了ikaros,覆盖后再重新启动

@chivehao
Copy link
Member

chivehao commented Jan 9, 2025

如果问题解决,记得关掉issue

@gsxgmpkt9020
Copy link
Author

gsxgmpkt9020 commented Jan 10, 2025

如果问题解决,记得关掉issue

因为根本没解决。或者你的修复方法有缺陷。

我是用easy-service注册成服务的,一直正常使用。
https://github.com/pandolia/easy-service
更新的时候肯定也是停掉替换的。

如果你认为停止服务的方法不彻底,就弄个自带参数ikaros stop来保证停止的时候更符合你的要求。

我不确定是不是停止方式问题导致授权有缓存之类的。照理说彻底的修复不应该有这种问题

@gsxgmpkt9020
Copy link
Author

有没有什么强制修正的临时的有效的解决方法,比如说修改文件权限、修改配置,或者新建一个账户?

@chivehao
Copy link
Member

你这个问题是使用的是没修复这个问题前的jar包,你需要替换成最新的jar包然后重启应用,如果不知道咋重启应用就替换后直接重启电脑,
关键在于使用最新的jar 包。

@gsxgmpkt9020
Copy link
Author

git.commit.id:6c036b7

我知道了,你意思是v0.20.9有不同commitid的分支小版本,然后你更新是在旧的commitid的位置上更新的。

也就是说今天tag下的v0.20.9下载的内容,可能和昨天的v0.20.9下载的内容不一样,而release版本就可以有效避免这个问题?

我看见别人的release都是有nightly每天更新日期后缀自动发布的

@chivehao
Copy link
Member

git.commit.id:6c036b7

我知道了,你意思是v0.20.9有不同commitid的分支小版本,然后你更新是在旧的commitid的位置上更新的。

也就是说今天tag下的v0.20.9下载的内容,可能和昨天的v0.20.9下载的内容不一样,而release版本就可以有效避免这个问题?

我看见别人的release都是有nightly每天更新日期后缀自动发布的

一般情况下不会这样,但是这个版本我是直接覆盖release了,所以才会出现commit id不同的情况,这种情况很少见,
按正常情况我应该发个v0.20.10的bugfix版本。

总之目前主要应该聚焦解决你的问题。

@gsxgmpkt9020
Copy link
Author

fix: create subject tag
#762 by chivehao was merged 2 days ago
fix: create subject tag exception when user id not found
#761 by chivehao was merged 2 days ago
2 tasks done
#760 build: optimize github action ci config

好的,我出问题的应该是#760的版本,修复后的是#762

我先关了,有问题再开

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

2 participants