adriancarriger / angularfire2-offline

🔌 A simple wrapper for AngularFire2 to read and write to Firebase while offline, even after a complete refresh.
https://angularfire2-offline.firebaseapp.com/
MIT License
207 stars 48 forks source link

hanging after Uncaught (in promise): Error: PERMISSION_DENIED: Permission denied Error: #80

Open warphick opened 7 years ago

warphick commented 7 years ago

Hi,

When attempting to update a database element, I get the above error. The error is correct in that the update fails the validation that has been set in the firebase rules, which prevents updates unless the item's timestamps follows a certain rule.

The failed write, though, hangs the app. I have tried putting a 'reset' to recover but no success: const promise = this.afoDatabase.object(this.path).update(self); promise.then(() => { console.log('data saved to Firebase!') }, (error) => { debugger; this.afoDatabase.reset(); } );

Page reloads trigger from the write is tried encounter the same error.

Is this an issue with library or my implementation?

thanks!