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

New v1.5 has issues with CodePush #731

Open
mi5ha opened this issue Feb 8, 2023 · 3 comments
Open

New v1.5 has issues with CodePush #731

mi5ha opened this issue Feb 8, 2023 · 3 comments

Comments

@mi5ha
Copy link

mi5ha commented Feb 8, 2023

If binary to which CodePush is done contains v1.4 of react-native-config, and current code is updated to react-native-config v1.5, ENV variables are not set, they are undefined. If binary to which CodePush is done contains v1.5, everything works.

This is a serious issue if you need to CodePush to older binaries, as you usually do, or to several different binaries with different versions of react-native-config in them.

For now we have downgraded react-native-config to v1.4

Does anybody has an idea why this happens? Thank you

@filipef101
Copy link

RN config changed the api in 1.5 I think. Your case is something not meant to be supported with codepush. Don't expect to push updated JS code to a previous/diffrent build that has different native code. If you want something similar you could use a metro based config loading that is not a native module

@mi5ha
Copy link
Author

mi5ha commented Feb 15, 2023

@filipef101 Got it, thank you for suggesting metro based config loading!

@arthurgeron-work
Copy link

Upgrading any library via codePush is generally not a good idea, specially because values of .env files are evaluated at build time and not runtime

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants