Hei there, i have been looking everywhere for a solution to find regarding the indicated error which i get when i type expo start
and then access the expo go app by QR Code.
The app builds successfully but then displays the following error messages, whereas i personally think that the problem lies at the IDBIndex error message and the other one is just a so called Red Herring from what i have learned so far.
Invariant Violation: "main" has not been registered. This can happen if:
* Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
* A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called.
at node_modules\expo\build\environment\react-native-logs.fx.js:27:4 in error
at node_modules\react-native\Libraries\Core\ExceptionsManager.js:95:4 in reportException
at node_modules\react-native\Libraries\Core\ExceptionsManager.js:141:19 in handleException
at node_modules\react-native\Libraries\Core\setUpErrorHandling.js:24:6 in handleError
at node_modules\@react-native\polyfills\error-guard.js:49:36 in ErrorUtils.reportFatalError
at node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:370:8 in __guard
at node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:113:4 in callFunctionReturnFlushedQueue
AsyncStorage has been extracted from react-native core and will be removed in a future release. It can now be installed and imported from '@react-native-async-storage/async-storage' inste
ad of 'react-native'. See https://github.com/react-native-async-storage/async-storage
at node_modules\expo\build\environment\react-native-logs.fx.js:18:4 in warn
at node_modules\react-native\Libraries\Utilities\warnOnce.js:27:2 in warnOnce
at node_modules\react-native\index.js:273:12 in module.exports.get__AsyncStorage
at node_modules\@firebase\app\dist\index.rn.cjs.js:648:19 in <global>
at node_modules\metro-runtime\src\polyfills\require.js:339:11 in loadModuleImplementation
at node_modules\firebase\app\dist\index.cjs.js:3:22 in <global>
at node_modules\metro-runtime\src\polyfills\require.js:339:11 in loadModuleImplementation
at node_modules\pt-web-app-common\src\util\FirebaseService.js:1:0 in <global>
at node_modules\metro-runtime\src\polyfills\require.js:339:11 in loadModuleImplementation
at node_modules\pt-web-app-common\src\index.js:10:0 in <global>
at node_modules\metro-runtime\src\polyfills\require.js:339:11 in loadModuleImplementation
at screens\agency_details\AgencyDetailsScreen.js:4:0 in <global>
at node_modules\metro-runtime\src\polyfills\require.js:339:11 in loadModuleImplementation
at navigation\MainTabNavigator.js:6:0 in <global>
at node_modules\metro-runtime\src\polyfills\require.js:339:11 in loadModuleImplementation
at navigation\AppNavigator.js:3:0 in <global>
at node_modules\metro-runtime\src\polyfills\require.js:339:11 in loadModuleImplementation
at App.js:3:0 in <global>
at node_modules\metro-runtime\src\polyfills\require.js:339:11 in loadModuleImplementation
at index.js:3:0 in <global>
at node_modules\metro-runtime\src\polyfills\require.js:339:11 in loadModuleImplementation
at node_modules\metro-runtime\src\polyfills\require.js:200:44 in guardedLoadModule
at http://vp-82k.proptrek.pt-app.exp.direct/index.bundle?platform=ios&dev=true&hot=false&strict=false&minify=false:385915:3 in global code
ReferenceError: Can't find variable: IDBIndex
at node_modules\expo\build\environment\react-native-logs.fx.js:27:4 in error
at node_modules\react-native\Libraries\Core\ExceptionsManager.js:95:4 in reportException
at node_modules\react-native\Libraries\Core\ExceptionsManager.js:141:19 in handleException
at node_modules\react-native\Libraries\Core\setUpErrorHandling.js:24:6 in handleError
at node_modules\@react-native\polyfills\error-guard.js:49:36 in ErrorUtils.reportFatalError
at node_modules\metro-runtime\src\polyfills\require.js:203:6 in guardedLoadModule
at http://vp-82k.proptrek.pt-app.exp.direct/index.bundle?platform=ios&dev=true&hot=false&strict=false&minify=false:385915:3 in global code
iOS Bundling complete 170ms
Any ideas of what could be the root cause. Maybe i should also mention that i just imported this project the first time, upgraded the expo sdk and i the initial project did not even include a firebase dependency (since all entries i found on google related to this error seem to point to firebase and versioning problems). Actually i also tried to install firebase in different indicated versions, but still did not succeed to resolve this error.
Any hint would be highly appreacitated!!
My package.json
{
"scripts": {
"set-registry": "npm set registry http://localhost:8081/repository/npm/",
"iwr": "npm install --registry http://localhost:8081/repository/npm-group/",
"set-default-registry": "npm set registry https://registry.npmjs.org",
"yarn": "npx yarn",
"publish": "expo publish",
"start": "expo start --dev-client",
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo start --web",
"eject": "expo eject",
"test": "jest --watchAll",
"login": "expo login",
"logout": "expo logout",
"whoami": "expo whoami"
},
"jest": {
"preset": "jest-expo"
},
"publishConfig": {
"registry": "http://localhost:8081/repository/npm/"
},
"dependencies": {
"@expo/samples": "~3.0.3",
"@expo/vector-icons": "^13.0.0",
"@ptomasroos/react-native-multi-slider": "^2.2.2",
"@react-native-community/checkbox": "^0.3.0",
"@react-native-community/datetimepicker": "6.1.2",
"@react-native-community/viewpager": "5.0.11",
"@react-navigation/web": "^1.0.0-alpha.9",
"eslint-plugin-react-hooks": "^2.5.0",
"expo": "^45.0.0",
"expo-app-auth": "~11.1.0",
"expo-asset": "~8.5.0",
"expo-av": "~11.2.3",
"expo-camera": "~12.2.0",
"expo-constants": "~13.1.1",
"expo-device": "~4.2.0",
"expo-facebook": "~12.2.0",
"expo-file-system": "~14.0.0",
"expo-font": "~10.1.0",
"expo-google-app-auth": "~8.3.0",
"expo-image-picker": "~13.1.1",
"expo-linear-gradient": "~11.3.0",
"expo-linking": "~3.1.0",
"expo-localization": "~13.0.0",
"expo-location": "~14.2.2",
"expo-mail-composer": "~11.2.0",
"expo-permissions": "~13.2.0",
"expo-screen-orientation": "~4.2.0",
"expo-secure-store": "~11.2.0",
"expo-splash-screen": "~0.15.1",
"expo-status-bar": "~1.3.0",
"expo-task-manager": "~10.2.1",
"expo-web-browser": "~10.2.0",
"i18n-js": "3.5.1",
"lodash": "^4.17.20",
"moment": "^2.25.3",
"moment-timezone": "^0.5.32",
"prop-types": "^15.7.2",
"pt-web-app-common": "0.0.775",
"react": "17.0.2",
"react-devtools": "^3.6.3",
"react-dom": "17.0.2",
"react-native": "0.68.2",
"react-native-autocomplete-input": "^4.2.0",
"react-native-calendars": "^1.264.0",
"react-native-gesture-handler": "~2.2.1",
"react-native-gridview": "^0.1.2",
"react-native-image-gallery": "^2.1.5",
"react-native-image-modal": "^1.0.6",
"react-native-keyboard-aware-scroll-view": "^0.9.1",
"react-native-map-clustering": "^3.3.9",
"react-native-maps": "0.30.2",
"react-native-modal": "^11.5.6",
"react-native-netinfo": "^1.1.0",
"react-native-paper": "^3.6.0",
"react-native-picker-select": "^7.0.0",
"react-native-ratings": "^6.5.0",
"react-native-reanimated": "~2.8.0",
"react-native-responsive-grid": "^0.41.993",
"react-native-safe-area-context": "4.2.4",
"react-native-safe-area-view": "^1.1.1",
"react-native-screens": "~3.11.1",
"react-native-svg": "12.3.0",
"react-native-svg-transformer": "^0.14.3",
"react-native-swipe-gestures": "^1.0.5",
"react-native-swipe-list-view": "^2.5.0",
"react-native-vector-icons": "^6.6.0",
"react-native-web": "0.17.7",
"react-native-webview": "11.18.1",
"react-navigation": "^3.12.0",
"react-redux": "5.1.2",
"redux": "^4.0.4",
"sharp-cli": "^1.15.0"
},
"devDependencies": {
"@babel/core": "^7.12.9",
"babel-eslint": "^10.0.3",
"babel-preset-expo": "~9.1.0",
"eslint": "^6.6.0",
"eslint-config-airbnb": "^18.0.1",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-react": "^7.16.0",
"jest-expo": "^45.0.0"
},
"private": true,
"name": "main",
"version": "1.0.0"
}