{"record":{"id":"d05276da46fbd987","repo":"ComposioHQ/composio","slug":"dlsym-name-failed","errorCode":null,"errorMessage":"dlsym(${name}) failed","messagePattern":"dlsym\\((.+?)\\) failed","errorType":"exception","errorClass":"KeyringError","httpStatus":null,"severity":"critical","filePath":"ts/packages/cli-keyring/src/stores/macos-security-ffi.ts","lineNumber":104,"sourceCode":"    throw new KeyringError({\n      kind: 'PlatformFailure',\n      cause: new Error(`dlopen(${path}) failed`),\n    });\n  }\n  return handle;\n}\n\n/**\n * Resolve an extern const CFTypeRef data symbol: `dlsym` returns the\n * address of the storage slot (i.e. a pointer-to-pointer); we\n * dereference one level via `read.ptr` to get the actual CFTypeRef\n * value stored there. The symbol is stable for the process lifetime,\n * so caching the resolved BigInt is safe.\n */\nfunction dlsymCFConstant(handle: bigint, name: string): bigint {\n  const addr = libSystem.symbols.dlsym(handle, cstr(name));\n  if (addr === 0n) {\n    throw new KeyringError({\n      kind: 'PlatformFailure',\n      cause: new Error(`dlsym(${name}) failed`),\n    });\n  }\n  // read.ptr wants a number address — the storage address from dlsym\n  // is a real heap address (never tagged), so it fits in a number.\n  // The VALUE we read back, however, may be a tagged pointer, so we\n  // must capture it as BigInt. `read.ptr` on bun returns number;\n  // instead we use a small helper that reads 8 bytes into a BigInt.\n  return read64(Number(addr));\n}\n\n/**\n * Read a 64-bit little-endian value from a process address and\n * return it as BigInt. Used to dereference data-symbol slots (which\n * live at plain heap addresses) without precision loss on the\n * stored value.\n */","sourceCodeStart":86,"sourceCodeEnd":122,"githubUrl":"https://github.com/ComposioHQ/composio/blob/64b1b85502b1beeb2379e6c9e8bf1104504fa637/ts/packages/cli-keyring/src/stores/macos-security-ffi.ts#L86-L122","documentation":"dlsymCFConstant resolved a CoreFoundation constant symbol by name and got NULL, so the CF constant's storage address could not be obtained. KeyringError kind 'PlatformFailure'.","triggerScenarios":"Requesting a CF constant symbol that does not exist in the loaded libSystem/CoreFoundation (renamed/removed symbol, or wrong handle).","commonSituations":"macOS version differences removing/renaming private symbols; FFI symbol-table drift after OS upgrades.","solutions":["Update the keyring package to a version matching your macOS symbols","Report the failing symbol name to maintainers","Pin deployment/test environments to a supported macOS version"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"catch (e) { if (e instanceof KeyringError && e.kind === 'PlatformFailure') { /* fall back to non-FFI store */ } else throw e; }","preventionTips":["Pin supported macOS versions in CI","Update cli-keyring alongside macOS upgrades"],"tags":["keyring","macos","ffi","native","typescript"],"backgroundTag":"symbol-resolution-failed","analyzedSha":"64b1b85502b1beeb2379e6c9e8bf1104504fa637","analyzedAt":"2026-08-28T15:39:33.623Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}