Closed hanazawasakurako closed 2 years ago
错误信息:
Help->Toggle Developer Tools->Console
)~/.cloudmusic/err-<version>.log
%homepath%/.cloudmusic/err-<version>.log
我这边也是同样的问题,控制台打开看到是资源文件找不到
但是文件系统中文件是存在的,不知道是不是请求路径出了什么问题,操作系统win10,vscode版本1.63.0,插件版本v9.5.1
我这边的问题可能是本地用户目录问题,用户目录实际是在D盘,原来的C盘用户目录是是用软连接指向的D盘对应位置,所以代码中__dirname得到的是文件在D盘的实际位置,vscode可能有什么限制不能加载这个目录,我手动将 _dirname 改成C盘地址后是可以正常使用了
我这边的问题可能是本地用户目录问题,用户目录实际是在D盘,原来的C盘用户目录是是用软连接指向的D盘对应位置,所以代码中__dirname得到的是文件在D盘的实际位置,vscode可能有什么限制不能加载这个目录,我手动将 _dirname 改成C盘地址后是可以正常使用了
感谢
我这边的报错日志:
thread 'Result::unwrap()
on an Err
value: Error(Error { code: 0x80040111, message: ClassFactory 无法供应请求的类
})', crates\native\src\media.rs:109:56
note: run with RUST_BACKTRACE=1
environment variable to display a backtrace
c:\Users\CHENJIEFENG.vscode\extensions\yxl.cloudmusic-9.8.2\dist\server.js:15
);for(let o of r){let l=/^((\[\d+:\d{2}[.:]\d{2,3}\])+)(.*)$/g.exec(o.trim());if(!l)continue;let u=((n=l[3])==null?void 0:n.trim())??"",c=l[1];for(;c;){let a=/^\[(\d+):(\d{2})[.:](\d{2,3})\](.*)$/g.exec(c);if(!a)break;let p=parseInt(a[1]),f=parseInt(a[2]),m=parseInt(a[3].length===2?
${a[3]}0:a[3]);e.push([p*60+f+m/1e3,u]),c=a[4]}}e.sort(([o],[l])=>o-l);let s=[],i=e.length;for(let o=0;o<i;++o){let[l,u]=e[o];u&&s.push([l,u])}return s},ya=t=>t?{nickname:t.nickname,userid:t.userid}:void 0;async function Rm(t){var f,m;let e=await ct.get(
${t});if(e)return e;let r=await At("music.163.com/api/song/lyric",{id:t,lv:-1,kv:-1,tv:-1});if(!r)return{time:[0],text:[["~"]],user:[]};let s=ha(((f=r==null?void 0:r.lrc)==null?void 0:f.lyric)??""),i=ha(((m=r==null?void 0:r.tlyric)==null?void 0:m.lyric)??""),n=[ya(r.lyricUser),ya(r.transUser)],o=0,l=0,u=[],c=[];for(;o<s.length&&l<i.length;){let[g,x]=s[o],[E,T]=i[l];g===E?(u.push(g),c.push([x,T]),++o,++l):g<E?(u.push(g),c.push([x]),++o):++l}for(;o<s.length;){let[g,x]=s[o++];u.push(g),c.push([x])}for(;l<i.length;){let[g,x]=i[l];u.push(g),c.push([x])}u.length===0&&(u.push(0),c.push(["~"]));let p={ctime:Date.now(),time:u,text:c,user:n};return ct.put(
${t},p),p}async function xm(t,e,r){let s=
simi_song${t}-${e}-${r},i=h.get(s);if(i)return i;let n=await y("music.163.com/weapi/v1/discovery/simiSong",{songid:t,limit:e,offset:r});if(!n)return[];let o=n.songs.map(Be);return h.set(s,o),o}async function pi(t,e){let r=
song_detail${e[0]};if(e.length===1){let n=h.get(r);if(n)return n}let s=1e3,i=[];for(let n=0;n<e.length;n+=s){let o=e.slice(n,n+s);i.push((async()=>{let l=await y("music.163.com/weapi/v3/song/detail",{c:
[${o.map(a=>{"id":${a}}
).join(",")}]},v.cookies.get(t));if(!l)throw new Error("");let{songs:u,privileges:c}=l;return u.filter((a,p)=>c[p].st>=0).map(pe)})())}try{let n=(await Promise.all(i)).flat();return e.length===1&&h.set(r,n),n}catch(n){D(n)}return[]}async function Sm(t){for(let[,e]of v.cookies){let[r,s]=await Promise.allSettled([Ne("interface3.music.163.com/eapi/song/enhance/player/url",{ids:
[${t}],br:O.musicQuality},"/api/song/enhance/player/url",C(R({},e),{os:"pc"})),Ne("interface.music.163.com/eapi/song/enhance/download/url",{id:t,br:O.musicQuality},"/api/song/enhance/download/url",e)]);if(r.status==="fulfilled"){let[{url:i,md5:n,type:o,freeTrialInfo:l}]=r.value.data;if(!l)return{url:i,md5:n,type:o}}if(s.status==="fulfilled"){let{url:i,md5:n,type:o,freeTrialInfo:l}=s.value.data;if(!l)return{url:i,md5:n,type:o}}}return{}}async function Om(t){let e=
top_song${t},r=h.get(e);if(r)return r;let s=await y("music.163.com/weapi/v1/discovery/new/songs",{areaId:t,total:!0});if(!s)return[];let i=s.data.map(Be);return h.set(e,i),i}var Ct=require("path");var fi=!1;async function Pm(){let{id:t,name:e}=(O.fm?await Ge.next():k.next)||{};if(!t||!e)return;let r=
${t};if(V.get(r))return;let{url:s,md5:i}=await ee.songUrl(r);if(!s)return;let n=(0,Ct.resolve)(ye,r),o;O.fm||(o={id:r,name:
${e}-${r},path:n,md5:i}),Sr(s,n,o),ee.lyric(t)}function di(t){t>120&&!fi&&(fi=!0,Pm());let e=t-O.lyric.delay,r=O.lyric.idx;for(;O.lyric.time[O.lyric.idx]<=e;)++O.lyric.idx;r!==O.lyric.idx&&$.broadcast({t:"205",idx:O.lyric.idx-1})}var ga=class{load(e){$.sendToMaster({t:"400",path:e})}pause(){$.sendToMaster({t:"401"})}play(){$.sendToMaster({t:"402"})}stop(){$.sendToMaster({t:"403"})}speed(e){$.sendToMaster({t:"405",speed:e})}volume(e){$.sendToMaster({t:"404",level:e})}},Pr=class{static get playing(){return this._playing}static set playing(e){if(this._playing!==e){if(this._playing=e,this._native){let r=this._native.playerPosition(this._player);this._native.mediaSessionSetPlayback(this._mediaSession,e,r)}$.broadcast({t:e?"207":"206"})}}static init(){if(!(this._wasm||this._native))if(process.env.CM_WASM==="0"){let e=process.env.CM_NATIVE_MODULE,r=(0,Ct.resolve)(__dirname,"..","build",e);this._native=require(r),this._player=this._native.playerNew();let s=parseInt(process.env.CM_VOLUME||"85",10),i=parseFloat(process.env.CM_SPEED||"1");this._native.playerSetVolume(this._player,s),this._native.playerSetSpeed(this._player,i),this.mediaSession(process.env.VSCODE_PID,!0),setInterval(()=>{if(!!this._playing){if(Pr.empty()){this.playing=!1,$.sendToMaster({t:"200"});return}di(Pr.position())}},800)}else this._wasm=new ga}static mediaSession(e,r){if(!this._native)return;let s="";process.platform==="win32"&&e&&(s=this._native.mediaSessionHwnd(e)),(r||s)&&(this._mediaSession=this._native.mediaSessionNew(s,this.play.bind(this),this.pause.bind(this),this.toggle.bind(this),()=>$.sendToMaster({t:"214"}),()=>$.sendToMaster({t:"215"}),this.stop.bind(this)))}static empty(){return this._native?this._native.playerEmpty(this._player):!0}static async load(e){let r=Date.now();if(r<this._loadtime){this._failedEnd();return}this._loadtime=r;let s,i="local"in e&&e.local,n="item"in e&&e.item;if(i?s=e.url:n&&(s=await pa(e.item.id,e.item.name,!!this._wasm)),!s){this._failedEnd();return}if(this._native){if(!this._native.playerLoad(this._player,s)){this._failedEnd();return}$.broadcast({t:"202"}),i?this._native.mediaSessionSetMetadata(this._mediaSession,(0,Ct.basename)(s),"","","",0):n&&this._native.mediaSessionSetMetadata(this._mediaSession,e.item.name,e.item.al.name,e.item.ar.map(l=>l.name).join("/"),e.item.al.picUrl,e.item.dt/1e3)}else this._wasm&&this._wasm.load(s);this.next=n?e.next:void 0,this.playing=!0,fi=!1,n&&ee.lyric(e.item.id).then(l=>{Object.assign(O.lyric,l,{idx:0}),$.broadcast({t:"203",lyric:l})});let o=this._time;if(this._time=Date.now(),this.id){let l=this._time-o;if(l>6e4&&this._dt>6e4){let u=Math.floor(Math.min(l,this._dt)/1e3);ee.scrobble(this.id,this._pid,u)}}n?(this.id=e.item.id,this._dt=e.item.dt,this._pid=e.pid):(this.id=0,this._dt=0,this._pid=0)}static toggle(){this._playing?this.pause():this.play()}static pause(){var e,r;(e=this._native)==null||e.playerPause(this._player),(r=this._wasm)==null||r.pause(),this.playing=!1}static play(){var e,r;((e=this._native)==null?void 0:e.playerPlay(this._player))&&(this.playing=!0),(r=this._wasm)==null||r.play()}static position(){var e;return((e=this._native)==null?void 0:e.playerPosition(this._player))||0}static stop(){var e,r;(e=this._native)==null||e.playerStop(this._player),(r=this._wasm)==null||r.stop(),this.playing=!1}static speed(e){var r,s;(r=this._native)==null||r.playerSetSpeed(this._player,e),(s=this._wasm)==null||s.speed(e)}static volume(e){var r,s;(r=this._native)==null||r.playerSetVolume(this._player,e),(s=this._wasm)==null||s.volume(e)}static wasmOpen(){this._wasm&&setTimeout(()=>this._failedEnd(),1024)}static _failedEnd(){$.sendToMaster({t:"200",fail:!0})}},k=Pr;k.id=0,k._dt=0,k._pid=0,k._time=0,k._loadtime=0,k._playing=!1;var Pe=require("fs/promises");var mi=require("net"),$=class{static get _master(){let[e]=this._sockets;return e}static async init(){let[e]=await Promise.allSettled([(0,Pe.readFile)(Os),(0,Pe.rm)(Rs,{recursive:!0,force:!0})]);e.status==="fulfilled"&&(this._retain=JSON.parse(e.value.toString())),this._server=(0,mi.createServer)(r=>{this._timer&&(clearTimeout(this._timer),this._timer=void 0),this._sockets.add(r),this._buffer.set(r,""),r.setEncoding("utf8").on("data",s=>{let n=((this._buffer.get(r)??"")+s.toString()).split(Tt);this._buffer.set(r,n.pop()??"");for(let o of n)this._handler(JSON.parse(o),r)}).on("close",()=>{let s=!1;{let[i]=this._sockets;s=i===r}r==null||r.destroy(),this._sockets.delete(r),this._buffer.delete(r),this._sockets.size?(this._setMaster(),s&&k.wasmOpen()):(k.pause(),this._timer=setTimeout(()=>{this._sockets.size||(this.stop(),qt.stop(),Promise.allSettled([V.store(),(0,Pe.rmdir)(ye,{recursive:!0}),(0,Pe.writeFile)(Os,JSON.stringify(this._retain))]).finally(()=>process.exit()))},2e4))}).on("error",D),this._setMaster(),this._sockets.size===1?this._first?this._first=!1:(k.play(),this.send(r,{t:"108",items:this._retain}),this._retain=[]):(this.sendToMaster({t:"107"}),this.send(r,{t:k.playing?"207":"206"}))}).on("error",D).listen(Rs)}static stop(){this._server.close(()=>{for(let e of this._sockets)e==null||e.destroy();this._sockets.clear()})}static send(e,r){e.write(
${JSON.stringify(r)}${Tt})}static sendToMaster(e){var r;(r=this._master)==null||r.write(
${JSON.stringify(e)}${Tt})}static broadcast(e){let r=
${JSON.stringify(e)}${Tt};for(let s of this._sockets)s.write(r)}static _setMaster(){let[e,...r]=this._sockets;this.send(e,{t:"104",is:!0});for(let s of r)this.send(s,{t:"104"})}static _handler(e,r){switch(e.t){case"000":ee[e.msg.i].apply(void 0,e.msg.p).then(s=>this.send(r,{t:e.t,channel:e.channel,msg:s})).catch(D);break;case"100":h.del(e.key);break;case"101":Sr(e.url,e.path);break;case"102":O.minSize=e.mq===999e3?2*1024*1024:256*1024,O.musicQuality=e.mq,O.cacheSize=e.cs,O.foreign=e.foreign,ve.apiProtocol=e.https?"https":"http";break;case"103":ct.clear();break;case"106":Rt(r);break;case"105":V.clear();break;case"108":e.items?this._retain=e.items:this.send(r,{t:"108",items:this._retain});break;case"109":k.mediaSession(e.pid);break;case"201":k.load(e);break;case"204":O.lyric.delay=e.delay;break;case"208":k.playing=e.playing;break;case"209":di(e.pos);break;case"212":k.toggle();break;case"211":k.stop(),this.broadcast(e);break;case"213":k.volume(e.level),this.broadcast(e);break;case"216":k.speed(e.speed),this.broadcast(e);break;case"303":e.is?(O.fm=!0,Ge.uid=e.uid,this.broadcast({t:"303"})):O.fm=!1;break;case"304":Ge.head().then(s=>{s&&(O.fm=!0,this.broadcast({t:"304",item:s}))}).catch(D);break}}};$._first=!0,$._retain=[],$._sockets=new Set,$._buffer=new WeakMap;var qt=class{static async init(){await(0,Pe.rm)(xs,{recursive:!0,force:!0}).catch(()=>{}),this._server=(0,mi.createServer)(e=>{this._sockets.add(e),e.setEncoding("utf8").on("data",r=>this._broadcast(r)).on("close",()=>{e==null||e.destroy(),this._sockets.delete(e)}).on("error",D)}).on("error",D).listen(xs)}static stop(){this._server.close(()=>{for(let e of this._sockets)e==null||e.destroy();this._sockets.clear()})}static _broadcast(e){for(let r of this._sockets)r.write(e)}};qt._sockets=new Set;var vs=require("fs/promises");var kc=ce(Dc()),sn=ce(require("http")),nn=ce(require("https"));var jc=require("fs"),Mc=require("path");process.on("unhandledRejection",D);process.env.GLOBAL_AGENT_HTTP_PROXY?(0,kc.bootstrap)():(sn.default.globalAgent=new sn.default.Agent({keepAlive:!0}),nn.default.globalAgent=new nn.default.Agent({keepAlive:!0}));var bs=t=>{try{(0,jc.mkdirSync)(t)}catch{}};k.init();$.init();qt.init();bs(ye);bs(et);bs(Fe);bs(ge);V.init();setInterval(()=>{(0,vs.readdir)(ye).then(t=>{var e;for(let r of t){if(r===
${k.id}||r===
${((e=k.next)==null?void 0:e.id)||""}`)continue;let s=(0,Mc.resolve)(ye,r);(0,vs.rm)(s).catch(D);return}V.store()}).catch(D)},12e4);
Error: internal error in Neon module: called Result::unwrap()
on an Err
value: Error(Error { code: 0x80040111, message: ClassFactory 无法供应请求的类
})
at Function.mediaSession (c:\Users\CHENJIEFENG.vscode\extensions\yxl.cloudmusic-9.8.2\dist\server.js:15:4465)
at Function.init (c:\Users\CHENJIEFENG.vscode\extensions\yxl.cloudmusic-9.8.2\dist\server.js:15:4109)
at Object.
请给出系统信息 @CJFJack
请给出系统信息 @CJFJack
windows 7
请给出系统信息 @CJFJack
windows 7
暂不支持 Win7
请给出系统信息 @CJFJack
windows 7
暂不支持 Win7
谢谢,安装旧版本可以解决问题
请提交系统信息@CJFJack
Windows 7的
暂不支持Win7
谢谢,安装旧版本可以解决问题
你好 我也是win7系统 请问如何安装旧版本 安装哪个旧版本?vscode还是插件 插件旧版本如何安装
你好,是安装旧版本插件,在插件列表有个小齿轮,install another version
------------------ 原始邮件 ------------------ 发件人: FormotherChina @.> 发送时间: 2022年3月20日 15:45 收件人: YXL76/cloudmusic-vscode @.> 抄送: CJFJack @.>, Mention @.> 主题: Re: [YXL76/cloudmusic-vscode] 无法登录问题 (Issue #618)
@.***
Windows 7的
暂不支持Win7
谢谢,安装旧版本可以解决问题
你好 我也是win7系统 请问如何安装旧版本 安装哪个旧版本?vscode还是插件 插件旧版本如何安装
— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you were mentioned.Message ID: @.***>
你好,是安装旧版本插件,在插件列表有个小齿轮,install another version … ------------------ 原始邮件 ------------------ 发件人: FormotherChina @.> 发送时间: 2022年3月20日 15:45 收件人: YXL76/cloudmusic-vscode @.> 抄送: CJFJack @.>, Mention @.> 主题: Re: [YXL76/cloudmusic-vscode] 无法登录问题 (Issue #618) @. Windows 7的 暂不支持Win7 谢谢,安装旧版本可以解决问题 你好 我也是win7系统 请问如何安装旧版本 安装哪个旧版本?vscode还是插件 插件旧版本如何安装 — Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you were mentioned.Message ID: @.>
好的 谢谢
点击二维码无法跳出二维码图片,vscode没有反应,用其他方式登录就一直报登录失败,也没有报错什么的。