{"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/bad083fafbefdeae9a42ec19bdaaad8918dcf411/bindings/react-native/src/index.ts#L56-L92","documentation":"After TursoNative.install() returns true, index.ts reads the global __TursoProxy that the native side should have installed. If it is missing while install() claimed success, the runtime is in an inconsistent state — the message itself says 'This is a bug'. Realistic causes are a JS runtime that is not the one where JSI globals live (remote debugging) or duplicate installs across reloads.","triggerScenarios":"Chrome remote debugging / 'Debug with Chrome' enabled: JS executes in Chrome while __TursoProxy exists only on the device's native runtime; a fast-refresh/reload race leaving the global unset; two copies of the package installed so install() ran against a different native instance.","commonSituations":"Developers debugging with Chrome DevTools instead of on-device debugging; Metro fast refresh during native module development; yarn/npm hoisting duplicates in monorepos.","solutions":["Disable remote JS debugging (use Hermes/Flipper or on-device debugging) — JSI is not available across the remote debugger bridge","Do a full reload and, if persistent, a full native rebuild","Check for duplicate installs: npm ls @tursodatabase/sync-react-native, dedupe node_modules","If it still reproduces on-device with matched versions, report it upstream with RN version and repro steps"],"exampleFix":"// before: 'Debug JS Remotely' enabled in the dev menu\n// import throws: JSI bindings not found on global object\n\n// after: open the RN dev menu and disable 'Debug with Chrome'/remote debugging,\n// then reload the app; use Flipper or console logs for debugging instead","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"let sdk: typeof import('@tursodatabase/sync-react-native');\ntry {\n  sdk = require('@tursodatabase/sync-react-native');\n} catch (e) {\n  if (String((e as Error).message).includes('JSI bindings not found')) {\n    // most often remote JS debugging is on — disable it and reload\n    throw new Error('Disable remote JS debugging (JSI needs the on-device runtime) and reload');\n  }\n  throw e;\n}","preventionTips":["Disable 'Debug JS Remotely'/Chrome debugging when using JSI-based SDKs","Deduplicate the package in monorepos (npm ls) so install() runs once","Do a full reload after native module changes instead of relying on fast refresh"],"tags":["react-native","jsi","remote-debugging","developer-tools"],"backgroundTag":"jsi-initialization-failed","analyzedSha":"bad083fafbefdeae9a42ec19bdaaad8918dcf411","analyzedAt":"2026-08-16T23:12:11.798Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}