Closed Kasheeram closed 3 years ago
Did you add the babel plugin as mentioned in the link?
Yes i added,
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
plugins: ['react-native-reanimated/plugin'],
};
Its working when i am creating fresh new App but not working with existing App.
Did you install the pods? cd ios && pod install
Yes i did cd ios && pod install
This is my pod file:
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
platform :ios, '10.0'
def pod_spec
inhibit_all_warnings!
config = use_native_modules!
use_react_native!(
:path => config["reactNativePath"],
:hermes_enabled => false
)
pod 'Firebase/Database'
pod 'Firebase/Auth'
pod 'Firebase/Core'
pod 'Firebase/Messaging'
pod 'Alamofire', '~> 4.2'
pod 'AlamofireObjectMapper'
pod 'KeychainAccess'
pod 'DateToolsSwift'
pod 'SDCAlertView'
pod 'ZLSwipeableViewSwift', :git => 'https://github.com/zhxnlai/ZLSwipeableViewSwift.git', :branch => 'master'
pod 'Toaster'
pod 'Kingfisher'
pod 'youtube-ios-player-helper'
pod 'SKPhotoBrowser'
pod 'NextGrowingTextView'
pod 'Fabric'
pod 'Crashlytics'
pod 'CleverTap-iOS-SDK', modular_headers: true
pod 'GoogleAnalytics'
pod 'Firebase/DynamicLinks'
pod 'Atributika'
pod 'MobileVLCKit'
pod 'ExpandableLabel'
pod 'KMPlaceholderTextView'
pod 'IQKeyboardManagerSwift'
pod 'netfox', :configurations => ['Debug']
end
target 'Demo1' do
#use_frameworks!
pod_spec
end
target 'Demo2' do
#use_frameworks!
pod_spec
end
target 'Demo3' do
#use_frameworks!
pod_spec
end
I have the same issue here ! Anyone has a tip to resolve this issue? I'm going to keep working with Animated from react native :(((((
I'm going to close this because it's not an issue with this library. Feel free to post the solution once you find it.
I suggest having a look at how the check works here: https://github.com/software-mansion/react-native-reanimated/blob/a8d9720ee5312a43cc4e3beb02e70b2fc6a030ae/src/reanimated2/core.ts#L23-L45 and checking what's going wrong with it.
Alternatively take a look at https://github.com/software-mansion/react-native-reanimated/issues/1875 or open an issue in the reanimated repo.
https://github.com/software-mansion/react-native-reanimated/issues/1875#issuecomment-857601710
see this, it works for me
I deleted the app and installed it again and it worked.
So after a few hours of struggling with this problem I came to the idea that if it used to work fine previously than i should revert my commits history to see after which one it started to crash. And I found the problem inside my AppDelegate.m file.
#import "AppDelegate.h"
#import <Firebase.h>
#import <React/RCTBridge.h>
@@ -38,14 +36,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
InitializeFlipper(application);
#endif
RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
moduleName:@"MoxieGirl"
initialProperties:nil];
...
#import "AppDelegate.h"
#if RCT_DEV
#import <React/RCTDevLoadingView.h>
#endif
#import <Firebase.h>
#import <React/RCTBridge.h>
@@ -38,14 +36,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
InitializeFlipper(application);
#endif
NSURL *jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.js" fallbackResource:nil];
RCTBridge *bridge = [[RCTBridge alloc] initWithBundleURL:jsCodeLocation
moduleProvider:nil
launchOptions:launchOptions];
#if RCT_DEV
[bridge moduleForClass:[RCTDevLoadingView class]];
#endif
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
moduleName:@"MoxieGirl"
initialProperties:nil];
...
So I just rolled back this changes and now everything works awesome.
I have already installed a react-native-reanimated
of 2.2.0
version and everything had been working fine until yesterday my app randomly crashed with this error.
package.json
"dependencies": {
"@ptomasroos/react-native-multi-slider": "^2.2.2",
"@react-native-async-storage/async-storage": "^1.15.5",
"@react-native-community/eslint-config": "3.0.0",
"@react-native-firebase/app": "^12.4.0",
"@react-native-firebase/auth": "^12.4.0",
"@react-native-firebase/database": "^12.4.0",
"@react-native-firebase/dynamic-links": "^12.4.0",
"@react-native-firebase/messaging": "^12.4.0",
"@react-native-firebase/storage": "^12.4.0",
"@react-navigation/bottom-tabs": "^6.0.3",
"@react-navigation/native": "^6.0.2",
"@react-navigation/native-stack": "^6.0.4",
"@react-navigation/stack": "^6.0.4",
"axios": "^0.21.1",
"buffer": "^6.0.3",
"crypto-js": "^4.1.1",
"events": "^3.3.0",
"husky": "^7.0.1",
"pbkdf2": "^3.1.2",
"qs": "^6.10.1",
"react": "17.0.2",
"react-native": "0.64.2",
"react-native-config": "^1.4.3",
"react-native-gesture-handler": "^1.10.3",
"react-native-get-random-values": "^1.7.0",
"react-native-reanimated": "^2.2.0",
"react-native-safe-area-context": "^3.3.0",
"react-native-screens": "^3.5.0",
"react-native-splash-screen": "^3.2.0",
"react-native-svg": "^12.1.1",
"react-native-swiper": "^1.6.0",
"react-navigation": "^4.4.4",
"react-redux": "^7.2.4",
"redux": "^4.1.1",
"redux-saga": "^1.1.3",
"uuid": "^8.3.2",
"yup": "^0.32.9"
},
babel.config.js
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
plugins: ['react-native-reanimated/plugin'],
};
Podfile
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
platform :ios, '10.0'
pod 'Firebase/Analytics'
pod 'Firebase/Auth'
pod 'Firebase/Database'
pod 'Firebase/Messaging'
pod 'Firebase/Storage'
target 'MoxieGirl' do
config = use_native_modules!
use_react_native!(
:path => config[:reactNativePath],
# to enable hermes on iOS, change `false` to `true` and then install pods
:hermes_enabled => false
)
target 'MoxieGirlTests' do
inherit! :complete
#Pods for testing
end
#Enables Flipper.
#
#Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable the next line.
use_flipper!()
post_install do |installer|
react_native_post_install(installer)
fix_deployment_target(installer)
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings["ONLY_ACTIVE_ARCH"] = "NO"
end
end
end
def fix_deployment_target(installer)
if !installer
return
end
puts "Make the pods deployment target version the same as our target"
project = installer.pods_project
deploymentMap = {}
project.build_configurations.each do |config|
deploymentMap[config.name] = config.build_settings['IPHONEOS_DEPLOYMENT_TARGET']
end
#p deploymentMap
project.targets.each do |t|
puts " #{t.name}"
t.build_configurations.each do |config|
oldTarget = config.build_settings['IPHONEOS_DEPLOYMENT_TARGET']
newTarget = deploymentMap[config.name]
if oldTarget == newTarget
next
end
puts " #{config.name} deployment target: #{oldTarget} => #{newTarget}"
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = newTarget
end
end
end
end
Reanimated 2 doesn't work in Debug mode. Stop your debugging mode and it should work.
Reanimado 2 no funciona en el moIn other words, dear, the error will disappear when the publication is published in an app store?do de depuración. Detenga su modo de depuración y debería funcionar.
Reanimated 2 doesn't work in Debug mode. Stop your debugging mode and it should work.
That was the solution for me! Thanks!
Is there no way to debug and still use Reanimated 2??
Hi guys, finally i solved this issue by install react-native-reanimated@alpha, do not use react-native-reanimated@next!
'Reanimated 2 doesn't work in Debug mode. Stop your debugging mode and it should work.' This should be documented
Reanimated 2 doesn't work in Debug mode. Stop your debugging mode and it should work.
Thanks, this was my issue.
Reanimated 2 doesn't work in Debug mode. Stop your debugging mode and it should work.
where is document ?
I am integration this library for collapsable header tab, Also i have install react-native-reanimated v2, still getting this error, please help me.
if you want to use Reanimated 2 then go through our installation steps https://docs.swmansion.com/react-native-reanimated/docs/installation
package.json