App force close on release mode: undefined is not an object (evaluating 'e.length')
See original GitHub issueIs 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
- App with React Native v0.50+ installed
- Run debug build (works)
- Run release build (crash on app open)
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
- Downgrade to 0.49.5
Issue Analytics
- State:
- Created 6 years ago
- Reactions:38
- Comments:47 (7 by maintainers)
Top Results From Across the Web
undefined is not an object (evaluating 'e.length')
App force close on release mode : undefined is not an object (evaluating 'e.length')
Read more >iOS App Crashes in release mode "undefined is not an ...
Found the issue. One of the third-party components was causing it because I as passing null to somehow.
Read more >Getting "TypeError: undefined is not an object (evaluating ' ...
After upgrading to Expo 41 I'm getting the following error as soon as my app loads: TypeError: undefined is not an object (evaluating ......
Read more >error: undefined is not an object (evaluating '$scope. ...
You have declared $scope.inputcode but not as an object - as it currently exists, it is just undefined . You need to initialise...
Read more >App crashes with "undefined is not an object (evaluating 'e. ...
App crashes with "undefined is not an object (evaluating 'e.issue.id')" error : YTM-484.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
My solution:
remove
resolutions
from package.jsonand build steps:
Everything ok!
I was able to fix the problem by resolving the
color-convert
package to use the pull request here: Qix-/color-convert/pull/49just changed my package.json to include:
"resolutions": { "color-convert": "github:zbarbuto/color-convert" }
this is just a workaround though since other packages might declare the same var twice which breaks uglify