Android firestore无法在响应本机事件中达到后端错误

时间:2018-09-27 07:55:23

标签: firebase react-native google-cloud-firestore react-native-android

我一直在寻找有关此问题的解决方案,但直到现在我都找不到。

这是一个很奇怪的问题。 我最初尝试使用 react-native 0.56.0 ,它编译良好,然后在Android设备上发生此错误。

  

firestore(5.5.0)无法到达后端   但是,问题是该错误不会发生在android模拟器上。它仅发生在android设备上。 (真的很奇怪)

因此,我这次尝试使用本机0.57.1​​ ,然后发生了此错误。 并且打印出开发服务器在Android设备屏幕上返回了响应错误代码:500。

  

错误:捆绑失败:错误:无法解析schedule/tracking中的模块/Users/jeonmingyu/work/foodup-mobile-RN/node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:急速模块图中不存在模块schedule/tracking

     

这可能与https://github.com/facebook/react-native/issues/4968有关   要解决此问题,请尝试以下操作:     1.清除值班员手表:watchman watch-del-all。     2.删除node_modules文件夹:rm -rf node_modules && npm install。     3.重置Metro Bundler缓存:rm -rf /tmp/metro-bundler-cache-*npm start -- --reset-cache。     4.删除急速缓存:rm -rf /tmp/haste-map-react-native-packager-*。       在ModuleResolver.resolveDependency(/Users/jeonmingyu/work/foodup-mobile-RN/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:209:1301)       在ResolutionRequest.resolveDependency(/Users/jeonmingyu/work/foodup-mobile-RN/node_modules/metro/src/node-haste/DependencyGraph/ResolutionRequest.js:83:16)       在DependencyGraph.resolveDependency(/Users/jeonmingyu/work/foodup-mobile-RN/node_modules/metro/src/node-haste/DependencyGraph.js:238:485)       在Object.resolve(/Users/jeonmingyu/work/foodup-mobile-RN/node_modules/metro/src/lib/transformHelpers.js:180:25)       在dependencies.map.result(/Users/jeonmingyu/work/foodup-mobile-RN/node_modules/metro/src/DeltaBundler/traverseDependencies.js:311:29)       在Array.map()       在resolveDependencies(/Users/jeonmingyu/work/foodup-mobile-RN/node_modules/metro/src/DeltaBundler/traverseDependencies.js:307:16)       在/Users/jeonmingyu/work/foodup-mobile-RN/node_modules/metro/src/DeltaBundler/traverseDependencies.js:164:33       在Generator.next()       在步骤(/Users/jeonmingyu/work/foodup-mobile-RN/node_modules/metro/src/DeltaBundler/traverseDependencies.js:266:307)

这是我的package.json

package.json

"dependencies": {
    "@firebase/firestore": "^0.8.1",
    "firebase": "^5.5.1",
    "immutable": "^3.8.2",
    "loaders.css": "^0.1.2",
    "lodash": "^4.17.10",
    "moment": "^2.22.2",
    "native-base": "^2.7.2",
    "react": "16.3.1",
    "react-geocode": "^0.1.2",
    "react-loaders": "^3.0.1",
    "react-native": "^0.57.0",
    "react-native-app-intro-slider": "^0.2.4",
    "react-native-fast-image": "^4.0.14",
    "react-native-loader": "^1.2.1",
    "react-native-maps": "^0.21.0",
    "react-native-phone-call": "^1.0.7",
    "react-native-side-menu": "^1.1.3",
    "react-native-swiper": "^1.5.13",
    "react-navigation": "^2.3.1",
    "react-redux": "^5.0.7",
    "react-redux-firebase": "^2.1.6",
    "redux": "^4.0.0",
    "redux-actions": "^2.4.0",
    "redux-devtools-extension": "^2.13.5",
    "redux-firestore": "^0.5.7",
    "redux-persist": "^5.10.0",
    "redux-thunk": "^2.3.0",
    "remote-redux-devtools": "^0.5.13"
},
"devDependencies": {
    "babel-jest": "23.0.1",
    "babel-preset-react-native": "^5.0.2",
    "jest": "23.1.0",
    "lint-staged": "^7.2.2",
    "node-sass": "^4.9.2",
    "react-native-sass-transformer": "^1.2.2",
    "react-test-renderer": "16.3.1",
    "redux-devtools-extension": "^2.13.5"
}

如果有人知道并且有解决方案,请分享您的解决方案。 它让我疯狂! :(

0 个答案:

没有答案