{"record":{"id":"63fb993f695726bc","repo":"microsoft/vscode","slug":"unable-to-render-qr-code","errorCode":null,"errorMessage":"Unable to render QR code.","messagePattern":"Unable to render QR code\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"extensions/copilot/src/extension/chatSessions/copilotcli/node/copilotcliSession.ts","lineNumber":805,"sourceCode":"\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tconst bit = bitIndex < codewordBits.length ? codewordBits[bitIndex++] : false;\n\t\t\t\t\tmodules[y][x] = bit !== getQrMask(mask, x, y);\n\t\t\t\t}\n\t\t\t}\n\t\t\tupward = !upward;\n\t\t}\n\n\t\tsetQrFormatInfo(modules, mask);\n\t\tconst penalty = getQrPenalty(modules);\n\t\tif (penalty < bestPenalty) {\n\t\t\tbestPenalty = penalty;\n\t\t\tbestModules = modules;\n\t\t}\n\t}\n\n\tif (!bestModules) {\n\t\tthrow new Error('Unable to render QR code.');\n\t}\n\treturn bestModules;\n}\n\nasync function renderRemoteControlQrCode(data: string): Promise<string> {\n\tconst modules = buildQrMatrix(data);\n\tconst imageSize = (qrSize + qrQuietZoneModules * 2) * qrSvgModuleSize;\n\tconst path = modules.flatMap((row, y) => row.map((dark, x) => {\n\t\tif (!dark) {\n\t\t\treturn '';\n\t\t}\n\t\tconst moduleX = (x + qrQuietZoneModules) * qrSvgModuleSize;\n\t\tconst moduleY = (y + qrQuietZoneModules) * qrSvgModuleSize;\n\t\treturn `M${moduleX} ${moduleY}h${qrSvgModuleSize}v${qrSvgModuleSize}h-${qrSvgModuleSize}z`;\n\t})).join('');\n\tconst svg = `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 ${imageSize} ${imageSize}\" width=\"${imageSize}\" height=\"${imageSize}\"><path fill=\"#fff\" d=\"M0 0h${imageSize}v${imageSize}H0z\"/><path fill=\"#000\" d=\"${path}\"/></svg>`;\n\treturn `data:image/svg+xml;base64,${Buffer.from(svg).toString('base64')}`;\n}","sourceCodeStart":787,"sourceCodeEnd":823,"githubUrl":"https://github.com/microsoft/vscode/blob/a94b963a32aa9749d69504576791fa29700ae46d/extensions/copilot/src/extension/chatSessions/copilotcli/node/copilotcliSession.ts#L787-L823","documentation":"Error \"Unable to render QR code.\" thrown in microsoft/vscode.","triggerScenarios":"Thrown at extensions/copilot/src/extension/chatSessions/copilotcli/node/copilotcliSession.ts:805 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"a94b963a32aa9749d69504576791fa29700ae46d","analyzedAt":"2026-08-12T01:08:56.794Z","schemaVersion":2},"datasetVersion":"2026-08-12T06:17:24.410Z"}