-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Fatal Exception: com.facebook.react.common.JavascriptException: TypeError: undefined is not an object (evaluating 'r.default') #3124
Comments
So the cause of error is just stupid. So one way to fix this is to rename all |
@CptFabulouso right ..its working..thank you |
So many thanks. Any proper fix somewhere to this issue? I mean not modifying node_modules manually? |
@CptFabulouso could you please explain how did you find the origin of the issue? After renaming
Also tried to do that in all other Navigators without success... If you explain how you did find the issue, I may be able to find what's still wrong. Still getting for now: |
I used console logs (viewed them in android studio) to track where the code throws error. Did you also fix the next line after contentRouter?
|
Ok got it working now, only doing what you suggested editing these 3 lines in
|
Would be great to find the route cause and fix it because now the only (not so) clean solution I found is:
Had also submit a PR on react-navigation: react-navigation/react-navigation#4699 |
@ebaynaud what version of react-navigation you using? |
Initially that was the one specified in current RNRF dependencies, so 1.5.8. |
@ebaynaud solution worked for me, will wait for PR submttion |
May this be related to this? |
Unfortunately my PR react-navigation/react-navigation#4699 was rejected due to the lack of information provided. Do someone can explain this? |
@ebaynaud thanks for the fix, it worked for me! |
this is because babel plugin which allows instance creation without "new" keyword is removed from babel 7 https://babeljs.io/docs/en/babel-plugin-transform-class-constructor-call |
I'm hitting this too :( This was insanely confusing to debug |
This may be a more proper workaround for this problem. I've seen it work in a project, not have tried in one of mine yet. |
I've already done that — works in debug mode, still crashes in release |
run this package.json snippet in postinstall or manually before release: For older react-navigation (where SwitchRouter is not available)
For newer react-navigation (where SwitchRouter is available)
should fix the issue until react-navigation releases patch for this |
@pavjacko With these fixes applied, still can't run it in release mode (debug mode is ok) |
I execute this command from the project root, to fix it:
|
I am facing the same issue, I tried everything mentioned above, nothing worked for me. RN version: 0.56.0 |
same, I have no the DrawerNavigator.js file. |
I tried all solution but no luck |
i sorry but ever have problem |
Worked for me . :) |
which of all the solutions worked for you or what did you do |
@VesperDev i tried with adamivancza/react-navigation@db8be7c#comments . check it . |
@Anujmoglix what version of RN you using? |
0.56 |
Thank you guys, renaming TabRouter to tabRouter in "node_modules/react-navigation/src/navigators/DrawerNavigator.js" file worked for me. |
Thanks this works. |
Thank you so much!!!!!!!! |
Version
Tell us which versions you are using:
-- issue
When i add drawer getting exception and app crash on release apk, when i run app in debug it will compile and run fine.
My Drawer code
--Exception
Fatal Exception: com.facebook.react.common.JavascriptException: TypeError: undefined is not an object (evaluating 'r.default')
This error is located at:
in Unknown
in t
in RCTView
in RCTView
in t, stack:
w@380:1598
processScene@310:16513
oe@310:14574
processScene@310:15557
create@310:11694
w@401:4077
tr@106:42936
Nr@106:56528
Ur@106:56960
ui@106:61804
oi@106:61224
ri@106:60352
Ir@106:59332
di@106:66528
hi@106:66840
render@106:69158
exports@283:440
run@279:601
runApplication@279:2051
value@18:3329
@18:912
value@18:2598
value@18:884
The text was updated successfully, but these errors were encountered: