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

RN 57 lein prod-build crashes: "goog.global is not an Object." #208

Open
CalderBot opened this issue Dec 17, 2018 · 7 comments
Open

RN 57 lein prod-build crashes: "goog.global is not an Object." #208

CalderBot opened this issue Dec 17, 2018 · 7 comments

Comments

@CalderBot
Copy link

Running xcode 10.1, re-natal 0.10.0.

Steps to reproduce:

re-natal init testapp -i reagent6
lein prod-build
re-natal xcode
  • Now in the xCode window set the required build signing and run the project.
  • The app crashes on startup with:
    Exception: goog.global is not an Object. (evaluating '"StopIteration" in goog.global')

Any ideas? This does not happen in re-natal 0.9.
Thanks!

@CalderBot CalderBot changed the title Prod iOS build Exception: goog.global is not an Object. RN 57 lein prod-build crashes: "goog.global is not an Object." Dec 22, 2018
@CalderBot
Copy link
Author

May be the same as the advanced-build issue #210

As mentioned there, the patch in #203 does not solve the problem.

@CalderBot
Copy link
Author

This is resolved by removing the ignores that were recently added to .babelrc. So the entire .babelrc should be:

{
  "presets": [
    "module:metro-react-native-babel-preset"
  ]
}

If someone wants to explain why the ignores were added (and why they cause a problem), please comment!

@ne1ro
Copy link

ne1ro commented Jan 31, 2019

This is resolved by removing the ignores that were recently added to .babelrc. So the entire .babelrc should be:

{
  "presets": [
    "module:metro-react-native-babel-preset"
  ]
}

If someone wants to explain why the ignores were added (and why they cause a problem), please comment!

It fixed goog.global is not an Object, however after removing ignores there is a new error ...

ReactNativeJS: undefined is not an object (evaluating 'this.__reactAutoBindPairs')
ReactNative: ReactInstanceManager.detachViewFromInstance()

@StankovicMarko
Copy link

@CalderBot my npm stack blows if i remove ignores for .babelrc
have you encountered that?

@CalderBot
Copy link
Author

@StankovicMarko Just retried (node v9.8.0, npm v5.6.0, xcode v10.2) and it worked fine for me. Sorry. Here were the steps:

Install:

re-natal init testapp -i reagent6
cd testapp

Fix .babelrc:

cat <<EOF > .babelrc
{
  "presets": [
    "module:metro-react-native-babel-preset"
  ]
}
EOF
lein prod-build
re-natal xcode

Then in xcode:

  1. add signing identities
  2. [OPTIONAL] product > scheme > edit scheme > Build Configuration > Run > change “Debug” to “Release”
  3. Build and Run the project (xcode play button)

@StankovicMarko
Copy link

@CalderBot i am basically doing the same but with android and this is what i get #220
i even did example app out the box with steps in 220 issue but it still persists

Do you have any advice for me how to continue?

Is it possible to get code in such state where it would compile but apk is faulty?

@kisakov
Copy link

kisakov commented Apr 17, 2019

It helps a lot! Thank you!

lucasgut added a commit to lucasgut/greenbow that referenced this issue Apr 29, 2019
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

4 participants