Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

react-native-paper-dropdown crashes expo app on android #115

Open
nibble0101 opened this issue Sep 1, 2024 · 13 comments
Open

react-native-paper-dropdown crashes expo app on android #115

nibble0101 opened this issue Sep 1, 2024 · 13 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@nibble0101
Copy link

I started tinkering with React Native Paper recently before stumbling on this package. This package works fine in development. The android project even builds successfully using EAS. Unfortunately, clicking the dropdown crashes the app entirely both on a physical device and emulator. I'm not sure whether the problem is with expo or this project.

You can see it works fine here in development. To reproduce the problem, perhaps follow this guide to build the apk and install it on an emulator or a physical android device.

@nibble0101 nibble0101 changed the title react-native-paper-dropdown doesn't work after building the apk with expo react-native-paper-dropdown crashes expo app on android Sep 1, 2024
@fateh999
Copy link
Owner

fateh999 commented Sep 4, 2024

hi @nibble0101 can you share the react-native-paper version you are using so i can try to reproduce this.

@fateh999 fateh999 self-assigned this Sep 4, 2024
@nibble0101
Copy link
Author

hi @nibble0101 can you share the react-native-paper version you are using so i can try to reproduce this.

Sure! I'm using react-native-paper v5.12.5. Below are the other dependencies.

 "dependencies": {
    "@expo/vector-icons": "^14.0.2",
    "expo": "~51.0.31",
    "expo-checkbox": "~3.0.0",
    "expo-constants": "~16.0.2",
    "expo-status-bar": "~1.12.1",
    "react": "18.2.0",
    "react-native": "0.74.5",
    "react-native-paper": "^5.12.5",
    "react-native-paper-dropdown": "^2.3.1",
    "react-native-safe-area-context": "4.10.5",
    "expo-linking": "~6.3.1",
    "expo-dev-client": "~4.0.25"
  },

@krylov-mihail
Copy link

krylov-mihail commented Sep 8, 2024

yes, same here development local build works correctly, while
eas build generates code with not working select dropdown that crashes the application
react native paper 2.3.1

@HenrikJohnson
Copy link

I am experiencing the same issue. In LogCat I can see the following exception.

Error: Looks like you forgot to wrap your root component with `Provider` component from `react-native-paper`.

Please read our getting-started guide and make sure you've followed all the required steps.
                                                                                                
https://callstack.github.io/react-native-paper/docs/guides/getting-started


This error is located at:
    in PortalConsumer
    in Portal
    in ThemedComponent
    in Unknown
    in RCTView
    in Unknown
    in Menu
    in ThemedComponent
    in Unknown
    in Dropdown
    in RCTView
    in Unknown
    in RCTView
    in Unknown
    in ThemeProvider
...

And just to be very clear I do have a theme provider at the top of my app.

I also have the same versions as other people above in this post.

@fateh999
Copy link
Owner

fateh999 commented Sep 10, 2024

Are you guys wrapping the code with both providers?

`

  </PaperProvider>
  </ThemeProvider>

`

@HenrikJohnson @krylov-mihail @nibble0101

@nibble0101
Copy link
Author

Are you guys wrapping the code with both providers?

`

  </PaperProvider>
  </ThemeProvider>

`

@HenrikJohnson @krylov-mihail @nibble0101

I'm wrapping only in </PaperProvider.

@SteRiccio
Copy link

same problem for me too, and I'm wrapping with both PaperProvider and ThemeProvider.

@fateh999 fateh999 added the help wanted Extra attention is needed label Sep 29, 2024
@jhoffi
Copy link

jhoffi commented Sep 29, 2024

Seems like the react-native-paper/babel plugin causes this issue. Removing these lines from my babel.config.js fixed it:

env: {
  production: {
    plugins: ["react-native-paper/babel"],
  },
},

I think it's related to this issue here.

Removing these lines increases the bundle size by a lot.

@fateh999
Copy link
Owner

fateh999 commented Oct 1, 2024

@nibble0101 can you check @jhoffi comment

Seems like the react-native-paper/babel plugin causes this issue. Removing these lines from my babel.config.js fixed it:

env: {
  production: {
    plugins: ["react-native-paper/babel"],
  },
},

I think it's related to this issue here.

Removing these lines increases the bundle size by a lot.

@gabrielgouv
Copy link

Same problem here on Android, removing react-native-paper/babel works normally

@yahya-evoly
Copy link

Same problem with iOS. Removing react-native-paper/babel is not a fix I can afford as it increases the bundle size.

geekyganguly added a commit to geekyganguly/weatherly that referenced this issue Dec 23, 2024
@OneOfOne
Copy link

OneOfOne commented Jan 7, 2025

I can confirm this is still an issue, removing the babel plugin isn't really an option.

@sayufu
Copy link

sayufu commented Jan 9, 2025

Removed
env: {
production: {
plugins: ['react-native-paper/babel'],
},
},
And it worked just fine. I think this is the only solution for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

10 participants