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

Inconsistent Release Mode Behavior in External Module (native-base) #277

Closed
ajmath opened this issue Oct 2, 2018 · 4 comments
Closed

Inconsistent Release Mode Behavior in External Module (native-base) #277

ajmath opened this issue Oct 2, 2018 · 4 comments

Comments

@ajmath
Copy link

ajmath commented Oct 2, 2018

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
Release builds are exhibiting various feature breaking issues that aren't present in debug builds. The following errors have been observed and reproduced when using native-base components.

  • The <Input/> element does not honor secureTextEntry or onChangeText props
  • The <Item/> element does not honor the floatingLabel prop

If the current behavior is a bug, please provide the steps to reproduce and a minimal repository on GitHub that we can yarn install and yarn test.

The issue is also present in iOS builds but the android builds are easier to test in release mode.

What is the expected behavior?
Components have the same behavior in dev and release builds

Please provide your exact Metro configuration and mention your Metro, node, yarn/npm version and operating system.

  React Native Environment Info:
    System:
      OS: macOS High Sierra 10.13.6
      CPU: x64 Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz
      Memory: 1.65 GB / 16.00 GB
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 8.10.0 - ~/.nvm/versions/node/v8.10.0/bin/node
      Yarn: 1.7.0 - /usr/local/bin/yarn
      npm: 6.4.1 - ~/.nvm/versions/node/v8.10.0/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.0, macOS 10.14, tvOS 12.0, watchOS 5.0
      Android SDK:
        Build Tools: 23.0.1, 25.0.2, 25.0.3, 26.0.3, 27.0.3, 28.0.0, 28.0.0, 28.0.1
        API Levels: 23, 25, 26, 27, 28
    IDEs:
      Android Studio: 3.1 AI-173.4819257
      Xcode: 10.0/10A255 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.5.0 => 16.5.0
      react-native: 0.57.1 => 0.57.1
    npmGlobalPackages:
      create-react-native-app: 2.0.2
      react-native-cli: 2.0.1

See more details in the package.json of the bug reproduction repository https://github.com/ajmath/ReleaseRenderIssue/blob/master/package.json#L9

@SCasarotto
Copy link

I am also experiencing this issue.

@rafeca
Copy link
Contributor

rafeca commented Oct 5, 2018

@mjesun this looks like another Babel issue...

@ajmath: for release builds we started to use extensively Babel to perform dead code elimination. It seems that in some situations Babel does not track some scope changes correctly and this leads to issues like this one. It would be cool if you could find some minimal code that causes wrong logic during release so we can report it to Babel

@ajmath
Copy link
Author

ajmath commented Oct 9, 2018

The two places we were seeing issues was with native-base and the aws-sdk and both have been addressed with fixes in those libraries:

https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md#22861
GeekyAnts/NativeBase#2264 (comment)

I haven't seen any other issues yet so I'm happy to close this, but I'm a bit concerned about it popping up again in the future.

@rafeca
Copy link
Contributor

rafeca commented Oct 9, 2018

Thanks for the update @ajmath ! We're tracking the Babel issues already (e.g in #208), so it's safe to close this issue

@rafeca rafeca closed this as completed Oct 9, 2018
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