Skip to content

[v4 beta] Android link error on React Native 0.82: undefined symbol folly::detail::ScopeGuardImplBase::terminate() #931

Closed

Description

@jerryjiang97

Versions: @lodev09/react-native-true-sheet 4.0.0-beta.25 (also every beta from ~beta.15; beta.10 and earlier don't have it), React Native 0.82.1, New Architecture, AGP/Gradle 9, NDK r27.

What happens: ./gradlew :app:assembleDebug fails in :app:buildCMakeDebug[arm64-v8a] while linking libreact_codegen_TrueSheetSpec.so:

ld.lld: error: undefined symbol: folly::detail::ScopeGuardImplBase::terminate()
clang++: error: linker command failed with exit code 1

Cause: common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetContentViewShadowNode.cpp includes <folly/ScopeGuard.h> and calls folly::makeGuard(...) (around line 98). Its out-of-line terminate() is defined in folly's ScopeGuard.cpp, which RN 0.82's Android prefab doesn't export to third-party libraries. The example app is on RN 0.86, where the symbol presumably resolves, while the v4 migration guide documents RN 0.82+ as supported.

Suggested fix: replace the folly guard with a small local RAII struct, e.g.

struct RestoreMeasurement { ~RestoreMeasurement() { gIsMeasuringNaturalHeight = false; } } restoreMeasurement;

or raise the documented minimum React Native version for Android.

iOS builds fine on the same versions.

Activity

  1. github-actions commented on Oct 16, 2026

    @github-actions

    Hey @jerryjiang97! Thanks for opening the issue.

    It looks like your issue is missing a valid reproduction link.

    A minimal reproduction helps us investigate and fix the issue faster. Without one, we may not be able to help.

    Please provide one of the following:

    • A GitHub repository under your username
    • An Expo Snack

    See "How to create a Minimal, Reproducible Example" for more guidance.

    You can edit your original issue or leave a comment with the repro link. Issues without reproductions may be closed after 14 days.

  2. added a commit that references this issue on Oct 17, 2026
    9235d15
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

    needs reproNeed to replicate this issue

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions