Giter Site home page Giter Site logo

关于错误输出 about arcaea-server HOT 6 CLOSED

lost-msth avatar lost-msth commented on August 28, 2024
关于错误输出

from arcaea-server.

Comments (6)

Lost-MSth avatar Lost-MSth commented on August 28, 2024

可以详细说明一下是哪个接口没有报错输出呢,我没记错的话,除了自定义异常外都会有输出

当然还有一种情况是服务器没有开始运行导致没有日志输出,也就是闪退了,那确实是个小问题,但其实只要用cmd就能看到报错信息,而且这种情况已经在q&a里说明了

from arcaea-server.

Kongchenglige avatar Kongchenglige commented on August 28, 2024

您好, 我遇到的情况是返回200但实际返回的数据在内部处理时就已经被
raise NoData('The character of the user does not exist.')
而控制台并无任何提示

具体遇到的情况如下
在登录时请求 server/others.py 的 85 行 请求 /user/me
进入 core/user.py 的 453 行 return 语句
在return 时出现了错误
之后尝试修改进去一个 try expect 最终提示 错误具体信息为'The character of the user does not exist.'
在此期间控制台没有任何错误信息输出

这导致我难以快速定位错误原因并解决问题, 希望可以尝试解决一下. 谢谢

from arcaea-server.

Kongchenglige avatar Kongchenglige commented on August 28, 2024

关于如何复现上边的问题(仅猜测):
开启全角色解锁
账号2切换至其他需要解锁角色
账号1添加账号2好友
关闭全角色解锁, 此时在我这里账号2的其他需要解锁的角色消失了
登录账号1, 登录时服务器尝试拉取好友列表角色, 此时由于判断账号2不存在之前的角色导致发生错误无法正常返回数据
账号1登录失败且控制台无任何错误提示

from arcaea-server.

Lost-MSth avatar Lost-MSth commented on August 28, 2024

啊这,这明显是我弄的自定义异常,所以不能算是服务器错误,但你说的对,对于没太多经验的人来说,定位错误有点困难,而且客户端没有那种特殊的错误提示

这个问题来自于切换全角色解锁开关导致的,嘛……很头疼的一个问题,user的属性中character相关属性共享了全解锁表user_char_full和普通表user_char,这个设计目前明显破坏了数据库数据完备性,若要解决,应该两种情况分开记录用户当前选择角色的信息
可是我懒,这涉及数据表变更,在增查改上也不是那么方便

所以目前没什么好想法,最好避免随意切换全解锁开关,后续可能会在全解锁开关变更后,强制将所有用户角色切到初始的0上

若有建议,非常欢迎

from arcaea-server.

Kongchenglige avatar Kongchenglige commented on August 28, 2024

我仍建议您对自定义异常也在控制台输出具体错误.
就我而言, 我有其他语言的经验而并没有在python上的较深经验.
定位此错误是在我一位Python经验丰富的朋友指导我花了整整一个小时定位的.
真的不是什么好的经历.
而且提示错误日志真的是一个必须功能, 您定义的一堆自定义异常都无法在控制台显示真的很要命.
此外您的 自定义异常 很明显也是发生在服务器内部的, 我认为应当算作服务器错误.
希望您在之后更新中尽快加入此功能, 谢谢您的回复.
此外我会稍后就新版本疑似无法正常下载歌曲开一个新的issues. (仍需定位原因, 至少似乎是客户端背大锅)

from arcaea-server.

Kongchenglige avatar Kongchenglige commented on August 28, 2024

附加
您可以考虑在查询不到数据的时候返回默认的0并在控制台提示
用户2在登录时并不会出现问题
用户1也不会受到任何致命的影响
谢谢

from arcaea-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.