NewFuture / DDNS

:triangular_flag_on_post: 自动更新域名解析到本机IP(支持dnspod,阿里DNS,CloudFlare,华为云,DNSCOM...)
https://ddns.newfuture.cc/
MIT License
4.37k stars 666 forks source link

[debug] ValueError: underlying buffer has been detached #408

Open Vincy1230 opened 1 year ago

Vincy1230 commented 1 year ago

描述问题 (Describe the bug)

版本信息 (version info)

配置文件 (config file)

{
  "$schema": "https://ddns.newfuture.cc/schema/v2.8.json",
  "debug": false,
  "dns": "alidns",
  "id": "***",
  "index4": "default",
  "index6": "default",
  "ipv4": [
    "***.***.com"
  ],
  "ipv6": [],
  "proxy": null,
  "token": "***",
  "ttl": null
}

调试输出 (debug output)

2023-09-14 00:07:05,943 <cache.load> 48@util\cache.py
[DEBUG] load cache data from C:\Users\***\AppData\Local\Temp\ddns.cache
2023-09-14 00:07:05,943 <run.main> 151@run.py
[WARNING] Cache file is out of dated.
2023-09-14 00:07:05,947 <alidns.update_record> 148@dns\alidns.py
[DEBUG] >>>>>***.***.com(A)
2023-09-14 00:07:05,947 <alidns.signature> 58@dns\alidns.py
[DEBUG] AccessKeyId=***&Action=GetMainDomainName&Format=json&InputString=***.***.com&SignatureMethod=HMAC-SHA1&SignatureNonce=***-***-***-***-***&SignatureVersion=1.0&Timestamp=2023-09-13T16%3A07%3A05Z&Version=2015-01-09
2023-09-14 00:07:05,947 <alidns.signature> 60@dns\alidns.py
[DEBUG] signString: POST&%2F&AccessKeyId%***%26Action%3DGetMainDomainName%26Format%3Djson%26InputString%3D***.***.com%26SignatureMethod%3DHMAC-SHA1%26SignatureNonce%3D***-***-***-***-***%26SignatureVersion%3D1.0%26Timestamp%3D2023-09-13T16%253A07%253A05Z%26Version%3D2015-01-09
2023-09-14 00:07:05,947 <alidns.request> 77@dns\alidns.py
[INFO] alidns.aliyuncs.com: {'Action': 'GetMainDomainName', 'InputString': '***.***.com', 'Format': 'json', 'Version': '2015-01-09', 'AccessKeyId': '***', 'Timestamp': '2023-09-13T16:07:05Z', 'SignatureMethod': 'HMAC-SHA1', 'SignatureNonce': UUID('***-***-***-***-***'), 'SignatureVersion': '1.0', 'Signature': b'SF8im/***='}
2023-09-14 00:07:06,359 <alidns.request> 95@dns\alidns.py
[DEBUG] GetMainDomainName : result:{'RR': '***', 'RequestId': '***-***-***-***-***', 'DomainName': '***.com', 'DomainLevel': 2}
2023-09-14 00:07:06,363 <alidns.signature> 58@dns\alidns.py
[DEBUG] AccessKeyId=***&Action=DescribeDomainRecords&DomainName=***.com&Format=json&PageSize=500&SignatureMethod=HMAC-SHA1&SignatureNonce=***-***-***-***-***&SignatureVersion=1.0&Timestamp=2023-09-13T16%3A07%3A06Z&Version=2015-01-09
2023-09-14 00:07:06,371 <alidns.signature> 60@dns\alidns.py
[DEBUG] signString: POST&%2F&AccessKeyId%***%26Action%3DDescribeDomainRecords%26DomainName%3D***.com%26Format%3Djson%26PageSize%3D500%26SignatureMethod%3DHMAC-SHA1%26SignatureNonce%3D***-***-***-***-***%26SignatureVersion%3D1.0%26Timestamp%3D2023-09-13T16%253A07%253A06Z%26Version%3D2015-01-09
2023-09-14 00:07:06,371 <alidns.request> 77@dns\alidns.py
[INFO] alidns.aliyuncs.com: {'Action': 'DescribeDomainRecords', 'DomainName': '***.com', 'PageSize': 500, 'Format': 'json', 'Version': '2015-01-09', 'AccessKeyId': '***', 'Timestamp': '2023-09-13T16:07:06Z', 'SignatureMethod': 'HMAC-SHA1', 'SignatureNonce': UUID('***-***-***-***-***'), 'SignatureVersion': '1.0', 'Signature': ***='}
2023-09-14 00:07:06,547 <alidns.request> 95@dns\alidns.py
[DEBUG] DescribeDomainRecords : result:{'TotalCount': 1, 'RequestId': '***-***-***-***-***', 'PageSize': 500, 'DomainRecords': {'Record': [{'RR': '***', 'Line': 'default', 'Status': 'ENABLE', 'Locked': False, 'Type': 'A', 'DomainName': '***.com', 'Value': '10.101.160.127', 'RecordId': '***', 'TTL': 600, 'Weight': 1}]}, 'PageNumber': 1}
2023-09-14 00:07:06,551 <cache.sync> 85@util\cache.py
[DEBUG] save cache data to C:\Users\***\AppData\Local\Temp\ddns.cache
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ValueError: underlying buffer has been detached
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ValueError: underlying buffer has been detached
Vincy1230 commented 1 year ago

直觉告诉我是这两句的锅,但是我没有证据 [苦笑]

1694626204590

Vincy1230 commented 1 year ago

没证据的原因:妹子的电脑上没环境 [手动狗头]

NewFuture commented 1 year ago

windows的这个编码在有的系统上确实可能有问题😂

laminux29 commented 1 year ago

遇到了同样的问题。

描述问题 (Describe the bug)

[debug] ValueError: underlying buffer has been detached

版本信息 (version info)

配置文件 (config file)

{
  "$schema": "https://ddns.newfuture.cc/schema/v2.8.json",
  "debug": false,
  "dns": "alidns",
  "id": "XXXXXX",
  "index4": "regex:10.*",
  "index6": "false",
  "ipv4": ["aa_bb-cc.dddd.eee"],
  "ipv6": [],
  "proxy": null,
  "token": "YYYYYYYYYYYY",
  "ttl": null,
  "cache": true
}
laminux29 commented 1 year ago

我换方案了,目前只测试了 Win10、Win11。不用那个单 exe,换了Python,用 pip 挂梯子下了 ddns。然后用 Windows 计划任务实现了开机跑一次ddns,以及每隔一分钟跑一次 ddns。注意cache参数一定要设置为 false,不差那点优化,但如果开了cache在某些场景容易造成麻烦。

kingsznhone commented 1 year ago

我之前一直用的好好的,重装了系统也遇到这个问题了

NewFuture commented 1 year ago

有兼容问题可以先用旧版的😂

我之前一直用的好好的,重装了系统也遇到这个问题了

iconFehu commented 10 months ago

同样的报错信息在Windows11上

FerretAngel commented 8 months ago

f5ed430a23597943c7ea4aaece3e6e71 我也遇到了同样的问题。有没有解决方案?

riverai commented 2 months ago

这个问题有办法了吗,今天在win11上也这样报错,用的是Cloudflare

kingsznhone commented 2 months ago

这个问题有办法了吗,今天在win11上也这样报错,用的是Cloudflare

有办法了,用ddns-go