Skip to content

Cannot read property 'pick' of undefined #221

Closed

Description

@kunalverma94

..installation must be made easy.+followed allsteps still getting the error
Cannot read property 'pick' of undefined
FYI i followed all you instructions

Activity

  1. Elyx0 commented on Jul 19, 2019

    @Elyx0
    Collaborator

    What version of react native & on ios or android ? Which version? Plugin version?

  2. kunalverma94 commented on Jul 20, 2019

    @kunalverma94
    Author

    "react-native-document-picker": "^3.2.2",

    react-native-cli: 2.0.1
    react-native: 0.60.3

    win 10 ..
    running app n redmi note 3

  3. kunalverma94 commented on Jul 20, 2019

    @kunalverma94
    Author

    if i follow these steps https://www.npmjs.com/package/react-native-document-picker#android get error
    --error in getPackages


    @OverRide
    protected List getPackages() {
    return Arrays.asList(
    new MainReactPackage(),
    new DocumentPickerPackage() // Add package
    );
    }
    on adding this
    android - cannot find symbol MainReactPackage
    set canOverrideExistingModule=true in React Native error with red screen

  4. Elyx0 commented on Jul 20, 2019

    @Elyx0
    Collaborator

    Does it change something if you do

    // file: MainApplication.java
    ...
    
    import com.reactnativedocumentpicker.ReactNativeDocumentPicker; // <-- this line for import package
    
    public class MainApplication extends Application implements ReactApplication {

    If it doesn't can you try this version https://github.com/Elyx0/react-native-document-picker/tree/v2 (doc changed)
    by using "react-native-document-picker": "~2.3.0" ( npm install react-native-document-picker@2.3.0 ) and see if it bugs?

  5. sentry0 commented on Jul 22, 2019

    @sentry0

    I was having the same issue after upgrading and for me it was a simple import change that did the trick...

    I went from:
    import { DocumentPicker } from 'react-native-document-picker'

    To:
    import DocumentPicker from 'react-native-document-picker'

    No more brackets :P

  6. kunalverma94 commented on Jul 22, 2019

    @kunalverma94
    Author

    thanks @Elyx0 and @sentry0

  7. MarlonX19 commented on Oct 11, 2019

    @MarlonX19

    I am having the same issue stated above. No matter what I do it keeps happening every single time I try to run the app to test:

    @OverRide
    protected List getPackages() {
    return Arrays.asList(
    new MainReactPackage(),
    new DocumentPickerPackage() // Add package
    );
    }
    on adding this
    android - cannot find symbol MainReactPackage

  8. Shahrukh0396 commented on Mar 3, 2020

    @Shahrukh0396

    i am facing the same issue on ios
    react-native: 0.61.5
    ios :9.0

  9. ghafartanveer commented on Mar 6, 2020

    @ghafartanveer

    i'm facing the same issue. Can anyone guide me how to resolve this issue?

  10. Zakyyy commented on May 30, 2020

    @Zakyyy

    @ghafartanveer make sure that after installing the package you restarted the app again and closed the initiated Metro builder

  11. kostiantyn-solianyk commented on Jul 2, 2020

    @kostiantyn-solianyk

    same here

  12. Samtapes commented on Jul 10, 2020

    @Samtapes

    same

  13. PrasadGhan commented on Jul 30, 2020

    @PrasadGhan

    I Was having same issue i just do npx react-native unlink and then re-link again after linking if package entry is not present in app/build.gradle then You need to add manually
    This working for me .

  14. Pragnesh-Dharajiya commented on Nov 4, 2020

    @Pragnesh-Dharajiya

    i'm facing the same issue on IOS. Can anyone guide me how to resolve this issue?

  15. prabhario commented on Jan 20, 2021

    @prabhario

    I'm facing this issue "TypeError: Cannot read property 'pick' of undefined" in react native windows application

    Does anyone have solution for this please ?

  16. fernandokbs commented on Jan 25, 2021

    @fernandokbs

    I had to use this version

    "react-native-document-picker": "^4.1.0",

    It solved my problem

  17. Ravi-Pal commented on Oct 5, 2021

    @Ravi-Pal

    I am facing same issue ,using "react-native-document-picker": "^6.1.1"

    Please help me
    Document Picker Error

  18. AdithyaBellamkonda commented on Dec 30, 2021

    @AdithyaBellamkonda

    @prabhario did you resolve that issue because I'm having same issue, and I'm using windows application

  19. lukabanjac commented on Mar 22, 2022

    @lukabanjac

    Run pod install and rebuild an app if you haven't already. It's in the docs and I missed it. Fixed for me after I did it.

  20. Vashu473 commented on Mar 28, 2022

    @Vashu473

    Restart your bundler it will help you.

  21. flatingofamily commented on Mar 28, 2023

    @flatingofamily

    the same problem guys :(

  22. MacKenzieHnC commented on Mar 28, 2023

    @MacKenzieHnC
    Contributor

    Anybody got a repro?

  23. ChronoByteCosmonaut commented on Mar 31, 2023

    @ChronoByteCosmonaut

    Same issue, using the expo managed workflow. "Possible Unhandled Promise Rejection : TypeError: Cannot read property 'pick' of null. And i am using pickSingle.

  24. navtesh21 commented on Aug 8, 2024

    @navtesh21

    does anyone has altenative to react native document picker because this one is getting this error TypeError: Cannot read property 'pick' of null

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