Realtime Updates not working
See original GitHub issueIs the RealtimeRouteMixin
working in RC6? I added the Firestore config and a basic layout. I get all data by this.store.findAll('article')
. The current state is loaded and displayed correctly. But when I change something in the Firebase console the data is not updated in the Ember client. with version 2.x and the RTDB this was working.
Is this intended or a bug?
Version info
DEBUG: -------------------------------
DEBUG: Ember : 3.17.0
DEBUG: Ember Data : 3.17.0
DEBUG: EmberFire : 3.0.0-rc.6
DEBUG: Firebase : 7.11.0
DEBUG: -------------------------------
Test case
https://github.com/maximilianmeier/emberfire-dev/tree/fd79dce49ed3d610201e6c5b338b60931a6e2f65
Steps to reproduce
- Check out the commit.
- Add your firebase config
- Add data based on Ember Data models
- Data should load
- Update your data in the Firebase console
- The changes are not shown in the Ember app without reloading
Expected behavior
The Data should update without a manual reload.
Actual behavior
The Data does currently not update without a manual reload.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:8 (1 by maintainers)
Top Results From Across the Web
** Troubleshooting ** "Real time updates are not working ...
Real time updates are not working. Please log in again. Cause. There are several known causes for this problem: Scenario #1 - Network...
Read more >not sure why I'm not receiving realtime updates for a table #1186
I was banging my head against my desk for an hour trying to figure out why it wasn't working, it was returning an...
Read more >On Dashboard Real time updates are not working for...
Hello, On Dashboard Real time updates are not working for database views. And i'm querying on incident_sla table. kindly suggest. Regards,
Read more >Firebase web realtime database not updating - Stack Overflow
A quick simple fix is to flag when you're updating the database: isCreatingUser = true; // Flag that we're creating a user firebase...
Read more >Real Time updates not working - Wisej.com
Real Time updates not working ... I wrote the followng code to update the client every second. This works fine in the window/session...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
So it seems the realtime updates stop working when building the Ember app for production. I guess it might be because the constructor name is then uglified and this code will stop working again. Not really sure how to solve it though, does anyone have any ideas?
EDIT: FOUND IT! 😄 Passing the precious constructor names to uglify to keep them intact, in your
ember-cli-build.js
like this:Hopefully no more hacks will be required. 🤔
It seems that it comes down to the class names of the adapter and the serializer. I changed from
to
And I added this serializer, because there was a crash otherwise when creating records:
The class name
FirestoreSerializer
is important here as well, because it seems to be used within the realtime-listener service.With these changes, everything seems to work as expected. Does it help at all?