NeteaseCloudMusicApi icon indicating copy to clipboard operation
NeteaseCloudMusicApi copied to clipboard

只能访问index主页,请求其他功能状态码502报错

Open LIPACEY opened this issue 2 years ago • 4 comments

环境

  • 系统/平台: Windows 11 21H2

  • nodejs 版本: <v16.17.1>

  • API版本: <4.8.2>

出现问题

node app.js运行正常,能正常显示页面,请求搜索等就会报错 [ERR] /search?keywords=海阔天空 { status: 502, body: { code: 502, msg: Error: read ECONNRESET at TLSWrap.onStreamRead (node:internal/stream_base_commons:217:20) { errno: -4077, code: 'ECONNRESET', syscall: 'read', config: [Object], request: [Writable], response: undefined, isAxiosError: true, toJSON: [Function: toJSON] } } } E:\Reptile\Music\NeteaseCloudMusicApi-master\node_modules\express\lib\response.js:1123 : JSON.stringify(value); ^

TypeError: Converting circular structure to JSON --> starting at object with constructor 'Object' | property 'httpsAgent' -> object with constructor 'Agent' | property 'sockets' -> object with constructor 'Object' | ... | property 'errored' -> object with constructor 'Object' --- property 'config' closes the circle at JSON.stringify () at stringify (E:\Reptile\Music\NeteaseCloudMusicApi-master\node_modules\express\lib\response.js:1123:12) at ServerResponse.json (E:\Reptile\Music\NeteaseCloudMusicApi-master\node_modules\express\lib\response.js:260:14) at ServerResponse.send (E:\Reptile\Music\NeteaseCloudMusicApi-master\node_modules\express\lib\response.js:158:21) at E:\Reptile\Music\NeteaseCloudMusicApi-master\server.js:270:43 at processTicksAndRejections (node:internal/process/task_queues:96:5)

重现步骤

微信图片_20220927170410 微信图片_20220927170430 微信图片_20220927170448

期待效果

功能能够正常运行


LIPACEY avatar Sep 27 '22 09:09 LIPACEY

I had a friend that encountered the same thing. Hopefully this helps you.

Go to C:\Windows\System32\drivers\etc
Open hosts Delete any lines with music.163 or similar Save (may require Administrator) Try running CloudApi again.

Platapoop avatar Sep 28 '22 06:09 Platapoop

我也是兄弟,你解决了吗

295we avatar Nov 02 '22 11:11 295we

我也是兄弟,你解决了吗

wanglong-wl avatar Nov 02 '22 12:11 wanglong-wl

配hosts换一个music.163.com试试, 我遇到的是海外的服务器dns也会返回海外的cdn地址,访问的时候会报502,换成国内的ip就好了

olbb avatar Jan 28 '23 07:01 olbb