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

Strict mode issue on Android #11

Open
vbence86 opened this issue Apr 4, 2019 · 2 comments
Open

Strict mode issue on Android #11

vbence86 opened this issue Apr 4, 2019 · 2 comments

Comments

@vbence86
Copy link

vbence86 commented Apr 4, 2019

Environment details

React Native Environment Info:
    System:
      OS: macOS 10.14
      CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
      Memory: 46.32 MB / 8.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 11.9.0 - ~/.nvm/versions/node/v11.9.0/bin/node
      Yarn: 1.13.0 - /usr/local/bin/yarn
      npm: 6.5.0 - ~/.nvm/versions/node/v11.9.0/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
      Android SDK:
        API Levels: 26, 27, 28
        Build Tools: 26.0.1, 26.0.2, 26.0.3, 27.0.3, 28.0.1
        System Images: android-28 | Intel x86 Atom_64, android-28 | Google APIs Intel x86 Atom
    IDEs:
      Android Studio: 3.3 AI-182.5107.16.33.5314842
      Xcode: 10.1/10B61 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.5.0 => 16.5.0 
      react-native: 0.57.2 => 0.57.2 
    npmGlobalPackages:
      react-native-cli: 2.0.1
      react-native-svg: 9.3.7

Error

Expected

Application loads with no issue.

Actual

When executing the application on Android API 28 it throws an error: Strict mode does not allow function declaration in a lexically nested statement.... If any reference to react-native-rss-parser is removed from the application, it runs flawlessly.

Screenshot

Screenshot 2019-04-04 at 20 02 27

@jameslawler
Copy link
Owner

Thanks for the detailed bug report (and sorry for the delay). I will need to try and reproduce this bug and then i can see if i can come up with a solution by fixing my function declarations. It seems like changes were done to babel to force this strict mode.

https://stackoverflow.com/questions/41058495/syntaxerror-strict-mode-does-not-allow-function-declarations-in-a-lexically-nes

I will post here once i find a solution

@jameslawler
Copy link
Owner

I am not able to reproduce this bug. If you are still using react-native-rss-parser can you try upgrading to the newest version (v1.4.0) and see if it still has the problem. I did some code cleanup in this release.

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

2 participants