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

JavascriptException: Maximum call stack size exceeded when running apk file #19238

Closed
3 tasks done
radi-cho opened this issue May 12, 2018 · 13 comments
Closed
3 tasks done
Labels
Platform: Android Android applications. Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@radi-cho
Copy link

radi-cho commented May 12, 2018

Environment

OS: Windows 10
  Node: 8.4.0
  Yarn: 1.3.2
  npm: 5.5.1

Packages: (wanted => installed)
  react: 16.3.1 => 16.3.1
  react-native: 0.55.3 => 0.55.3

Steps to Reproduce

  • Create blank project using react-native init MyApp
  • Add babel-plugin-transform-class-properties (^6.24.1) and stage-0
    Note that it works with the react-native and the es2015 presets
// babelrc
{
  "presets": ["stage-0", "react-native", "es2015"],
  "plugins": ["transform-class-properties"]
}
  • Build the app using gradlew assembleRelease

Do not cahnge any code, just build after adding the listed presets and plugins to the .babelrc and installing them via npm

Note that: Everything is working while debugging

When run:

Expected Behavior

I expect everything just to work!

Actual Behavior

The app is built successfully but when we install the app on whatever device we get The app stopped working. error. I researched it a bit and found this log in the logcat:

FATAL EXCEPTION: mqt_native_modules
   Process: com.PACKAGE, PID: 13125
   com.facebook.react.common.JavascriptException: Maximum call stack size exceeded., stack:
   <unknown>@11:410
   <unknown>@11:410

I searched a bit and find out these things (which may be helpful while resolving the issue):

Hopefully all listed information will be helpful.

@react-native-bot react-native-bot added the Platform: Android Android applications. label May 14, 2018
@alvelig
Copy link

alvelig commented May 16, 2018

react-native-git-upgrade 0.49.5

@radi-cho
Copy link
Author

Hi, @alvelig! Can you please explain why react-native-git-upgrade to 0.49.5 can help?

@alvelig
Copy link

alvelig commented May 16, 2018

It helped in my case. According to #16689 this doesn't happen in 0.49.5, so just downgrading helped in my case

@radi-cho
Copy link
Author

radi-cho commented May 16, 2018

@alvelig thanks. I'm not able to test it at the moment, but I'm gonna share if succeed with 0.49.5.
Also question to the "react native team": if this works with 0.49.5 what's the problem in the next versions?
@TheSavior, @shergin, @brentvatne Can someone share any opinion, please?

@alvelig
Copy link

alvelig commented May 16, 2018

https://github.com/facebook/react-native/releases/tag/v0.50.0 Then it should be there. Also try if it works in 0.50 just to confirm, then some of the breaking changes should be causing this.

@Vahanerevan
Copy link

Removing presets worked for me . I was using "@connect" decorator after removing presets and leaving only "react-native" all works just fine.

@radi-cho
Copy link
Author

Yeah, that's the case, @Vahanerevan but I needed it with presets working.... 😞

@vidit-bhatia
Copy link

this is not possible to solve in the described way I removed all the @connect decorators still I am getting erros and I can not remove stage0 presets because react-navigation starts giving errors. So this is catch 22. Can someone please look into this problem.

@vidit-bhatia
Copy link

Also I tried changing my version to 49.5 I am getting exactly same error I can test my app but not release it .

@sebirdman
Copy link
Contributor

sebirdman commented Jul 4, 2018

I'm now seeing this issue in 0.56.0. I do have a lot of resolutions to fix the babel upgrade though...

Only happening with prod builds, --dev is fine.

@abartolo
Copy link

@sebirdman Any solution worked for you? I am seeing the error below only on Prod builds.

08-27 20:47:42.675 23560-23586/? E/AndroidRuntime: FATAL EXCEPTION: mqt_native_modules
    Process: catWheels.main, PID: 23560
    com.facebook.react.common.JavascriptException: Invalid attempt to spread non-iterable instance, stack:

@stale
Copy link

stale bot commented Nov 26, 2018

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Nov 26, 2018
@stale
Copy link

stale bot commented Dec 3, 2018

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

@stale stale bot closed this as completed Dec 3, 2018
@facebook facebook locked as resolved and limited conversation to collaborators Dec 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Platform: Android Android applications. Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

8 participants