Back from offline: method does not apply on server side

Hi,

I use Meteor 3-rc1

Situation:

  • The application is offline (no internet connection).
  • The user does an action that call a method X
  • On the client side, the method X is applied
  • On the server side, nothing, the application is waiting to go online.

Back online.

Expected behavior:

  • The method X is performed on the server side.

Current behavior:

  • The method X is not applied on the server side because the user is not loggued

When i look at the DDP exchange, the problem seems that the method X is sent before the method login.

Do i miss something?

It was working on 2.x version.

Thanks.

3 Likes

Could you provide a reproduction of this? Then I can spend some time trying to debug this and see if I find anything…

Hi @denyhs

Please check:

Thanks.

Hi @denyhs

Did you have time to look at it?

Thanks.

Hi @denyhs ,

Is the repository enough to figure out the issue?

Thanks.

Hi, I’m really sorry for the delay in responding to this. I’m adding it to my to-do list and will take some time to look at it between today and tomorrow.

2 Likes

Just an update here: I was able to reproduce the issue and narrow it down. In version 3, the method that sets the userId in the serve is called after the addLink method, but in version 2, it is called before.

So this is in fact a bug.

Now, I’ll take some time to understand why this is happening.

2 Likes

Hi @denyhs

Did you manage to understand the issue? Would fix be in 3.0.0 ?

Thanks

1 Like

Hi! Sorry for the delay here. I investigated this some days ago and was able to identify part of the issue, but I could not solve it.

Today, I gave it another go and could piece everything together. Here is the PR: [Meteor 3] Fix Back from offline: method does not apply on server side by denihs · Pull Request #13221 · meteor/meteor · GitHub.

It should be included in the next release.

1 Like