red-gold / react-social-network

Simple React Social Network
https://medium.com/@qolzam/create-social-network-by-react-js-fe60010a32e6
MIT License
489 stars 485 forks source link

[Improvement] firestore/getUserProviderData document of userProviderRef is not exist #61

Open rakshitmidha opened 6 years ago

rakshitmidha commented 6 years ago

Unhandled Rejection (Error): firestore/getUserProviderData document of userProviderRef is not exist new SocialError src/core/domain/common/socialError.ts:4 1 | export class SocialError extends Error { 2 | private _isError: Boolean 3 |

4 | constructor (private _code: string, private _message: string) { 5 | super(_message) 6 | this._isError = true 7 | }

Qolzam commented 6 years ago

Can you check your project first with default account of firebase which is in repository (test-4515a)? Let me know if you have the error.

laddha-adi commented 5 years ago

Hi! @Qolzam, I got the same error while running the app with my firebase account. Though it works perfectly fine with the default account (test-4515a). Can you please suggest any possible source of this problem or any possible solution. TIA.

Qolzam commented 5 years ago

@laddha-adi thanks for reporting. I have just tried new clone of project with new account of Firebase following The Guid. Project loaded successfully. Please be sure you did all configuration on Firebase following The Guid. If you face with the same issue, please send me the steps in details to reproduce the error.

iamezell commented 5 years ago

I had the same issue it turns out it was because I already had users in the database before so the call to getUserProviderData did not work because the users I had in the database did not go through the proper registration. Once I deleted and registered through the site it worked. May not be your issue but it worked for me :)

Qolzam commented 5 years ago

Thanks for help 😀. I did not notice that. Can you give me more details how you registered the user which that was not proper way? We need to handle this error in better way.

laddha-adi commented 5 years ago

I got the error when I edited the database manually from firebase console. Maybe it is due to some type checking error. I am not sure which, but at least one of the field gave the error when left null.