-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Freeze & Crash when remote debug enabled [email protected] #12223
Comments
I just started a small Application to learn some React Native / Redux / React Navigator and noticed that if I kill my application on device and then try to open it again, it'll crash after a long timeout. I have a project here with similar errors after installing it on device, works fine in simulator. |
I think this issue is also related to #12368 and appears when using Modal on IOS, in a specific context, in debug mode. I do not use redux, my app actually uses NavigationExperimental (the root component of the display is a NavigationCardStack) and when I display a Modal on IOS in Debug Mode, the render() function freezes and the modal is never displayed. On Android, the very same code works fine in both Normal and Debug Mode. This freeze happens in 0.42.0-rc3, but NOT in 0.41.2. I couldn't create a minimal app that reproduces the bug, as just adding a modal to the default app created after an init' does not trigger the issue. There is something more, but not sure what makes the issue appear. |
For me it's triggered if i'm transitioning towards a scene that contains an visible modal which is shown on render. |
@shergin Sorry for the wrong ping! You're absolutely right. i did a git bisect of the whole release and the offending commit is 407973a Funny thing is I noticed a similar bad behavior on android - i'm still looking into it where it could come from. It's not related to a modal but seems to be related to touchables on top of a native view - but it also only happens while debugging. |
Hey guys, I'll take a look at this early this week. Weird that it would be my commit causing an issue on iOS though since the only edit was to the YellowBox's "elevation" style property, which is an android-only property. |
I found that it was a packaging thing, but it just doesn't give a helpful
error when it crashes - it just hangs until it crashes.
I believe when doing a debug app, if you get off wifi, the JS assets aren't
available for your app so it just crashes on the splash screen.
I packaged as a non-debug app and it pushed all the code contents to my
phone and worked fine when I was off wifi - I believe this may be by
design. The debug version could just warn you as a "new dev" that you need
to be connected to wifi for Debug to work (if that's the case). I was just
clueless as to what was going on or where to look. Wasted an embarrassing
amount of time trying to figure it out.
…On Mon, Feb 27, 2017 at 10:33 AM, cailenmusselman ***@***.***> wrote:
Hey guys, I'll take a look at this early this week.
Weird that it would be my commit causing an issue on iOS though since the
only edit was to the YellowBox's "elevation" style property, which is an
android-only property.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#12223 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAJhxQVgOoNOZp9mSwzisMd-jzkvrd7Lks5rguzIgaJpZM4L3tpC>
.
--
Adam Parrish | 349 5th Avenue, Suite 412 | New York, NY, 10016 |
919.741.9597
|
@neosavvy > The Elevation thing seems to be incompatible with chrome js engine or triggers there some bug. |
Okay @K-Leon I'll still take a look early this week. Are your steps to reproduce different from the original (patrikholcak/react-native-remote-bug)? |
Wow @leon - my bad just must have misread something. (!)
…On Mon, Feb 27, 2017 at 12:13 PM, cailenmusselman ***@***.***> wrote:
Okay @K-Leon <https://github.com/K-Leon> I'll still take a look early
this week. Are your steps to reproduce different from the original
(patrikholcak/react-native-remote-bug)?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#12223 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAJhxXBz14FkCCb4EDk2RVX-twvQerhuks5rgwRAgaJpZM4L3tpC>
.
--
Adam Parrish | 349 5th Avenue, Suite 412 | New York, NY, 10016 |
919.741.9597
|
No - not really. Happens all the time for me. Just take simulator, iOS and a medium sized app. Pushing a button that leads to a scene with a modal triggers it for me. |
I am having similar issue when running on ios with version 0.43.0-rc.0 with remote debug enabled.
|
Will try and find the time to investigate today |
I'm also having the same problem on version 0.42. When I try to open a modal, the app freezes and after trying to interact with it, it crashes. Also the remote debugger is showing this warning: "Calling of |
Oooookay guys, so I have it figured out... sort of. The elevation changes I introduced to So my changes do not effect the So the actual bug we're observing is what @alphasp posted. In summary: Interestingly, if I change I don't really have the time to get to the actual root of the issue, so I just propose any of these changes:
or 2)
or 3)
Preferences? Or does someone want to get to the ACTUAL root of the issue? |
Thansk for digging into the issue @cailenmusselman ! I think your first choice (1) is pretty good, as long as elevation is not supported on IOS, keeping it undefined seems the better choice (ie, with the minimal possible side-effects) |
@cailenmusselman EXCELLENT work! I would also go with option (1). Perhaps very obvious, but probably a good idea to comment a little extra in the code to provide context on why this change was done. |
For unknown reasons, setting elevation: Number.MAX_VALUE causes remote debugging to hang on iOS (some sort of overflow maybe). Setting it to Number.MAX_SAFE_INTEGER fixes the iOS issue, but since elevation is an android-only style property we might as well remove it altogether for iOS. See: facebook#12223
Thanks for the fix @cailenmusselman! #12744 Once it lands in master I'll cherry-pick it to 0.42 and 0.43. |
Summary: For unknown reasons, setting elevation: Number.MAX_VALUE causes remote debugging to hang on iOS (some sort of overflow maybe). Setting it to Number.MAX_SAFE_INTEGER fixes the iOS issue, but since elevation is an android-only style property we might as well remove it altogether for iOS. See: #12223 Closes #12744 Differential Revision: D4684524 Pulled By: mkonicek fbshipit-source-id: 7fb4f6da1c5c0cb437beff0e75122523e7233b72
Summary: For unknown reasons, setting elevation: Number.MAX_VALUE causes remote debugging to hang on iOS (some sort of overflow maybe). Setting it to Number.MAX_SAFE_INTEGER fixes the iOS issue, but since elevation is an android-only style property we might as well remove it altogether for iOS. See: #12223 Closes #12744 Differential Revision: D4684524 Pulled By: mkonicek fbshipit-source-id: 7fb4f6da1c5c0cb437beff0e75122523e7233b72
Summary: For unknown reasons, setting elevation: Number.MAX_VALUE causes remote debugging to hang on iOS (some sort of overflow maybe). Setting it to Number.MAX_SAFE_INTEGER fixes the iOS issue, but since elevation is an android-only style property we might as well remove it altogether for iOS. See: #12223 Closes #12744 Differential Revision: D4684524 Pulled By: mkonicek fbshipit-source-id: 7fb4f6da1c5c0cb437beff0e75122523e7233b72
Is there a work around for this yet? |
@robcalcroft the way I solved it was to locally edit the YellowBox.js file (inside Since this is only breaking development, it has no side-effects for production. It's an interim solution until a new react-native release is baked |
@robcalcroft the fix is already available in v0.42.1 and v0.43.0-rc.2 |
v0.42.1 seems not to be published right now, but you can test it by putting this instead of v0.42.1 in the package.json: facebook/react-native#v0.42.1 |
PS: When will the v.42.1 be released? |
@alphasp ok thanks |
I've tested with facebook/react-native#v0.42.1 in the package.json... for ios everything fine (just a new warning) but for android the build fails with something like:
:-( |
But seems to work better with: v0.43.0-rc.2 and new react v16.0.0-alpha.3 (on ios and android) |
I upgraded to v0.42.2 and it works. |
I set console.disableYellowBox = true; |
Hi, |
My app is also crashing when Remote Debugging is enabled, using 0.44.2. (It happens randomly so hard to track down, like every 1-5 mins). And with this issue happening at each launch it makes RN development a nightmare for me. |
I am having this issue on RN 0.45. Will upgrading to RN 0.46 or 0.47 solve this issue? |
Nope, fresh install RN 0.47.2 still has the problem. I tested only on Android. editI has testing on AVD with API 23, with Remote JS Debugging enabled app crash when reload is called. In logcat
On AVD with API 26, works nicely 😄 |
I had this issue today, tried all solutions but nothing worked. In the end i just |
@sundou workaround worked for me Place this at your app's entry point
Tho... Well, this should be fixed 😞 |
YellowBox didn't did the trick here but switching to API 26 works ! Thanks @rod-stuchi |
Switching to 26 worked for me too, thanks a lot. But it shouldn't be right ? |
Running the project from XCode, rather than |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. If you think this issue should definitely remain open, please let us know why. Thank you for your contributions. |
Description
I tried to update an existing project to [email protected] and noticed that the app freezes and crashes when I try to
dispatch a redux actionopen a modal. I then went and tried to isolate the issue and found out it crashes only when remote debug is enabled,which makes me think it might not be related to redux. This is the last error in console:Reproduction
Toggle modal
— first click will freeze the app and the second one will crash itSolution
No idea.
Additional Information
The text was updated successfully, but these errors were encountered: