umami api client test ko with docker umami version 2.13.3
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 28/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- docker, typescript
调研方向
Start by reproducing the getMe and getWebsites calls from the issue against a self-hosted version 2.13.3 server, using the shown getClient and login flow. Inspect the client requests and the server-side UUID error to determine where the incompatible user identifier is introduced. Done means the affected calls no longer return the reported 504 error, with the behavior covered by an appropriate test if the repository provides one.
由索引模型根据 Issue 内容生成。
描述
Hi,
https://github.com/boly38/action-umami-report/issues/59
I'm trying to play basis example (ex. I first would like to list websites)
- server with umami docker self-hosted
- self-hosted umami version
2.13.3
env
export UMAMI_API_CLIENT_USER_ID=admin
export UMAMI_API_CLIENT_PASSWORD=xxx-replace-by-admin-password-here
export UMAMI_API_CLIENT_SECRET=xxx-replace-by-app-secret-set-in-docker-compose
export UMAMI_API_CLIENT_ENDPOINT=https://myumami.example.fr/api
node
import {getClient} from '@umami/api-client';
const umamiUsername = process.env.UMAMI_API_CLIENT_USER_ID;
const umamiPassword = process.env.UMAMI_API_CLIENT_PASSWORD;
let client;
const getMeFixed = false;
{
client = getClient();
const {ok, data, status, error} = await client.login(umamiUsername, umamiPassword);
console.log(`login: ${JSON.stringify({ok, data, status, error}, null, 2)}`);
}
if (getMeFixed) {
const {ok, data, status, error} = await client.getMe();
console.log(`getMe: ${JSON.stringify({ok, data, status, error}, null, 2)}`);
}
{
const {ok, data, status, error} = await client.getWebsites();
console.log(`getWebsites: ${JSON.stringify({ok, data, status, error}, null, 2)}`);
}
result
login: {
"ok": true,
"data": {
"token": "==REDATED==",
"user": {
"id": "==REDATED==",
"username": "admin",
"role": "admin",
"createdAt": "2024-07-12T15:52:00.340Z",
"isAdmin": true
}
},
"status": 200
}
getWebsites: {
"ok": false,
"status": 504,
"error": "<html>\r\n<head><title>504 Gateway Time-out</title></head>\r\n<body>\r\n<center><h1>504 Gateway Time-out</h1></center>\r\n<hr><center>nginx</center
>\r\n</body>\r\n</html>\r\n"
}
but I got 504 error with server side error logs :
PrismaClientKnownRequestError:
Invalid `prisma.user.findUnique()` invocation:
Inconsistent column data: Error creating UUID, invalid character: expected an optional prefix of `urn:uuid:` followed by [0-9a-fA-F-], found `m` at 3
at _n.handleRequestError (/app/node_modules/@prisma/client/runtime/library.js:121:7749)
at _n.handleAndLogRequestError (/app/node_modules/@prisma/client/runtime/library.js:121:7057)
at _n.request (/app/node_modules/@prisma/client/runtime/library.js:121:6741)
at async l (/app/node_modules/@prisma/client/runtime/library.js:130:9355)
at async /app/.next/server/chunks/405.js:1:17597 {
code: 'P2023',
clientVersion: '5.17.0',
meta: {
modelName: 'User',
message: 'Error creating UUID, invalid character: expected an optional prefix of `urn:uuid:` followed by [0-9a-fA-F-], found `m` at 3'
}
}
NB: it was the same kind of error for getMe use case.
this issue and error logs are close to umami-software/umami/issues/1964
I just try to create a !admin new user and switch env to use this new creds, login is ok but I got same issue for the getWebsites step .. :'(
any help / hint appreciated
regards
- 主要语言
- TypeScript
- 星标
- 49
- 派生
- 18
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
umami-software/api-client 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 68/100
umami-software/api-client#11 ·
-
难度 2/5 1-3 小时 新手友好度 45/100
umami-software/api-client#26 ·
-
难度 3/5 1-2 天 新手友好度 32/100
umami-software/api-client#25 ·
-
bug
难度 3/5 1-2 天 新手友好度 48/100
umami-software/api-client#24 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 32/100
umami-software/api-client#20 ·
查看 umami-software/api-client 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 88/100
-
bug needs triage
难度 2/5 1-3 小时 新手友好度 72/100
DSpace/dspace-angular#6511 ·
维护者通常 1 天内回复
-
area: frontend area:byok bug severity:low
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
Phone app shows Unknown for a remote machine whose key changed可能已有人在做 @janicduplessis 今天认领。 未关闭area: mobile priority: P3 type: bug
难度 1/5 1 小时以内 新手友好度 78/100
appandflow/stim#5006 · 1 条评论 ·
维护者通常 1 天内回复
-
Area - Local to Cloud Bug
难度 2/5 1-3 小时 新手友好度 66/100
microsoft/vscode-mssql#23209 ·
维护者通常 1 天内回复