alist-org / alist

🗂️A file list/WebDAV program that supports multiple storages, powered by Gin and Solidjs. / 一个支持多存储的文件列表/WebDAV程序,使用 Gin 和 Solidjs。
https://alist.nn.ci
GNU Affero General Public License v3.0
39.38k stars 5.11k forks source link

armv7(32位系统)从其他网盘或本地存储复制文件到夸克,文件过大(超过2g)时出现error #6572

Open xindongzetong opened 3 weeks ago

xindongzetong commented 3 weeks ago

Please make sure of the following things

AList Version / AList 版本

v3.35.0

Driver used / 使用的存储驱动

夸克

Describe the bug / 问题描述

armv7(32位系统)从其他网盘或本地存储复制文件到夸克,文件过大(超过2g)时出现error 失败提示:json: cannot unmarshal number 2233195161 into Go struct field .data.size of type int 感觉像是超过int类型最大数值(21亿)导致报错 给一个chatgpt的解释: 在 Go 语言中,如果你遇到类似 "cannot unmarshal number 7965668566 into Go struct field .data.size of type int" 的错误,通常是因为 JSON 中的某个字段包含的值超出了 Go 语言中对应类型的范围。 在这种情况下,你可以考虑将 JSON 字段中的该值映射到 Go 中更大范围的类型,比如 float64 或 int64。

Reproduction / 复现链接

见日志

Config / 配置

{ "force": false, "site_url": "", "cdn": "", "jwt_secret": "oaXSadw9DTbaVEbi", "token_expires_in": 48, "database": { "type": "sqlite3", "host": "", "port": 0, "user": "", "password": "", "name": "", "db_file": "data/data.db", "tableprefix": "x", "ssl_mode": "", "dsn": "" }, "meilisearch": { "host": "http://localhost:7700", "api_key": "", "index_prefix": "" }, "scheme": { "address": "0.0.0.0", "http_port": 5244, "https_port": -1, "force_https": false, "cert_file": "", "key_file": "", "unix_file": "", "unix_file_perm": "" }, "temp_dir": "data/temp", "bleve_dir": "data/bleve", "dist_dir": "", "log": { "enable": true, "name": "data/log/log.log", "max_size": 50, "max_backups": 30, "max_age": 28, "compress": false }, "delayed_start": 0, "max_connections": 0, "tls_insecure_skip_verify": true, "tasks": { "download": { "workers": 5, "max_retry": 1 }, "transfer": { "workers": 5, "max_retry": 2 }, "upload": { "workers": 5, "max_retry": 0 }, "copy": { "workers": 5, "max_retry": 2 } }, "cors": { "allow_origins": [ "" ], "allow_methods": [ "" ], "allow_headers": [ "*" ] }, "s3": { "enable": false, "port": 5246, "ssl": false } }

Logs / 日志

2024/06/04 06:27:44.227444 WARN RESTY json: cannot unmarshal number 7965668566 into Go struct field .data.size of type int, Attempt 1 2024/06/04 06:27:44.231675 ERROR RESTY json: cannot unmarshal number 7965668566 into Go struct field .data.size of type int

github-actions[bot] commented 3 weeks ago

See

  1. 75% #6163
xindongzetong commented 3 weeks ago

手里用的玩客云,armv7架构会出现此问题。arm64或amd64架构不会出现此问题

pongfcnkl commented 3 weeks ago

那就换64位