{"record":{"id":"109c66bfda5d4d7a","repo":"router-for-me/CLIProxyAPI","slug":"cliproxy-plugin-init-returned-d","errorCode":null,"errorMessage":"cliproxy_plugin_init returned %d","messagePattern":"cliproxy_plugin_init returned (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/pluginhost/loader_unix.go","lineNumber":152,"sourceCode":"\tif hostCtx == nil {\n\t\tC.free(unsafe.Pointer(hostAPI))\n\t\tC.cliproxy_dlclose(handle)\n\t\treturn nil, fmt.Errorf(\"allocate host context\")\n\t}\n\tid := hostCallbackID.Add(1)\n\t*(*C.uintptr_t)(hostCtx) = C.uintptr_t(id)\n\thostCallbackEntries.Store(id, dynamicHostCallbackEntry{host: host, pluginID: file.ID})\n\tC.cliproxy_set_host_api(hostAPI, C.uint32_t(pluginHostABIVersion), hostCtx)\n\n\tclient := &dynamicLibraryClient{\n\t\thandle:  handle,\n\t\thostAPI: hostAPI,\n\t\thostCtx: hostCtx,\n\t}\n\trc := C.cliproxy_call_init(initSymbol, hostAPI, &client.api)\n\tif rc != 0 {\n\t\tclient.Shutdown()\n\t\treturn nil, fmt.Errorf(\"cliproxy_plugin_init returned %d\", int(rc))\n\t}\n\tif uint32(client.api.abi_version) != pluginHostABIVersion {\n\t\tclient.Shutdown()\n\t\treturn nil, fmt.Errorf(\"plugin ABI version %d is not supported\", uint32(client.api.abi_version))\n\t}\n\tif client.api.call == nil || client.api.free_buffer == nil {\n\t\tclient.Shutdown()\n\t\treturn nil, fmt.Errorf(\"plugin function table is incomplete\")\n\t}\n\treturn client, nil\n}\n\nfunc (c *dynamicLibraryClient) Call(ctx context.Context, method string, request []byte) ([]byte, error) {\n\tif c == nil || c.api.call == nil {\n\t\treturn nil, fmt.Errorf(\"plugin client is closed\")\n\t}\n\tif ctx != nil {\n\t\tselect {","sourceCodeStart":134,"sourceCodeEnd":170,"githubUrl":"https://github.com/router-for-me/CLIProxyAPI/blob/78f0c4079e3e6273d65d03b5549cffc898703264/internal/pluginhost/loader_unix.go#L134-L170","documentation":"Error \"cliproxy_plugin_init returned %d\" thrown in router-for-me/CLIProxyAPI.","triggerScenarios":"Thrown at internal/pluginhost/loader_unix.go:152 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the plugin's init return code meaning in its documentation.","Update the plugin so cliproxy_plugin_init succeeds with this host version."],"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"}