Skip to content

Autolinking not working on v3 #56

Closed

Description

@gmanolek2

Before submitting a new issue

  • I tested using the latest version of the library, as the bug might be already fixed.
  • I tested using a supported version of react native.
  • I checked for possible duplicate issues, with possible answers.

Bug summary

The autolinking on Android is not working. Just installing the library and running the app will give the error:

TurboModuleRegistry.getEnforcing(...): 'QuickBase64' could not be found

I think this is because the android directory in this library does not have the build.gradle file, and that's why autolinking is not picking up the library.

Can you please check?
Thank you!

Library version

3.0.2

Environment info

System:
  OS: macOS 26.6.2
  CPU: (14) arm64 Apple M3 Max
  Memory: 2.13 GB / 36.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 22.22.2
    path: /Users/george/.nvm/versions/node/v22.22.2/bin/node
  Yarn:
    version: 4.13.0
    path: /Users/george/.nvm/versions/node/v22.22.2/bin/yarn
  npm:
    version: 10.9.7
    path: /Users/george/.nvm/versions/node/v22.22.2/bin/npm
  Watchman:
    version: 2026.05.18.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.15.2
    path: /Users/george/.local/share/mise/installs/ruby/3.3.11/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 25.5
      - iOS 26.5
      - macOS 26.5
      - tvOS 26.5
      - visionOS 26.5
      - watchOS 26.5
  Android SDK: Not Found
IDEs:
  Android Studio: 2026.1 AI-261.26222.65.2613.16025427
  Xcode:
    version: 26.6/17F113
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.13
    path: /Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home/bin/javac
  Ruby:
    version: 3.3.11
    path: /Users/george/.local/share/mise/installs/ruby/3.3.11/bin/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 20.1.0
    wanted: 20.1.0
  react:
    installed: 19.2.3
    wanted: 19.2.3
  react-native:
    installed: 0.86.3
    wanted: 0.86.3
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true

Steps to reproduce

  1. Set up a new bare react native project
  2. Install this library
  3. Run the app

Reproducible example repository

no need for one

Activity

  1. huytdps13400 commented on Aug 26, 2026

    @huytdps13400

    I tested this against a clean React Native 0.86.3 app using @react-native-community/cli@20.1.0 and the currently published react-native-quick-base64@3.0.1. I could not reproduce the autolinking failure:

    • react-native config reports the package as isPureCxxDependency: true with both CMake paths and QuickBase64Impl
    • Gradle generates both add_subdirectory(...) entries and an autolinking_cxxModuleProvider branch for QuickBase64Impl::kModuleName
    • app:assembleDebug succeeds for arm64-v8a, armeabi-v7a, x86, and x86_64, with libappmodules.so packaged for each ABI

    The missing android/build.gradle is intentional for a pure-C++ dependency. CLI 20.1 classifies a dependency as pure C++ only when the three cxxModule* fields are present and there is no manifest/build.gradle; adding one without a Java package would make dependency discovery return null.

    Also, npm currently has no 3.0.2; the latest published version is 3.0.1. Could you share the output of:

    npm ls react-native-quick-base64
    npx react-native config | jq '.dependencies["react-native-quick-base64"]'

    and the QuickBase64 lines from android/app/build/generated/autolinking/src/main/jni/{Android-autolinking.cmake,autolinking.cpp} after a clean build? That should show whether this is a different artifact, stale autolinking output, or another project-level configuration issue.

  2. gmanolek2 commented on Aug 27, 2026

    @gmanolek2
    Author

    Hi @huytdps13400
    Thank you for your quick response! I found the issue, I didn't have react-native-quick-base64 listed in dependencies in package.json. I think that's why it was not picked up by autolinking. I am using the library @craftzdog/react-native-buffer which has a dependency on this library, and it got installed because i could see it in node_modules dir, and I didn't know why it was not autolinked. I took a look again at the README of @craftzdog/react-native-buffer and it says to also install this library as a dependency, I think I missed that.
    After adding the dependency explicitly in package.json, the issue was fixed.

    Thank you again, and sorry for the hassle!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions