{"record":{"id":"72cd06ad584ac9c1","repo":"tursodatabase/turso","slug":"tursodatabase-sync-react-native-jsi-bindings-not","errorCode":null,"errorMessage":"@tursodatabase/sync-react-native: JSI bindings not found on global object. This is a bug.","messagePattern":"@tursodatabase/sync-react-native: JSI bindings not found on global object\\. This is a bug\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"bindings/react-native/src/index.ts","lineNumber":74,"sourceCode":"    `- iOS: Run 'pod install' in your ios directory\\n` +\n    `- Android: Make sure the package is properly included in your MainApplication.java`\n  );\n}\n\n// Install the JSI bindings\nconst installed = TursoNative.install();\nif (!installed) {\n  throw new Error(\n    '@tursodatabase/sync-react-native: Failed to install JSI bindings. Make sure the New Architecture is enabled.'\n  );\n}\n\n// Get the proxy that was installed on the global object\n// __TursoProxy is declared globally in types.ts\nconst TursoProxy: TursoProxyType = __TursoProxy;\n\nif (!TursoProxy) {\n  throw new Error(\n    '@tursodatabase/sync-react-native: JSI bindings not found on global object. This is a bug.'\n  );\n}\n\n/**\n * Helper function to construct a database path in a writable directory.\n *\n * @param filename - Database filename (e.g., 'mydb.db')\n * @returns Absolute path to the database file\n *\n * @example\n * ```ts\n * import { getDbPath, connect } from '@tursodatabase/sync-react-native';\n *\n * const dbPath = getDbPath('mydb.db');\n * const db = await connect({ path: dbPath });\n * ```\n */","sourceCodeStart":56,"sourceCodeEnd":92,"githubUrl":"https://github.com/tursodatabase/turso/blob/244cde92a7df7f9b8b8b7a4075c35a12977e303e/bindings/react-native/src/index.ts#L56-L92","documentation":"install() reported success, but the global __TursoProxy object it is supposed to install on the JavaScript global was not found. The code itself labels this 'This is a bug': the native module and the JSI proxy are out of sync, i.e. the native binary you are running does not match the JS package that is checking for the proxy. It is not fixable through configuration.","triggerScenarios":"Import-time check failing because a TursoNative.install() from an older native build returns true without registering __TursoProxy (or registers a differently-named global) while the freshly upgraded JS package expects the new contract - typically after bumping only package.json or only the pods/gradle dependency.","commonSituations":"Half-completed upgrade: new npm package with stale native pods or a cached APK/IPA; iOS derived-data staleness serving an old binary; downgrading the JS package below the native binary's version.","solutions":["Align versions: make package.json and the native dependency (CocoaPods / gradle) point at the same release of the SDK","Fully rebuild the native app: iOS - pod update the Turso pod, clean DerivedData, rebuild from Xcode; Android - ./gradlew clean, uninstall the old APK, reinstall","Restart Metro with --reset-cache so stale JS bundles cannot mask the fix","If matched versions still reproduce, file a bug against the SDK including both version numbers - the message explicitly marks it as one"],"exampleFix":"# before: only the JS side was upgraded\nnpm install @tursodatabase/sync-react-native@latest # app still crashes at import\n\n# after: upgrade both sides and rebuild from scratch\ncd ios && pod update Turso && rm -rf ~/Library/Developer/Xcode/DerivedData && xcodebuild\ncd android && ./gradlew clean && ./gradlew installDebug","handlingStrategy":"validation","validationCode":"// In dev, verify the proxy exists right after a dynamic import\nconst mod = await import('@tursodatabase/sync-react-native');\nif (typeof (globalThis as any).__TursoProxy === 'undefined') {\n  throw new Error('JS/native version skew: rebuild native (pod update / gradlew clean) to match the npm package');\n}","typeGuard":"function hasTursoProxy(g: typeof globalThis): boolean {\n  return typeof (g as any).__TursoProxy !== 'undefined';\n}","tryCatchPattern":"try { await import('@tursodatabase/sync-react-native'); } catch (e) { if (String(e.message).includes('JSI bindings not found')) { // native binary does not match JS - clean rebuild both, then report if it persists } throw e; }","preventionTips":["Lock package.json and the native dependency to the same SDK release","Clean DerivedData (iOS) and gradle caches (Android) when switching SDK versions","Run Metro with --reset-cache after upgrades so stale bundles cannot hide a fixed build"],"tags":["react-native","jsi","version-mismatch","native-module","import-time"],"backgroundTag":"jsi-proxy-missing","analyzedSha":"244cde92a7df7f9b8b8b7a4075c35a12977e303e","analyzedAt":"2026-08-20T07:02:18.389Z","contentChangedAt":"2026-08-20T07:02:18.389Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}