{"action":"created","issue":{"url":"https://api.github.com/repos/invertase/react-native-firebase/issues/1263","repository_url":"https://api.github.com/repos/invertase/react-native-firebase","labels_url":"https://api.github.com/repos/invertase/react-native-firebase/issues/1263/labels{/name}","comments_url":"https://api.github.com/repos/invertase/react-native-firebase/issues/1263/comments","events_url":"https://api.github.com/repos/invertase/react-native-firebase/issues/1263/events","html_url":"https://github.com/invertase/react-native-firebase/issues/1263","id":337295852,"node_id":"MDU6SXNzdWUzMzcyOTU4NTI=","number":1263,"title":"Cannot read property 'collection' of undefined","user":{"login":"gagaJay","id":3827781,"node_id":"MDQ6VXNlcjM4Mjc3ODE=","avatar_url":"https://avatars2.githubusercontent.com/u/3827781?v=4","gravatar_id":"","url":"https://api.github.com/users/gagaJay","html_url":"https://github.com/gagaJay","followers_url":"https://api.github.com/users/gagaJay/followers","following_url":"https://api.github.com/users/gagaJay/following{/other_user}","gists_url":"https://api.github.com/users/gagaJay/gists{/gist_id}","starred_url":"https://api.github.com/users/gagaJay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gagaJay/subscriptions","organizations_url":"https://api.github.com/users/gagaJay/orgs","repos_url":"https://api.github.com/users/gagaJay/repos","events_url":"https://api.github.com/users/gagaJay/events{/privacy}","received_events_url":"https://api.github.com/users/gagaJay/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-01T14:35:05Z","updated_at":"2018-07-01T16:21:42Z","closed_at":"2018-07-01T16:21:42Z","author_association":"NONE","body":"<!---\r\nBEFORE YOU MAKE AN ISSUE\r\n\r\nThe issue list of this repo is exclusively for bug reports.\r\n\r\n1) For feature requests, please use our Canny board: https://react-native-firebase.canny.io/feature-requests\r\n\r\n2) For questions and support please use our Discord chat: https://discord.gg/C9aK28N or Stack Overflow: https://stackoverflow.com/questions/tagged/react-native-firebase\r\n\r\n3) If this is a setup issue then please make sure you've correctly followed the setup guides, most setup issues such as 'duplicate dex files', 'default app has not been initialized' etc are all down to an incorrect setup as the guides haven't been correctly followed.\r\n-->\r\n\r\n### Issue\r\n\r\nIm using the sample app \"react-native-firebase-starter\" to try out the feature of firestore. I follow the instruction on the page and everything works just like the page said: Cloud Firestore module is enabled.\r\n![screen shot 2018-07-02 at 2 24 22 am](https://user-images.githubusercontent.com/3827781/42135440-25330884-7d9f-11e8-94d6-4b3b4667e1cd.png)\r\n\r\nBut things changed when i try to utilise the firestore module. What I did is simply as this:\r\n![image](https://user-images.githubusercontent.com/3827781/42135496-d0d72292-7d9f-11e8-89e0-7cfef5a25999.png)\r\n\r\nThen I get this error:\r\n![image](https://user-images.githubusercontent.com/3827781/42135498-e11e63fe-7d9f-11e8-82b1-0ea22881c64f.png)\r\n\r\nThis is so confusing. I follow every steps stated by the react native firebase page and still lead to this error. It looks like the firestore is just undefined. Why is this happening?\r\n\r\n\r\n<!--- Please write your issue here, provide as much detail as you can, code snippets, key files which will help us to debug such as your `Podfile` and/or `app/build.gradle` file). -->\r\n\r\n### Environment\r\n\r\n1. Application Target Platform: \r\niOS\r\n<!--- (e.g. iOS, Android, Both) --->\r\n\r\n2. Development Operating System:\r\nmacOS High Sierra\r\n<!--- (e.g. macOS Sierra, Windows 10) --->\r\n\r\n3. Build Tools:\r\nVS Code\r\n<!--- (Xcode or Android Studio version, iOS or Android SDK version - if relevant) --->\r\n\r\n4. `React Native` version:\r\n\"react-native\": \"^0.55.3\"\r\n<!--- (e.g. 0.52.0) --->\r\n\r\n5. `React Native Firebase` Version:\r\n\"react-native-firebase\": \"^4.1.0\"\r\n<!--- (e.g. 4.3.0) --->\r\n\r\n6. `Firebase` Module:\r\n\r\n  pod 'Firebase/Core', '~> 4.13.0'\r\n\r\n  pod 'Firebase/AdMob'\r\n  pod 'Firebase/Auth'\r\n  pod 'Firebase/Database'\r\n  pod 'Firebase/DynamicLinks'\r\n  pod 'Firebase/Performance'\r\n  pod 'Firebase/Firestore'\r\n  pod 'Firebase/Messaging'\r\n  pod 'Firebase/RemoteConfig'\r\n  pod 'Firebase/Storage'\r\n  \r\n  pod 'Fabric', '~> 1.7.6'\r\n  pod 'Crashlytics', '~> 3.10.1'\r\n\r\n<!--- (e.g. database, auth, messaging, analytics etc - or N/A if not applicable) --->\r\n\r\n7. Are you using `typescript`? \r\nno\r\n<!--- yes/no --->\r\n\r\n\r\n---\r\nLoving `react-native-firebase`? Please consider supporting their open collective:\r\n👉  https://opencollective.com/react-native-firebase/donate -->\r\n"},"comment":{"url":"https://api.github.com/repos/invertase/react-native-firebase/issues/comments/401617032","html_url":"https://github.com/invertase/react-native-firebase/issues/1263#issuecomment-401617032","issue_url":"https://api.github.com/repos/invertase/react-native-firebase/issues/1263","id":401617032,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMTYxNzAzMg==","user":{"login":"Ehesp","id":842078,"node_id":"MDQ6VXNlcjg0MjA3OA==","avatar_url":"https://avatars3.githubusercontent.com/u/842078?v=4","gravatar_id":"","url":"https://api.github.com/users/Ehesp","html_url":"https://github.com/Ehesp","followers_url":"https://api.github.com/users/Ehesp/followers","following_url":"https://api.github.com/users/Ehesp/following{/other_user}","gists_url":"https://api.github.com/users/Ehesp/gists{/gist_id}","starred_url":"https://api.github.com/users/Ehesp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ehesp/subscriptions","organizations_url":"https://api.github.com/users/Ehesp/orgs","repos_url":"https://api.github.com/users/Ehesp/repos","events_url":"https://api.github.com/users/Ehesp/events{/privacy}","received_events_url":"https://api.github.com/users/Ehesp/received_events","type":"User","site_admin":false},"created_at":"2018-07-01T16:21:42Z","updated_at":"2018-07-01T16:21:42Z","author_association":"MEMBER","body":"As per the [docs](https://rnfirebase.io/docs/v4.2.x/firestore/reference/firestore#collection) and web SDK, you need to call firestore which provides access to the methods:\r\n\r\n```js\r\nimport firebase from 'react-native-firebase';\r\n\r\n...\r\n\r\nfirebase.firestore().collection(\"products\")\r\n```"}}
{"actor":{"display_login":"Ehesp"}}