Skip to content

Cannot read property 'NativeDocumentPicker' of undefined #831

Closed as not planned
@BenjaLepe

Description

@BenjaLepe

I have searched open and closed issues for this issue.

  • I have searched open and closed issues.

I have read and understood the license (link below).

  • I have read and understood the license.

Minimal reproducible example

null

What platform(s) does this occur on?

Android

Did you reproduce on a real device or emulator / simulator?

emulator / simulator

Steps to reproduce

Using React Native 0.78.2 and "@react-native-documents/picker": "^10.1.3", when i try to use the pick function like this const [result] = await pick(options) it throws the following error:

Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'RNDocumentPicker' could not be found. Verify that a module by this name is registered in the native binary., js engine: hermes

If the issue is related to specific file(s), I have linked the files so that others can reproduce exactly what I see.

  • I have attached files necessary to reproduce the problem (if applicable).

Stacktrace of the crash (if applicable)

Error(useAttachment): unexpected error TypeError: Cannot read property 'NativeDocumentPicker' of undefined
    at ?anon_0_ (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.datascope&modulesOnly=false&runModule=true&excludeSource=true&sourcePaths=url-server:485484:83)
    at next (native)
    at asyncGeneratorStep (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.datascope&modulesOnly=false&runModule=true&excludeSource=true&sourcePaths=url-server:1314:19)
    at _next (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.datascope&modulesOnly=false&runModule=true&excludeSource=true&sourcePaths=url-server:1328:29)
    at anonymous (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.datascope&modulesOnly=false&runModule=true&excludeSource=true&sourcePaths=url-server:1333:14)
    at tryCallTwo (address at InternalBytecode.js:1:1222)
    at doResolve (address at InternalBytecode.js:1:2541)
    at Promise (address at InternalBytecode.js:1:1318)
    at anonymous (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.datascope&modulesOnly=false&runModule=true&excludeSource=true&sourcePaths=url-server:1325:25)
    at apply (native)
    at _pick (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.datascope&modulesOnly=false&runModule=true&excludeSource=true&sourcePaths=url-server:485495:23)
    at apply (native)
    at pick (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.datascope&modulesOnly=false&runModule=true&excludeSource=true&sourcePaths=url-server:485455:23)
    at ?anon_0_ (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.datascope&modulesOnly=false&runModule=true&excludeSource=true&sourcePaths=url-server:467304:104)
    at next (native)
    at asyncGeneratorStep (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.datascope&modulesOnly=false&runModule=true&excludeSource=true&sourcePaths=url-server:1314:19)
    at _next (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.datascope&modulesOnly=false&runModule=true&excludeSource=true&sourcePaths=url-server:1328:29)
    at anonymous (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.datascope&modulesOnly=false&runModule=true&excludeSource=true&sourcePaths=url-server:1333:14)
    at tryCallTwo (address at InternalBytecode.js:1:1222)
    at doResolve (address at InternalBytecode.js:1:2541)
    at Promise (address at InternalBytecode.js:1:1318)
    at anonymous (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.datascope&modulesOnly=false&runModule=true&excludeSource=true&sourcePaths=url-server:1325:25)
    at apply (native)
    at showPicker (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.datascope&modulesOnly=false&runModule=true&excludeSource=true&sourcePaths=url-server:467367:26)
    at ?anon_0_ (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.datascope&modulesOnly=false&runModule=true&excludeSource=true&sourcePaths=url-server:505514:34)
    at next (native)
    at asyncGeneratorStep (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.datascope&modulesOnly=false&runModule=true&excludeSource=true&sourcePaths=url-server:1314:19)
    at _next (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.datascope&modulesOnly=false&runModule=true&excludeSource=true&sourcePaths=url-server:1328:29)
    at tryCallOne (address at InternalBytecode.js:1:1180)
    at anonymous (address at InternalBytecode.js:1:1874)

Your computer environment

System:
  OS: macOS 15.4.1
  CPU: (10) arm64 Apple M1 Pro
  Memory: 102.30 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.11.0
    path: ~/.nvm/versions/node/v20.11.0/bin/node
  Yarn:
    version: 3.6.4
    path: ~/.nvm/versions/node/v20.11.0/bin/yarn
  npm:
    version: 10.2.4
    path: ~/.nvm/versions/node/v20.11.0/bin/npm
  Watchman:
    version: 2025.02.10.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods: Not Found
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.2
      - iOS 18.2
      - macOS 15.2
      - tvOS 18.2
      - visionOS 2.2
      - watchOS 11.2
  Android SDK: Not Found
IDEs:
  Android Studio: 2023.2 AI-232.10227.8.2321.11479570
  Xcode:
    version: 16.2/16C5032a
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.14
    path: /usr/bin/javac
  Ruby:
    version: 3.2.5
    path: /Users/benjalepe/.rvm/rubies/ruby-3.2.5/bin/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 15.0.1
    wanted: 15.0.1
  react:
    installed: 19.0.0
    wanted: 19.0.0
  react-native:
    installed: 0.78.2
    wanted: 0.78.2
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions