我的应用程序遇到问题。该应用挂在iOS的启动屏幕上,在Android上运行时没有任何问题。我认为这可能是因为依赖关系中的冲突,但是我自己可以找到解决方案。我已经尝试了一些在stack和Github上找到的解决方案,但是没有一个起作用。
依赖项:
"version": "0.0.1",
"private": true,
"scripts": {
"start": "npm run rmstart && node node_modules/react-native/local-cli/cli.js start",
"test": "jest --coverage --verbose",
"test:browse": "open ./coverage/lcov-report/index.html",
"rmstart": "./scripts/camera_postinstall_ios.sh && rm -f node_modules/react-native/local-cli/core/__fixtures__/files/package.json",
"postinstall": "rm -f node_modules/react-native/local-cli/core/__fixtures__/files/package.json",
"poststart": "rm -f node_modules/react-native/local-cli/core/__fixtures__/files/package.json",
"flow:start": "flow start",
"flow:stop": "flow stop",
"flow:status": "flow status",
"flow:coverage": "flow coverage",
"e2e:build": "detox build",
"e2e:test": "detox test -c ios.sim.debug"
},
"dependencies": {
"apisauce": "1.0.2",
"async": "2.6.2",
"crossroads": "0.12.2",
"i18n-js": "3.2.1",
"immutable": "3.8.2",
"lodash": "4.17.11",
"moment": "2.24.0",
"prop-types": "15.6.2",
"react": "16.6.3",
"react-native": "0.58.1",
"react-native-android-open-settings": "1.3.0",
"react-native-adjust": "4.17.0",
"react-native-camera": "1.12.0",
"react-native-collapsible": "1.4.0",
"react-native-config": "0.11.7",
"react-native-country-picker-modal": "0.7.1",
"react-native-credit-card-input": "0.4.1",
"react-native-default-preference": "1.3.2",
"react-native-easy-grid": "0.2.0",
"react-native-fast-image": "5.1.2",
"react-native-fbsdk": "0.8.0",
"react-native-firebase": "5.2.2",
"react-native-google-places": "2.5.2",
"react-native-google-signin": "1.2.0",
"react-native-image-resizer": "1.0.0",
"react-native-image-rotate": "2.1.0",
"react-native-keyboard-spacer": "0.4.1",
"react-native-linear-gradient": "2.5.3",
"react-native-localize": "1.0.3",
"react-native-material-dropdown": "0.11.1",
"react-native-material-kit": "git+https://github.com/hammadzz/react-native-material-kit#0f8a79877f92ab4b2ce0c065e4d76b44738bd46a",
"react-native-material-ui": "1.30.1",
"react-native-onesignal": "3.2.12",
"react-native-pdf": "5.0.11",
"react-native-permissions": "1.1.1",
"react-native-photos-framework": "git+https://github.com/gregory-light-it/react-native-photos-framework",
"react-native-progress": "3.5.0",
"react-native-router-flux": "3.43.0",
"react-native-scrollable-tab-view": "0.10.0",
"react-native-sentry": "0.42.0",
"react-native-share-extension": "1.2.1",
"react-native-snap-carousel": "3.7.5",
"react-native-splash-screen": "3.2.0",
"react-native-status-bar-height": "2.2.0",
"react-native-swiper": "1.5.14",
"react-native-tab-view": "1.3.2",
"react-native-vector-icons": "6.3.0",
"react-native-version-check": "3.0.3",
"react-redux": "5.0.7",
"react-timer-mixin": "0.13.4",
"reactotron-react-native": "2.1.7",
"reactotron-redux": "2.1.3",
"redux": "4.0.1",
"redux-form": "7.3.0",
"redux-logger": "3.0.6",
"redux-persist": "5.9.1",
"redux-thunk": "2.3.0",
"reselect": "4.0.0",
"rn-fetch-blob": "0.10.15",
"tipsi-stripe": "7.3.0",
"tween-functions": "1.2.0"
},
"devDependencies": {
"axios-mock-adapter": "1.16.0",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "10.0.1",
"babel-jest": "24.1.0",
"babel-preset-flow": "6.23.0",
"detox": "11.0.1",
"eslint": "5.14.1",
"eslint-config-airbnb": "17.1.0",
"eslint-plugin-import": "2.16.0",
"eslint-plugin-jsx-a11y": "6.2.1",
"eslint-plugin-react": "7.12.4",
"eslint-plugin-react-native": "3.6.0",
"flow-bin": "0.85.0",
"husky": "1.3.1",
"jest": "24.1.0",
"metro-react-native-babel-preset": "0.51.1",
"mockdate": "2.0.2",
"react-test-renderer": "16.6.3",
"redux-mock-store": "1.5.3",
"redux-testkit": "1.0.6",
"timemachine": "0.3.0"
},
"jest": {
"preset": "react-native",
"setupFiles": [
"./jest.setup.js",
"./jest.extend.js"
],
"transformIgnorePatterns": [
"node_modules/(?!(jest-)?react-native|rn-fetch-blob|tipsi-stripe|react-native-fabric)"
],
"testRegex": "(/__tests__/.*|(\\.|/)test)\\.jsx?$",
"coveragePathIgnorePatterns": [
"./jest.setup.js",
"./jest.extend.js",
"./src/assets/",
"./src/constants/",
"./e2e/",
"./src/components/Slider.js"
],
"modulePathIgnorePatterns": [
"./e2e/",
"./src/components/Slider.js",
"./__tests__/src/store/__helpers__"
],
"coverageThreshold": {
"global": {
"statements": 58,
"branches": 43,
"functions": 57,
"lines": 58
}
}
},
"detox": {
"test-runner": "jest",
"runner-config": "e2e/config.json",
"specs": "e2e",
"configurations": {
"ios.sim.debug": {
"binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/MyNeveoMobile.app",
"build": "xcodebuild -workspace ios/MyNeveoMobile.xcworkspace -scheme MyNeveoMobile -configuration Debug -derivedDataPath ios/build",
"type": "ios.simulator",
"name": "iPhone 7"
}
}
},
"rnpm": {
"assets": [
"./src/assets/fonts"
]
},
"husky": {
"hooks": {
"pre-commit": "yarn test"
}
},
"engines": {
"nodejs": "8.11.1"
}
}
Env: 排毒:11.0.1 React Native:0.58.1 节点:10.7.0 Xcode:10.1 macOS:10.14.3
执行这些操作后,每次测试都会失败。
detox[4564] INFO: [AppleSimUtils.js] com.test launched. The stdout and stderr logs were recreated, you can watch them with:
tail -F /Users/wojciech/Library/Developer/CoreSimulator/Devices/5D3D3C6D-ABF7-47C2-B079-6C6BAA5376E6/data/tmp/detox.last_launch_app_log.{out,err}
detox[4747] TRACE: [ArtifactsManager.js/LIFECYCLE] artifactsManager.onLaunchApp({ bundleId: 'com.myneveo.neveo',
deviceId: '5D3D3C6D-ABF7-47C2-B079-6C6BAA5376E6',
launchArgs:
{ '-detoxServer': 'ws://localhost:50354',
'-detoxSessionId': '2d6e89a0-ccee-5f5c-3762-2683a65942ff' },
pid: 4747 })
detox[4564] TRACE: [AsyncWebSocket.js/WEBSOCKET_SEND] {"type":"isReady","params":{},"messageId":-1000}
detox[4564] TRACE: [DetoxServer.js/MESSAGE] role=tester action=isReady (sessionId=2d6e89a0-ccee-5f5c-3762-2683a65942ff)
detox[4564] DEBUG: [DetoxServer.js/CANNOT_FORWARD] role=testee not connected, cannot fw action (sessionId=2d6e89a0-ccee-5f5c-3762-2683a65942ff)
detox[4564] DEBUG: [DetoxServer.js/LOGIN] role=testee, sessionId=2d6e89a0-ccee-5f5c-3762-2683a65942ff
detox[4564] DEBUG: [DetoxServer.js/LOGIN_SUCCESS] role=testee, sessionId=2d6e89a0-ccee-5f5c-3762-2683a65942ff```