修改blade-auth中的代码后,系统过一段时间报错

Blade 未结 1 180
med
med 2024-09-19 18:15

一、该问题的重现步骤是什么?

1. 6f7816e65183ff631fe5f99ccf96e5a.png

2. 95ca90982c86f8789ffe46445e2a59c.png

3.3ffffa3919bcbbab8c4130fb34fa94b.png

44ca8f6d8c7f3bdbc4a0b7d44c83b4f.png

报错信息

9c55519ea0bcd554658e5687628ac34.png



二、你期待的结果是什么?实际看到的又是什么?

怎么处理?以及前端中的this.userInfo中如何加扩展信息

三、你正在使用的是什么产品,什么版本?在什么操作系统上?

3.4.0;windows

四、请提供详细的错误堆栈信息,这很重要。


五、若有更多详细信息,请在下面提供。

1条回答
  •  admin
    admin (楼主)
    2024-09-19 19:17

    不要用map类型,你用string类型,然后加上测试看看是否会有问题。如果有问题你需要提供后端的完整报错堆栈。

    作者追问:2024-09-19 19:17

    1、后台无报错

    只有对gateWay的请求,没有转到auth

    image.png

    ================ Gateway Request Start  ================

    ===> POST: /blade-auth/oauth/token?tenantId=000000&refresh_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZW5hbnRfaWQiOiIwMDAwMDAiLCJ1c2VyX25hbWUiOiIxMDEiLCJyZWFsX25hbWUiOiLlkajmloflk7I4ODg5Mea1i-ivlSIsImF2YXRhciI6InVwbG9hZC8yMDI0MDQwMi8wMThlNjA3ZmM2OWVjNmUxZGFjZDhhYTAxMTllZGE0OC5qcGVnIiwiYXV0aG9yaXRpZXMiOlsiYWRtaW5pc3RyYXRvciJdLCJjbGllbnRfaWQiOiJzYWJlciIsInJvbGVfbmFtZSI6ImFkbWluaXN0cmF0b3IiLCJsaWNlbnNlIjoicG93ZXJlZCBieSBibGFkZXgiLCJwb3N0X2lkIjoiMTUwMzYxODYzNDY2MDYzODcyMSIsInVzZXJfaWQiOiIxNTAzOTIzMDI4ODk1NjQ5NzkzIiwicm9sZV9pZCI6IjExMjM1OTg4MTY3Mzg2NzUyMDEiLCJzY29wZSI6WyJhbGwiXSwibml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WxcIjpcIjEyQHFxLmNvbVwiLFwicGhvbmVcIjpcIjEzNTY2Nzc4ODg5XCIsXCJiaXJ0aGRheVwiOlwiMTk5OC0wMy0wMSAwMDowMDowMFwiLFwic2V4XCI6MSxcInJvbGVJZFwiOlwiMTEyMzU5ODgxNjczODY3NTIwMVwiLFwiZGVwdElkXCI6XCIxNzM2OTQwNjYzMjc2NjcwOTc3XCIsXCJwb3N0SWRcIjpcIjE1MDM2MTg2MzQ2NjA2Mzg3MjFcIixcImlkQ2FyZFwiOlwiMzcyOTI0MTk5ODAzMDEwOTg3XCJ9In0.CiHUl6V9CJbhBiG_RaW0ZMAkgAEmZ5RPKgdTrDSFaA4&grant_type=refresh_token&scope=all

    ===Headers===  x-forwarded-host: [localhost:8566]

    ===Headers===  x-forwarded-proto: [http]

    ===Headers===  x-forwarded-port: [8566]

    ===Headers===  x-forwarded-for: [127.0.0.1]

    ===Headers===  cookie: [saber-access-token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZW5hbnRfaWQiOiIwMDAwMDAiLCJ1c2VyX25hbWUiOiIxMDEiLCJyZWFsX25hbWUiOiLlkajmloflk7I4ODg5Mea1i-ivlSIsImF2YXRhciI6InVwbG9hZC8yMDI0MDQwMi8wMThlNjA3ZmM2OWVjNmUxZGFjZDhhYTAxMTllZGE0OC5qcGVnIiwiYXV0aG9yaXRpZXMiOlsiYWRtaW5pc3RyYXRvciJdLCJjbGllbnRfaWQiOiJzYWJlciIsInJvbGVfbmFtZSI6ImFkbWluaXN0cmF0b3IiLCJsaWNlbnNlIjoicG93ZXJlZCBieSBibGFkZXgiLCJwb3N0X2lkIjoiMTUwMzYxODYzNDY2MDYzODcyMSIsInVzZXJfaWQiOiIxNTAzOTIzMDI4ODk1NjQ5NzkzIiwicm9sZV9pZCI6IjExMjM1OTg4MTY3Mzg2NzUyMDEiLCJzY29wZSI6WyJhbGwiXSwibmlja19uYW1lIjoi5ZGo5paH5ZOyODg4OTHmtYvor5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kQ2FyZFwiOlwiMzcyOTI0MTk5ODAzMDEwOTg3XCJ9In0.CiHUl6V9CJbhBiG_RaW0ZMAkgAEmZ5RPKgdTrDSFaA4]

    ===Headers===  accept-language: [zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6]

    ===Headers===  accept-encoding: [gzip, deflate, br, zstd]

    ===Headers===  referer: [http://localhost:8566/]

    ===Headers===  sec-fetch-dest: [empty]

    ===Headers===  sec-fetch-mode: [cors]

    ===Headers===  sec-fetch-site: [same-origin]

    ===Headers===  origin: [http://localhost:8566]

    ===Headers===  dept-id: [1736940663276670977]

    ===Headers===  role-id: [1123598816738675201]

    ===Headers===  tenant-id: [000000]

    ===Headers===  accept: [application/json, text/plain, */*]

    ===Headers===  user-agent: [Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 Edg/128.0.0.0]

    ===Headers===  authorization: [Basic c2FiZXI6c2FiZXJfc2VjcmV0]

    ===Headers===  sec-ch-ua-mobile: [?0]

    ===Headers===  blade-auth: 

    ===Headers===  blade-auth-original: [bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZW5hbnRfaWQiOiIwMDAwMDAiLCJ1c2VyX25hbWUiOiIxMDEiLCJyZWFsX25hbWUiOiLlkajmloflk7I4ODg5Mea1i-ivlSIsImF2YXRhciI6InVwbG9hZC8yMDI0MDQwMi8wMThlNjA3ZmM2OWVjNmUxZGFjZDhhYTAxMTllZGE0OC5qcGVnIiwiYXV0aG9yaXRpZXMiOlsiYWRtaW5pc3RyYXRvciJdLCJjbGllbnRfaWQiOiJzYWJlciIsInJvbGVfbmFtZSI6ImFkbWluaXN0cmF0b3IiLCJsaWNlbnNlIjoicG93ZXJlZCBieSBibGFkZXgiLCJwb3N0X2lkIjoiMTUwMzYxODYzNDY2MDYzODcyMSIsInVzZXJfaWQiOiIxNTAzOTIzMDI4ODk1NjQ5N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1wiLFwiZW1haWxcIjpcIjEyQHFxLmNvbVwiLFwicGhvbmVcIjpcIjEzNTY2Nzc4ODg5XCIsXCJiaXJ0aGRheVwiOlwiMTk5OC0wMy0wMSAwMDowMDowMFwiLFwic2V4XCI6MSxcInJvbGVJZFwiOlwiMTEyMzU5ODgxNjczODY3NTIwMVwiLFwiZGVwdElkXCI6XCIxNzM2OTQwNjYzMjc2NjcwOTc3XCIsXCJwb3N0SWRcIjpcIjE1MDM2MTg2MzQ2NjA2Mzg3MjFcIixcImlkQ2FyZFwiOlwiMzcyOTI0MTk5ODAzMDEwOTg3XCJ9In0._Ke7RGUKk6lyekVmyfcHX6faMHrYRgTKEPW9LKE7Tt8]

    ===Headers===  dnt: [1]

    ===Headers===  sec-ch-ua-platform: ["Windows"]

    ===Headers===  sec-ch-ua: ["Chromium";v="128", "Not;A=Brand";v="24", "Microsoft Edge";v="128"]

    ===Headers===  cache-control: [no-cache]

    ===Headers===  pragma: [no-cache]

    ===Headers===  content-length: [0]

    ===Headers===  connection: [close]

    ===Headers===  host: [127.0.0.1:8088]

    ================  Gateway Request End  =================

    image.png

    回答: 2024-09-19 19:17

    其他什么都不改,只是加一个字段,并且设置为string类型的也会报错么?

    作者追问:2024-09-19 19:17

    对的,目前改了三个地方;见下图

    image.png


    image.png



    image.png

    报错:

    image.png

    回答: 2024-09-19 19:17

    没有遇到你说的情况,可能你哪里其他地方改动影响到了。另外如果一定要这么多数据,你也不要新建字段,就直接写到detail里吧,反正detail里也是个kv的值,可以自定义key和你需要的value。另外你把所有用户信息都放到token里,这样非常危险。还是推荐后端先获取userId,再从UserCache里获取到User的值。


    具体验证操作看下图

    0 讨论(0)
提交回复