-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
[Crash] Can't start my app after upgrading to v0.6.0-rc #1606
Comments
I'm getting the exact same error after update. @brentvatne: seems to be related to #1578 |
FYI: It's helpful if you include the stack trace with sourcemaps (a screenshot of the redbox should be sufficient). But I think this is just from a breaking API change - replace usage of |
please re-open if there is something else going on. |
@sahrens I'm not using keyboardDismissMode in my app at all. I'm using using After some debugging, this error seems to be coming from react-native code itself. Here: It expects re-open ? |
That code is only in the "if (Platform.OS === 'android')" branch which
|
Hmm, do the source maps ever work for you? Looks like they didn't load I'll dig into the actual failure...not sure how it could be so broken...
|
As a matter of fact, the project was generated before react-native 0.4 i guess. Not sure if that has got anything to do here. |
Do you have sourcemaps turned off in chrome? |
yes. I have it turned off in chrome. |
I just tried react-native init, then upgraded to 0.6.0-rc and npm installed again, recompiled, and everything still works with scrollview and I don't see any references to You should turn them back on in chrome so we can see what your stack trace is. Also, not sure why they aren't working in the RedBox - separate issue, but your setup definitely has some breakage. Did you make sure to do a clean and recompile in Xcode (cmd+shift+K, cmd+R) after upgrading? Also maybe try restarting the packager server with --reset-cache? |
Here are some observations:
Clues:
|
I think --reset-cache did it. |
@amasad: Sounds like we're not properly clearing cache/restarting the server on upgrade - something you can fix? |
Is the With
With source map enabled on chrome debugger - exception was first caught here: zooming to stack trace: Then later leading to the 'red box exception: Please lmk if a gzipped index.ios.bundle + index.ios.map may be helpful. |
In my case this issue was caused by the |
@grin THANKS!! That's the vital clue. Issue isolated! The packager seems to just recursively spider from the root git-cloned So if you go to your root git-cloned
... you will see any old react-native npm-installs lying around that the packager might decide to load, and cause the problem. From my previous post on the 'observations' , you will see a mix of:
The problem is that for post-'0.4.x' generated projects, UNDER THE react-native/Examples directory (which the Facebook testers will almost never have with fresh git-clones, but most devs tinkering with react-native are likely to hastily create), there might be node-modules/react-native lying around that are not 0.6.0-rc! The packager gladly load it into the ios.js.bundle - causing the problem. I suppose other than the Examples directory, one can also have copies of stale node-modules/react-native from anything that one did I suppose it can also cause #1646 , and #1578 . For my case, the bypass for now is to search-and-destroy any old node-modules/react-native lying around manually. Or blacklist the Examples directory. |
after successfully updating my packages, i was able to start the app... but I get this warning in
On trying to validate the app ... |
@jawadrehman - that shouldn't cause any problems, related to #1562 - PR welcome 😄 |
@brentvatne even the first message on xCode isn't going to cause problems ? |
@jawadrehman - actually I'm not familiar with the first one cc @tadeuzagallo |
The warning is safe, but it has already been fixed. |
If one of your dependencies specifies |
@owais I figured that out as well just now. Worked great. Here is what I did (same thing as @owais just in different words incase someone is confused.): It had to do with a component I was using, in my case I also updated the dependencies in the
Why do components need to specify react native as dependency. Seems like it's implied, right? Can I just remove the dependency? |
Yes, components should not specify react-native as a dependency. It causes many problems. Not to mention that it significantly increases installation time and each module that does this ends up imprting its own version of react-native instead of the one the developer is working on. |
I've just ran into the same problem upgrading from 0.5 to 0.6.
Third-party components in use:
|
Changing the dependencies to peerDependencies and give it a range to fix this bug: facebook/react-native#1606
+1 I ran into this issue after having creating a new project with
|
It sounds like the packager should fail loudly when it sees multiple versions of react-native installed. And we should establish a community standard around only using |
@amasad I think a short guide how to write 3rd party components would be nice. Included should be a guideline how to setup a node project etc... |
@amasad +1 |
@chauthai I agree this would be nice |
a) packager loudly fails (but please do not exit console) 👍 because it will stop devs from looking everywhere else for the cause of this red screen of death b) |
Having react-native as a dependency breaks things: facebook/react-native#1606
Hi there! This issue is being closed because it has been inactive for a while. But don't worry, it will live on with ProductPains! Check out it's new home: https://productpains.com/post/react-native/crash-cant-start-my-app-after-upgrading-to-v060-rc |
Tested in iOS simulator, here is the console output:
The text was updated successfully, but these errors were encountered: