{"record":{"id":"9340ea84f1866d76","repo":"lyswhut/lx-music-desktop","slug":"connect-service-failed","errorCode":null,"errorMessage":"Connect service failed","messagePattern":"Connect service failed","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/main/modules/sync/client/auth.ts","lineNumber":90,"sourceCode":"    } catch (err: any) {\n      log.error('[auth] keyAuth decryptMsg error', err.message)\n      throw new Error(SYNC_CODE.authFailed)\n    }\n    if (msg != SYNC_CODE.helloMsg) return Promise.reject(new Error(SYNC_CODE.authFailed))\n  })\n}\n\nconst auth = async(urlInfo: LX.Sync.Client.UrlInfo, serverId: string, authCode?: string) => {\n  if (authCode) return codeAuth(urlInfo, serverId, authCode)\n  const keyInfo = await getSyncAuthKey(serverId)\n  if (!keyInfo) throw new Error(SYNC_CODE.missingAuthCode)\n  await keyAuth(urlInfo, keyInfo)\n  return keyInfo\n}\n\nexport default async(urlInfo: LX.Sync.Client.UrlInfo, authCode?: string) => {\n  console.log('connect: ', urlInfo.href, authCode)\n  if (!await hello(urlInfo)) throw new Error(SYNC_CODE.connectServiceFailed)\n  const serverId = await getServerId(urlInfo)\n  if (!serverId) throw new Error(SYNC_CODE.getServiceIdFailed)\n  return auth(urlInfo, serverId, authCode)\n}\n","sourceCodeStart":72,"sourceCodeEnd":95,"githubUrl":"https://github.com/lyswhut/lx-music-desktop/blob/9c364b482e5621a1d38b50e8610d2fb974457e6e/src/main/modules/sync/client/auth.ts#L72-L95","documentation":"Error \"Connect service failed\" thrown in lyswhut/lx-music-desktop.","triggerScenarios":"Thrown at src/main/modules/sync/client/auth.ts:90 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9c364b482e5621a1d38b50e8610d2fb974457e6e","analyzedAt":"2026-08-12T15:14:48.244Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}