{"record":{"id":"642ae45aaf867284","repo":"router-for-me/CLIProxyAPI","slug":"dlopen-s-s","errorCode":null,"errorMessage":"dlopen %s: %s","messagePattern":"dlopen (.+?): (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/pluginhost/loader_unix.go","lineNumber":117,"sourceCode":"\ntype dynamicLibraryClient struct {\n\thandle  unsafe.Pointer\n\thostAPI *C.cliproxy_host_api\n\thostCtx unsafe.Pointer\n\tapi     C.cliproxy_plugin_api\n}\n\nfunc defaultPluginLoader() pluginLoader {\n\treturn dynamicLibraryLoader{}\n}\n\nfunc (dynamicLibraryLoader) Open(file pluginFile, host *Host) (pluginClient, error) {\n\tcPath := C.CString(file.Path)\n\tdefer C.free(unsafe.Pointer(cPath))\n\n\thandle := C.cliproxy_dlopen(cPath)\n\tif handle == nil {\n\t\treturn nil, fmt.Errorf(\"dlopen %s: %s\", file.Path, dlerrorString())\n\t}\n\n\tcSymbol := C.CString(\"cliproxy_plugin_init\")\n\tinitSymbol := C.cliproxy_dlsym(handle, cSymbol)\n\tC.free(unsafe.Pointer(cSymbol))\n\tif initSymbol == nil {\n\t\tC.cliproxy_dlclose(handle)\n\t\treturn nil, fmt.Errorf(\"missing cliproxy_plugin_init: %s\", dlerrorString())\n\t}\n\n\thostAPI := (*C.cliproxy_host_api)(C.malloc(C.size_t(unsafe.Sizeof(C.cliproxy_host_api{}))))\n\tif hostAPI == nil {\n\t\tC.cliproxy_dlclose(handle)\n\t\treturn nil, fmt.Errorf(\"allocate host api\")\n\t}\n\thostCtx := C.malloc(C.size_t(unsafe.Sizeof(C.uintptr_t(0))))\n\tif hostCtx == nil {\n\t\tC.free(unsafe.Pointer(hostAPI))","sourceCodeStart":99,"sourceCodeEnd":135,"githubUrl":"https://github.com/router-for-me/CLIProxyAPI/blob/78f0c4079e3e6273d65d03b5549cffc898703264/internal/pluginhost/loader_unix.go#L99-L135","documentation":"Error \"dlopen %s: %s\" thrown in router-for-me/CLIProxyAPI.","triggerScenarios":"Thrown at internal/pluginhost/loader_unix.go:117 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the plugin library path exists and matches the host platform/architecture.","Install the plugin's missing shared-library dependencies reported by dlopen."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"78f0c4079e3e6273d65d03b5549cffc898703264","analyzedAt":"2026-08-15T12:26:37.444Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}