Bug: Docker Secrets lead to uncaughtException
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 42/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- docker, docker-compose, javascript
调研方向
从 lib/config/index.js 中的 deepFreeze 调用开始检查,并查看 lib/config/dockerSecret.js,然后复现 issue 中命名 secret 的 Docker Compose 示例。当名为 imgur_clientid 的 Docker secret 不再导致 uncaughtException,且 secret 处理仍可正常使用时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
As soon as you use docker secrets, you will get the following exception:
error: uncaughtException: Cannot freeze array buffer views with elements 15:29:21 [7/7167]TypeError: Cannot freeze array buffer views with elements at Function.freeze (<anonymous>) at deepFreeze (/home/hackmd/app/node_modules/deep-freeze/index.js:2:10) at /home/hackmd/app/node_modules/deep-freeze/index.js:9:7 at Array.forEach (<anonymous>) at deepFreeze (/home/hackmd/app/node_modules/deep-freeze/index.js:4:33) at /home/hackmd/app/node_modules/deep-freeze/index.js:9:7 at Array.forEach (<anonymous>)
at deepFreeze (/home/hackmd/app/node_modules/deep-freeze/index.js:4:33)
at Object.<anonymous> (/home/hackmd/app/lib/config/index.js:214:10)
at Module._compile (node:internal/modules/cjs/loader:1198:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10)
at Module.load (node:internal/modules/cjs/loader:1076:32)
at Function.Module._load (node:internal/modules/cjs/loader:911:12)
at Module.require (node:internal/modules/cjs/loader:1100:19)
at require (node:internal/modules/cjs/helpers:119:18)
at Object.<anonymous> (/home/hackmd/app/app.js:23:14)
at Module._compile (node:internal/modules/cjs/loader:1198:14)
If you use random secrets, that are not used by https://github.com/hackmdio/codimd/blob/develop/lib/config/dockerSecret.js, there is no exception. If you used a named secret (e.g. imgur_clientid), like in the following example, you get the exception.
codimd:
image: hackmdio/hackmd:2.6.1
container_name: codimd
[... other container settings ...]
secrets:
- source: codimd_imgur_secret
target: imgur_clientid # when target = "abcef" no exception, but the secret is not used of course
- 主要语言
- JavaScript
- 星标
- 10.2k
- 派生
- 1.1k
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
hackmdio/codimd 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 3/5 1-2 天 新手友好度 48/100
-
unable to login未关闭
难度 2/5 1-3 小时 新手友好度 28/100
-
难度 3/5 1-2 天 新手友好度 45/100
-
edu-hub未关闭
难度 5/5 一周以上 新手友好度 20/100
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
MetaMask/eth-phishing-detect#317371 ·
维护者通常 1 天内回复
-
good first issue help wanted
难度 2/5 1-3 小时 新手友好度 88/100
erkamyaman/safe-anything#262 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 92/100
erkamyaman/rust-anything#963 ·
维护者通常 1 天内回复
-
good first issue
难度 1/5 1 小时以内 新手友好度 95/100
brystmar/breadsheet-ui#78 ·
维护者通常 1 天内回复
-
enhancement good first issue
难度 2/5 1-3 小时 新手友好度 84/100