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
-
bug confirmed issue
難度 2/5 半天 新手友好度 78/100
open-webui/open-webui#35213 · 2 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
exa-studio/ApiVault#338 ·
-
難度 2/5 1-3 小時 新手友好度 84/100
Fei2411/DeepSeek-Bot#2556 ·
-
難度 1/5 1 小時以內 新手友好度 85/100
cline/mcp-marketplace#4235 ·
-
bug good first issue help wanted
難度 2/5 1-3 小時 新手友好度 90/100
vishwagw/Sky-Sim-drone-simulator-3.0#52 ·
維護者通常 1 天內回覆