Después de actualizar react-native de 0.59.10 a 0.61.2, la aplicación no se carga. Está atascado en la pantalla de inicio y me da una versión que no coincide.
Los registros de XCode muestran:
JavaScript version: 0.59.1
Native version: 0.61.2-undefined
(Encuentro la parte 'indefinida' anterior también bastante extraña)
He intentado lo siguiente:
- Eliminar módulos de nodo;
- Retirar Pods y reinstalar;
- watchman watch-del-all && react-native start --reset-cache;
- Revisé mi proyecto para ver las versiones 0.59.10 (no se encontró nada);
- Me aseguré de que todas las ventanas de mi terminal estuvieran cerradas;
- Usó react-native-clean-project;
- Aplicación desinstalada en el simulador;
- Reinstaló el simulador Xcode.
package.json
{
"name": "-",
"ios_version": "1.2.21",
"android_version": "1.2.21",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"test": "jest",
"lint": "eslint .",
"clean": "react-native-clean-project"
},
"dependencies": {
"@react-native-community/async-storage": "^1.2.1",
"@react-native-community/netinfo": "^3.2.1",
"axios": "^0.18.0",
"bugsnag-react-native": "^2.23.2",
"d3-scale": "^3.0.0",
"d3-shape": "^1.3.5",
"i18n-js": "^3.3.0",
"lodash.memoize": "^4.1.2",
"lottie-ios": "^3.1.3",
"lottie-react-native": "^3.2.1",
"moment": "^2.24.0",
"native-base": "^2.12.1",
"prettier": "^1.17.1",
"prop-types": "^15.7.2",
"qs": "^6.7.0",
"react": "16.9.0",
"react-devtools-core": "github:msand/react-devtools-core#4c30959",
"react-native": "0.61.2",
"react-native-clean-project": "^3.2.4",
"react-native-code-push": "^5.6.1",
"react-native-linear-gradient": "^2.5.6",
"react-native-localize": "^1.1.4",
"react-native-onesignal": "^3.4.2",
"react-native-permissions": "^2.0.2",
"react-native-rate": "^1.1.7",
"react-native-restart": "0.0.12",
"react-native-safari-view": "^2.1.0",
"react-native-shimmer-placeholder": "^1.0.30",
"react-native-splash-screen": "^3.2.0",
"react-native-svg": "^9.3.5",
"react-native-svg-charts": "^5.2.0",
"react-native-touch-id": "^4.4.1",
"react-navigation": "4.0.10",
"react-redux": "^6.0.1",
"redux": "^4.0.1",
"redux-axios-middleware": "^4.0.0",
"redux-thunk": "^2.3.0"
},
"devDependencies": {
"@babel/core": "^7.6.2",
"@babel/runtime": "^7.6.2",
"@react-native-community/eslint-config": "^0.0.5",
"babel-jest": "^24.9.0",
"eslint": "^6.5.1",
"jest": "^24.9.0",
"metro-react-native-babel-preset": "^0.56.0",
"react-test-renderer": "16.9.0",
"eslint-config-rallycoding": "^3.2.0",
"reactotron-react-native": "^3.6.4",
"reactotron-redux": "^3.1.1"
},
"jest": {
"preset": "react-native"
},
"rnpm": {
"assets": [
"./src/assets/fonts/"
]
}
}
podfile
platform :ios, '9.0'
require_relative '../node_modules/@react-native-community/cli-platform-
ios/native_modules'
project 'cryptohopperMobile',
'Debug' => :debug,
'Staging' => :release,
'Release' => :release
target '-' do
pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
pod 'React', :path => '../node_modules/react-native'
pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'
pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
pod 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon"
pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
pod 'BugsnagReactNative', path: '../node_modules/bugsnag-react-native'
permissions_path = '../node_modules/react-native-permissions/ios'
pod 'Permission-Notifications', :path => "#{permissions_path}/Notifications.podspec"
target 'OneSignalNotificationServiceExtension' do
pod 'OneSignal', '>= 2.9.3', '< 3.0'
end
target '-Tests' do
inherit! :search_paths
# Pods for testing
end
use_native_modules!
end
target '--tvOS' do
# Pods for tvOS
target '-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end
reaccionar nativo log-ios
NOTE: Most system logs have moved to a new logging system. See log(1) for more information.
Oct 9 09:59:50 MBP-van-Kevin com.apple.CoreSimulator.SimDevice.A503B1AD-A2E6-4B6A-8BB0-8B836CDBB65A[27392] (com.apple.intents.intents-helper) <Warning>: Unknown key for Boolean: EnableTransactions
Oct 9 09:59:50 MBP-van-Kevin com.apple.CoreSimulator.SimDevice.A503B1AD-A2E6-4B6A-8BB0-8B836CDBB65A[27392] (com.apple.intents.intents-helper) <Warning>: Unknown key for Boolean: EnablePressuredExit
Oct 9 09:59:50 MBP-van-Kevin com.apple.CoreSimulator.SimDevice.A503B1AD-A2E6-4B6A-8BB0-8B836CDBB65A[27392] (com.apple.uifoundation-bundle-helper) <Warning>: Unknown key for Boolean: EnableTransactions
Oct 9 09:59:50 MBP-van-Kevin com.apple.CoreSimulator.SimDevice.A503B1AD-A2E6-4B6A-8BB0-8B836CDBB65A[27392] (com.apple.uifoundation-bundle-helper) <Warning>: Unknown key for Boolean: EnablePressuredExit
Oct 9 09:59:50 MBP-van-Kevin com.apple.CoreSimulator.SimDevice.A503B1AD-A2E6-4B6A-8BB0-8B836CDBB65A[27392] (com.apple.mobileslideshow.PhotosFileProvider[28289]) <Error>: assertion failed: 18G87: launchd_sim + 63769 [8D9B6CF1-070B-38FD-B74A-774E187D3032]: 0x16
Oct 9 10:00:50 MBP-van-Kevin druid[28917] <Error>: assertion failed: 18G87 16G73: libxpc.dylib + 80528 [5846A329-63C0-3B4F-BC91-F30AF4CA6E30]: 0x7d
Oct 9 10:00:50 MBP-van-Kevin Unknown[28917] <Error>:
Oct 9 10:00:52 MBP-van-Kevin launchd_sim[27392] <Notice>: BUG in libdispatch client: mach_recv, monitored resource vanished before the source cancel handler was invoked { 0x7fb270a0bfa0[source], ident: 257795 / 0x3ef03, handler: 0x10b03c2d6 }
Oct 9 10:01:07 MBP-van-Kevin cryptohopper_mobile[29274] <Error>: assertion failed: 18G87 16G73: libxpc.dylib + 80528 [5846A329-63C0-3B4F-BC91-F30AF4CA6E30]: 0x7d
Oct 9 10:01:07 MBP-van-Kevin Unknown[29274] <Error>:
Registros XCode
2019-10-09 10:03:36.746016+0200 cryptohopper_mobile[31428:128970] libMobileGestalt MobileGestalt.c:890: MGIsDeviceOneOfType is not supported on this platform.
2019-10-09 10:03:36.900263+0200 cryptohopper_mobile[31428:128970] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /Users/kevinetore/Library/Developer/CoreSimulator/Devices/3356B7C4-EFA4-4639-B6EA-631D56E67BB5/data/Containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
2019-10-09 10:03:36.900578+0200 cryptohopper_mobile[31428:128970] [MC] Reading from private effective user settings.
2019-10-09 10:03:36.917791+0200 cryptohopper_mobile[31428:129053] App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.
2019-10-09 10:03:36.917908+0200 cryptohopper_mobile[31428:129053] Cannot start load of Task <2C82020D-9EB0-4B61-B918-E0495956134D>.<1> since it does not conform to ATS policy
2019-10-09 10:03:36.918088+0200 cryptohopper_mobile[31428:129051] Task <2C82020D-9EB0-4B61-B918-E0495956134D>.<1> finished with error - code: -1022
2019-10-09 10:03:36.960 [info][tid:main][RCTRootView.m:293] Running application cryptohopper_mobile ({
initialProps = {
};
rootTag = 1;
})
2019-10-09 10:03:36.967546+0200 cryptohopper_mobile[31428:128970] ERROR: Error! iOS Simulator does not support push! Please test on a real iOS device. Error: Error Domain=NSCocoaErrorDomain Code=3010 "remote notifications are not supported in the simulator" UserInfo={NSLocalizedDescription=remote notifications are not supported in the simulator}
2019-10-09 10:03:37.099 [error][tid:com.facebook.react.JavaScript] React Native version mismatch.
JavaScript version: 0.59.1
Native version: 0.61.2-undefined
Make sure that you have rebuilt the native code. If the problem persists try clearing the Watchman and packager caches with `watchman watch-del-all && react-native start --reset-cache`.
2019-10-09 10:03:37.148 [error][tid:com.facebook.react.JavaScript] undefined is not an object (evaluating 's.Manager')
2019-10-09 10:03:37.150 [fatal][tid:com.facebook.react.ExceptionsManagerQueue] Unhandled JS Exception: undefined is not an object (evaluating 's.Manager')
2019-10-09 10:03:37.152 [error][tid:com.facebook.react.JavaScript] Module AppRegistry is not a registered callable module (calling runApplication)
2019-10-09 10:03:37.201 [fatal][tid:com.facebook.react.ExceptionsManagerQueue] Unhandled JS Exception: Module AppRegistry is not a registered callable module (calling runApplication)
react-native run-ios
warn Your project is using deprecated "rnpm" config that will stop working from next release. Please use a "react-native.config.js" file to configure the React Native CLI. Migration guide: https://github.com/react-native-community/cli/blob/master/docs/configuration.md
warn The following packages use deprecated "rnpm" config that will stop working from next release:
- react-native-code-push: https://microsoft.github.io/code-push
Please notify their maintainers about it. You can find more details at https://github.com/react-native-community/cli/blob/master/docs/configuration.md#migration-guide.
error React Native CLI uses autolinking for native dependencies, but the following modules are linked manually:
- bugsnag-react-native (to unlink run: "react-native unlink bugsnag-react-native")
This is likely happening when upgrading React Native from below 0.60 to 0.60 or above. Going forward, you can unlink this dependency via "react-native unlink <dependency>" and it will be included in your app automatically. If a library isn't compatible with autolinking, disregard this message and notify the library maintainers.
Read more about autolinking: https://github.com/react-native-community/cli/blob/master/docs/autolinking.md
info Found Xcode workspace "cryptohopperMobile.xcworkspace"
info Building (using "xcodebuild -workspace cryptohopperMobile.xcworkspace -configuration Debug -scheme cryptohopperMobile -destination id=A503B1AD-A2E6-4B6A-8BB0-8B836CDBB65A -derivedDataPath build/cryptohopperMobile")
............................................................
info Installing "build/cryptohopperMobile/Build/Products/Debug-iphonesimulator/cryptohopper_mobile.app"
info Launching "com.cryptohopper"
success Successfully launched the app on the simulator
información de reacción nativa
Binaries:
Node: 12.11.1 - /usr/local/bin/node
npm: 6.11.3 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.4, macOS 10.14, tvOS 12.4, watchOS 5.3
IDEs:
Android Studio: 3.4 AI-183.6156.11.34.5522156
Xcode: 10.3/10G8 - /usr/bin/xcodebuild
npmPackages:
react: 16.9.0 => 16.9.0
react-native: 0.61.2 => 0.61.2
npmGlobalPackages:
react-native-cli: 2.0.1
Cualquier ayuda es bienvenida si necesita más información, por favor pregunte.
Actualizar
Parece ser un problema del modo de depuración Xcode Simulator. Cuando configuro la aplicación con el escenario listo para lanzar y ejecutarla en un dispositivo / simulador real, se construye correctamente.
ios
react-native
Kevin Etore
fuente
fuente
react-native upgrade
comando? ¿Has resuelto todos los conflictos?react-native upgrade
actualizar a la última versión. Si ejecuto el comando de nuevo vuelve:Specified version "0.61.2" is already installed in node_modules and it satisfies "0.61.2" semver range. No need to upgrade
. No dice nada sobre ningún conflicto.Respuestas:
Después de crear un nuevo
bundle.js
con"build:ios": "react-native bundle --entry-file='index.js' --bundle-output='./ios/main.jsbundle' --dev=true --platform='ios'"
, funcionó.Actualizar
Esta solución anterior solo solucionó una parte del problema. Noté que después de crear manualmente el paquete iOS, React Native no creó un nuevo paquete al cargar / actualizar. Esa fue mi primera pista que me recordó algunos cambios que hice en
AppDelegate.m
:Después de volver a cambiar la
else
declaración a lo que tenía antesreturn [CodePush bundleURL];
, solucionó el problema. No estoy seguro de qué me causó cambiarlo en primer lugar, creo que fue la documentación de Codepush.fuente
Si el proyecto no es muy grande, puede guardar archivos * .js y hacer reaccionar nativo init nuevo
Pero si necesita guardar una estructura de su proyecto, puede migrar
con Upgrade Helper
fuente
react-native-upgrade
para asegurarme de no pasar por alto algo.Aparentemente, necesita agregar una adición similar en su Podfile , junto a la cláusula del proyecto. Esto configurará efectivamente sus esquemas para la depuración o liberación. Parece que RN v.60.x tiene algunos cambios importantes a este respecto, especialmente si tiene múltiples esquemas y / o utiliza react-native-esquems-manager.
Para información más detallada ver
fuente
cd ios/ && rm -rf Pods/ && pod install && cd ../
. Todavía obteniendo: `` `` 2019-10-10 11: 59: 16.390 [error] [tid: com.facebook.react.JavaScript] Reaccionar desajuste de versión nativa. Versión de JavaScript: 0.59.1 Versión nativa: 0.61.2-indefinido ``project
en lo cierto,Podfile
se usa particularmente para configuraciones de compilación personalizadas. No debería ser necesario para las configuraciones predeterminadas de depuración / liberación.Hola @KevinEtore, elimine todas sus bibliotecas vinculadas manualmente y migre todas a CocoaPods. Parece que ha olvidado eliminar las bibliotecas React Native vinculadas manualmente.
Si ya ha eliminado esas bibliotecas vinculadas de manullay,
Intenta restablecer Pod
fuente
React Native version mismatch
.En mi caso, ese problema se solucionó después de actualizar otros paquetes con submódulos en desuso (se eliminaron del paquete React Native)
fuente