question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Optimistic UI bug when updating user profile

See original GitHub issue

I’ve discovered a bug with optimistic ui when I update the user profile. The update ddp message is sent after the method result message, like in #51. I’ve created a reproduction here: https://github.com/maxnowack/meteor-redisoplog-latencycompensation/tree/user-profile

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:20 (18 by maintainers)

github_iconTop GitHub Comments

1reaction
theodorDiaconucommented, Feb 8, 2018

Nice, few more bugs to go, and maybe ObjectId support, and it’ll be good for launch!

1reaction
theodorDiaconucommented, Jan 11, 2018

It is because Meteor loads accounts-base before redis-oplog, even if you put redis-oplog on top, maybe because of a weird dependency tree? Before actually getting the chance to modify publish, by the time we modify it, the universal publication has already been published.

After digging I found the culprit: https://github.com/rclai/meteor-collection-extensions/blob/master/package.js#L39

We are using: dburles:mongo-collection-instances which users that package above, so we can identify a collection by it’s name. And it has (for an unknown reason still) a weak dependency on accounts-base. Which breaks our oplog, and results into observeChanges the default functionality of publish function, which is caught by our oplog but not via a standard publish/publishWithRedis.

The solution is to find another way to get the collection by it’s name.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tutorial: Speeding up GraphQL Mutations with optimistic UI
We'll take the list view and mutation from part 3, simulate a network latency of 500 milliseconds, and then use store updates and...
Read more >
Optimistic UI updates using helper do not work with queries ...
Bug What is the current behavior? When doing a create mutation, the query is not re run and there are no optimistic UI...
Read more >
Optimistic UI and Clobbering | PostgreSQL, Hasura & GraphQL
This is the clobbering problem with optimistic UI. The Solution. We can solve this problem by checking for stale data before updating the...
Read more >
How to handle conflicting updates of a customer record
Summary: If you don't have much time and resources, use option 1. If resources and time aren't a problem, go for option 3....
Read more >
Web Developer Playbook: Optimistic UI - Xiaoyun Yang
Part 2 looks at some for optimistic UI design patterns ... Suppose the task is to implement optimistic UI for updating the user...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found