-
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
App force close on release mode: undefined is not an object (evaluating 'e.length') #16745
Comments
Possibly related: #16743, #16689 |
@petejkim @stephenheron I see you have the same problem, did you manage to fix? |
Hi @brunolemos Still having the same problem I am afraid. It is quite tricky to track down as the error is not very helpful and it does not happen in debug mode. I thought it was a problem with NativeBase to be honest but if you are not using NativeBase then it points to something else. Is there a way of us getting more useful crash information I wonder? Thanks, |
I don't use
node_modules/color-string/color-string.js |
+1 |
Same here! 0.50.2 |
Looks like someone might have solved the issue : GeekyAnts/NativeBase#1348 (comment) |
@stephenheron it didn't help me. Still getting:
Removing minification logic from |
+1 |
I did some digging around and was able to get it to "work".. Not sure if this is the same change as @dotansimha made or not... So perhaps the issue is actually related to changed made in https://github.com/mishoo/UglifyJS2 I modified the minify function in
to
|
@PvanHengel I just changed the code to return the original |
I was able to fix the problem by resolving the just changed my package.json to include: this is just a workaround though since other packages might declare the same var twice which breaks uglify |
@PvanHengel solution worked, but of course is just a workaround... any idea how to fix this issue permanently? |
@prjmax see @andrew-wagner89 above that seems to be the root cause. |
Same issue. MacOS 10.12.6 package.json:
My steps:
Launch Android Studio 3. Clean, Rebuild, Generated Signed APK (debugkeystore) Logcat:
|
The root cause is a bug in uglify-js: mishoo/UglifyJS#2449 Fixed in this pull request: mishoo/UglifyJS#2458 You can wait for a "resolutions": {
"uglify-js": "github:alexlamsl/UglifyJS2#issue-2449"
}, |
@askielboe Thank you, but not working for me.
and performed all updates. But still receiving:
|
Have you checked that the packages are actually resolved correctly? I'm using |
I can confirm that the fix of @askielboe works. @mobdim have you tried the following:
|
For me, the following works (0.50.3):
Using latest Yarn. Also, make sure to run:
(and reinstall Pods if you are using it). |
Oh yeah forgot to mention that yesterday I tried with npm and it didn’t work I think you must use yarn
… On Nov 9, 2017, at 8:22 AM, Andreas Skielboe ***@***.***> wrote:
Have you checked that the packages are actually resolved correctly? I'm using yarninstead of npm. Not sure if that makes a difference..
https://docs.npmjs.com/files/package.json#github-urls
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@askielboe, @masterpetit Thanks, I tried: package.json:
My steps:
Then I run Android Studio 3, rebuild and generate release apk with debugkeystore. (Maybe something here wrong?) |
@dotansimha Thank you. |
@mobdim my resolutions looks like this:
Maybe also remove your yarn and npm lock files. |
FYI the pull request for see https://github.com/Qix-/color-convert/pull/49#issuecomment-342974686 |
@masterpetit Yes, I set resolutions only
and added steps
but not working... I will create empty project and try to run it. |
I've come across the same issue with release 0.50.2 What I have discovered is that The fix with |
For those of you using Note: This change will likely be reverted on an |
@th317erd i think this would be lost on every npm install |
You can also change the compress: {
reduce_vars: false
} See documentation here: https://www.npmjs.com/package/uglify-es Note: This change will likely be reverted on |
@andrew-wagner89 Simply updating |
My solution:
remove and build steps:
Everything ok! |
@mobdim the problem only happens when we use |
this one #16745 (comment) fixed for me
|
TO ANYONE WHO FINDS THEMSELVES HERE: This issue has been resolved with a recent publish to This also isn't directly an issue with metro-bundler or react-native, so this issue can probably be closed. |
@th317erd You're totally right, thanks for the information |
Hi, I think a have a same issue with @brunolemos when I upgrade my project from react-native 0.45 to 0.50.3, but my error is a bit difference
I tried to install the latest metro-bundler like @th317erd said, but can't fix it. |
@ThPhu Your issue is similar to #16567
|
@brunolemos No, I still use |
this comment works for me , tnx @mobdim |
In my case, I run the app in release mode with |
we have similar issues keep coming up #17348 |
Upgraded react-native to the latest version and this is no longer an issue. |
@brunolemos not working here.
still crashed on build release. happen when some of native-base componen touched. |
So, what version of React and React Native do you use now? |
@mosleim |
When I tried @mobdim 's solution it got rid of the error |
Is this a bug report?
Yes
Have you read the Contributing Guidelines?
Yes
Environment
Environment:
OS: macOS High Sierra 10.13
Node: 8.9.0
Yarn: 1.2.1
npm: 5.5.1
Watchman: 4.7.0
Xcode: Xcode 9.1 Build version 9B37
Android Studio: 3.0 AI-171.4402976
Packages: (wanted => installed)
react: ^16.0.0 => 16.0.0
react-native: ^0.50.2 => 0.50.2
Target Platform: iOS (11.1)
Steps to Reproduce
Expected Behavior
Not crash
Actual Behavior
Crash on app open with this error:
RCTFatalException: Unhandled JS Exception: undefined is not an object (evaluating 'e.length')'
Stack points inside the color-converter package.
Current workaround
The text was updated successfully, but these errors were encountered: