web-dev-qa-db-fra.com

React Non-concordance de la version native 0.59.1> 0.61.2

Après la mise à niveau de react-native de 0.59.10 à 0.61.2, l'application ne se charge pas. Il est coincé sur l'écran de démarrage et me donne un décalage de version.

journaux XCode montrant:

JavaScript version: 0.59.1
Native version: 0.61.2-undefined

(Je trouve la partie "non définie" ci-dessus également assez étrange)

J'ai essayé ce qui suit:

  • Suppression de modules de nœuds;
  • Suppression des pods et réinstallation;
  • watchman watch-del-all && react-native start --reset-cache;
  • Vérifié par mon projet pour toutes les versions 0.59.10 (rien trouvé);
  • Assurez-vous que toutes mes fenêtres de terminal étaient fermées;
  • Projet react-native-clean utilisé;
  • Application désinstallée dans Simulator;
  • Réinstallation du simulateur 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

log-ios natif réactif

    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>:

journaux 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)

run-ios natif réactif

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

info native de réaction

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

Toute aide est la bienvenue si vous avez besoin de plus d'informations s'il vous plaît demander.

Mise à jour

Cela semble être un problème de mode de débogage de Xcode Simulator. Lorsque je configure l'application avec une mise en scène pour la libérer et la lancer sur un appareil/simulateur réel, elle se construit correctement.

8
Kevin Etore

Dans mon cas, ce problème a été résolu après la mise à jour d'autres packages avec des sous-modules obsolètes (ils ont été supprimés de React Native package)

0
zmnv