Skip to content

Possible Unhandled Promise Rejection (id: 1): TypeError: null is not an object (evaluating 'RNDocumentPicker.pick') #251

Closed

Description

@aasalshehhi

Please help me solving this error. I have been trying for a week.

Possible Unhandled Promise Rejection (id: 1): TypeError: null is not an object (evaluating 'RNDocumentPicker.pick')

This happens in IOS simulator only

Activity

  1. Elyx0 commented on Oct 21, 2019

    @Elyx0
    Collaborator

    If that's all you have after a week I don't believe you 😁

  2. aasalshehhi commented on Oct 22, 2019

    @aasalshehhi
    Author

    Well this is what is actually happening. I even deleted my project and used the backup to install again, but still the same issue in IOS.

  3. DanielBoening commented on Oct 24, 2019

    @DanielBoening

    @aasalshehhi did you upgrade to > RN.60? The new binding system could mess with you.

  4. stefanoTron commented on Nov 5, 2019

    @stefanoTron

    @aasalshehhi
    had the same warning, forgot to run cd ios && pod install && cd ...
    Close the app and the packager and restart.

  5. themanpur commented on Nov 21, 2019

    @themanpur

    Hello ! Please help me solving this error
    [Unhandled promise rejection: TypeError: undefined is not an object (evaluating '_expoDocumentPicker.DocumentPicker.getDocumentAsync')]

  6. stefanoTron commented on Nov 21, 2019

    @stefanoTron

    @themanpur, this is not the right repo, you are using Expo's documentPicker https://docs.expo.io/versions/latest/sdk/document-picker/

    maybe you can find some help here https://github.com/expo/expo/tree/master/packages/expo-document-picker

  7. abhinavkhajuria commented on Jan 14, 2020

    @abhinavkhajuria

    Same is still happening in case of running the app in android in debugging. whereas the app in release mode is working fine.

    in "react-native-document-picker": "^3.2.4"
    "react-native": "0.61.5"

  8. Sayyamabbasi786 commented on Jul 2, 2020

    @Sayyamabbasi786

    I am facing the same issue even though it has been installed properly and I have updated podfile as well and then also did the pod install but still the same issue, anyone ???

  9. munibkhalidhere commented on Jul 4, 2020

    @munibkhalidhere

    having the same issue... anyone solved it yet?

  10. fahimk commented on Jul 27, 2020

    @fahimk

    This seems to happen only on the device emulators. When running on a real device it works fine.

  11. sindu12jun commented on Aug 28, 2020

    @sindu12jun

    This only happen in develop mode, not in production

  12. mrlego commented on Sep 6, 2020

    @mrlego

    i got the same error...i am really starting to dislike RN : (

  13. sathwik77 commented on Sep 11, 2020

    @sathwik77

    Same issue with expo v38 and package v3.5.3. Can OP reopen this issue?

  14. yamila-fraiman commented on Sep 24, 2020

    @yamila-fraiman

    Same issue using android. I'm not using expo.

  15. 6 remaining items

  16. jdempcy commented on Sep 28, 2021

    @jdempcy

    I've tried everything in this thread and the issue still occurs for me on Android. This is what I get when I try to open the file picker:
    image

  17. jdempcy commented on Sep 28, 2021

    @jdempcy

    Opening on an actual device works. Simulator always gives the above error

  18. OziTFA commented on Oct 13, 2021

    @OziTFA

    Got still same error even on simulator/real device.. TypeError: null is not an object (evaluating 'RNDocumentPicker.pick')

  19. jdempcy commented on Oct 13, 2021

    @jdempcy

    Which device are you using OziTFA? The error occurs on all emulators in my testing, but I have also tested on two devices and it does not occur on either. (A Motorola and a Huawei.)

  20. OziTFA commented on Oct 13, 2021

    @OziTFA

    Actually it is okay now. It was because of other lib conflict etc 👍🏻

  21. fribeiropaiva commented on Dec 20, 2021

    @fribeiropaiva

    Actually it is okay now. It was because of other lib conflict etc 👍🏻

    Could you tell us what you did to solve it? Having the same issue here

  22. CliffBrewerVEC commented on Feb 7, 2022

    @CliffBrewerVEC

    I know I'm late to the party, but I had the same issue and managed to fix it.
    I think the problem is you need to rebuild the java portion of the application and to achieve this I simply had to shut down my virtual device and restarted it with npx react-native run-android from the project folder.

  23. ZainHasan97-Razi commented on Feb 20, 2022

    @ZainHasan97-Razi

    cd android && ./gradlew clean will help.

  24. arunachalam-b-g commented on Jul 16, 2022

    @arunachalam-b-g

    Running react-native link react-native-document-picker fixed this issue for me

  25. Nima-net commented on Jul 29, 2022

    @Nima-net

    i was having the same issue on android device and i resolved it by running cd android && ./gradlew clean

    worked for me too thanks

  26. winrid commented on Aug 25, 2022

    @winrid

    i was having the same issue on android device and i resolved it by running cd android && ./gradlew clean

    worked for me. thanks.

    Does not work with Pixel 2 emulator, including resetting Metro's cache.

  27. remi-p-opka commented on Oct 18, 2022

    @remi-p-opka

    Works on emulator (android) but not on real device (ios).

  28. hsnMoghadasi commented on Jan 8, 2023

    @hsnMoghadasi

    some time it works Properly. some time not.
    what could i do?

  29. hsnMoghadasi commented on Jan 8, 2023

    @hsnMoghadasi

    i comment type option and its work well :/
    what could i do?

    import DocumentPicker, {DocumentPickerOptions, DocumentPickerResponse, types} from 'react-native-document-picker';
    
    const option: DocumentPickerOptions<'android'> = {
      // type: [types.pdf, types.doc, types.docx, types.zip, types.images],
      allowMultiSelection: true,
      presentationStyle: 'fullScreen',
    };
    const response: DocumentPickerResponse[] = await DocumentPicker.pickMultiple(option);
    
    
    
  30. olawalejuwonm commented on Feb 21, 2023

    @olawalejuwonm

    I'm also having the same issue. Any solution?

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions