You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 13, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Jan 13, 2022. It is now read-only.
Malformed calls from JS: field sizes are different / Error calling JSTimers.CallTimers [Fixed] #37
I have several similar Apps still with this pioneer Navigation, so now that Google requires a 64 bit version that is only available on RN 0.59, I had to upgrade. There are too many implications and limitations in changing now to another navigation system.
In this version of RN, when I navigated to another route, I was having this error Malformed calls from JS: field sizes are different.and in another experiment Error calling JSTimers.CallTimers.
I found out that if I removed the RightButton from NavigationBarRouteMapper all was ok so after some research, I fixed this error by commenting/removing this bit of code from src/NavigatorNavigationBarStylesIOS.js:
One thing that threw me off for a bit, was that since I was experiencing the error on Android, I figured that the file I would have to edit was src/NavigatorNavigationBarStylesAndroid.js. However, I wasn't able to get past the error (on Android) until I made the change you suggested in src/NavigatorNavigationBarStylesIOS.js. I guess it makes sense because both of those files get imported into src/NavigatorNavigationBar.js which is used for both platforms.
Although, this feels like a workaround, I'm not sure of a better solution at this point. It does seem to work for me, and you saved me a lot of time. Thanks again.
Then buildSceneInterpolators returns an object with a RightButton field that consumes this Styles.Right (via a call from the Interpolators object definition) as the following
Here you see that startStyles.RightButton.left is referenced. However, that value is not defined above on BASE_STYLES that ends up being consumed here. So you end up with NaN which causes issues.
If I add left: 0 to the base right button style, everything seems to work as expected.
Another fix was to change the RightButton styles in the buildSceneInterpolators function to return something like the following
Rather than modifying node_modules directly, I set up a script to do it for me, so I can get consistent fixes without manually applying every time I clean m node_modules folder.
Here is what I did to fix it until I can move away from this library (or the library fixes this issue).
Add a node script to modify the file. Here is what mine was:
For the one that will have the same issue. No need for custom postinstall scripts. This library is either not supported. I have forked it and replace all needed for RN 0.61+. It's here https://github.com/AndriiUhryn/react-native-custom-components and free to install.
Activity
tonybebber commentedon Jun 17, 2019
@nunobasto - thank you, this helped me a lot.
One thing that threw me off for a bit, was that since I was experiencing the error on Android, I figured that the file I would have to edit was
src/NavigatorNavigationBarStylesAndroid.js. However, I wasn't able to get past the error (on Android) until I made the change you suggested insrc/NavigatorNavigationBarStylesIOS.js. I guess it makes sense because both of those files get imported intosrc/NavigatorNavigationBar.jswhich is used for both platforms.Although, this feels like a workaround, I'm not sure of a better solution at this point. It does seem to work for me, and you saved me a lot of time. Thanks again.
JorgeMoV commentedon Jul 26, 2019
@nunobasto I just want to thank you for publishing this information. You are a life saver, at least my life has been saved by you. THANK YOU 👍
anilrg1793 commentedon Aug 21, 2019
@nunobasto Really thanks for this for sharing this information. Also it saves my lot of time.
SpencerLynn commentedon Sep 6, 2019
I also ran into this issue but solution was similar but slightly different.
The root cause that I found was that in
NavigatorNavigationBarStylesAndroid.js, theBASE_STYLESobject definesRightButtonas the followingThat's consumed and built into the
Stagesvariable and theRightfield is defined as the followingThen
buildSceneInterpolatorsreturns an object with aRightButtonfield that consumes thisStyles.Right(via a call from the Interpolators object definition) as the followingHere you see that
startStyles.RightButton.leftis referenced. However, that value is not defined above onBASE_STYLESthat ends up being consumed here. So you end up withNaNwhich causes issues.If I add
left: 0to the base right button style, everything seems to work as expected.Another fix was to change the
RightButtonstyles in thebuildSceneInterpolatorsfunction to return something like the followingSpencerLynn commentedon Sep 6, 2019
Rather than modifying node_modules directly, I set up a script to do it for me, so I can get consistent fixes without manually applying every time I clean m node_modules folder.
Here is what I did to fix it until I can move away from this library (or the library fixes this issue).
Add a node script to modify the file. Here is what mine was:
Then in
package.json, set it up as apostinstallscript.AndriiUhryn commentedon Dec 15, 2019
For the one that will have the same issue. No need for custom postinstall scripts. This library is either not supported. I have forked it and replace all needed for RN 0.61+. It's here https://github.com/AndriiUhryn/react-native-custom-components and free to install.