-
Notifications
You must be signed in to change notification settings - Fork 87
Rated sessions do not display as such when revisited. #1006
Comments
We're aware of this issue. For some reason the session ratings aren't being stored in FB. |
We debugged it and it seems like the backend isn't updating firebase. |
The backend is updating firebase. otherwise, you wouldn't be able to complete steps 1-3. |
Only occurs in prod :/.
|
Sorry for being short at the after party. I meant it works fine in stage. But is only broken in prod. |
So, in other words firebase security rules don't match. Is that what you're saying? |
Alex we need help debugging. Can you take a look? On Sat, May 21, 2016, 1:56 AM alex notifications@github.com wrote:
|
There's not much I see from the backend, just this:
|
@nicolasgarnier can you take a look at the permissions? |
The permissions are the same on prod/dev/stage, I deployed the same rules automatically on stage/prod/dev typically and we deploy the same file. You'll get a permission denied if the session has already marked as reviewed and you try to write to it though, as designed. @crhym3 what were you trying to do when you got the error? Read or Write? Or did you just see this from the logs? |
For now it seems that the data is indeed being written by the backend correctly. Peng you can check if the data is there by using the admin console for the user you are testing with:
If the data is there then this is likely just a UI issue. |
Can you share the Firebase with me or check app.savedSurveys is always empty for me. |
@pengying @nicolasgarnier , nothing is being saved: |
@pengying I shared all the prod DB with you |
I think i found what the issue is: https://io-2016-prod-9.firebaseio.com/data/google:115132759088093329854 Basically it seems the Backend is not writing to the same shard as the frontend. Something must be off in the Shard calculation the backend does. I could check the code if you point me to it. Actually I found it: https://github.com/GoogleChrome/ioweb2016/blob/491d5f92629020b921739ea15a049606a8afacea/backend/survey.go#L67 |
I checked the Go backend code that calculates the shard and it seems correct: https://play.golang.org/p/TQRUZAzvwP => returns 3 (which is good since that gives us shard @pengying can you double check that the UID is passed correctly as a formValue to the backend? with no extra trailing/leading characters etc...? Maybe ideally could you print out the HTTP request done to the server? |
Seems like the UID should always be passed correctly: |
I think I got it: The issue is actually with the Go code and specifically at this line: https://github.com/GoogleChrome/ioweb2016/blob/master/backend/survey.go#L68
should instead be:
You can try this here: https://play.golang.org/p/DD4ZDSHuZO
Basically right now all survey feedback are being written to shard 9 because that's what our sharding function returns for |
We could fix it on the backend but I think it's basically a bit late to do that as we'd loose the data... |
Is the client always going to have access to shard 9? On Tue, May 24, 2016, 6:16 AM Nicolas Garnier notifications@github.com
|
yes we only restrict based on UID in the path which in this case match... |
This isn't huge priority now that IO is over, but that seems like the most logical thing to do atm now that the data is all in that location :\ @pengying if you want to fix this, I'm supportive :) |
Haha. I mean I think we'll reuse the infrastructure for next year right? I think we should fix the backend and push out a version of the front end that looks at shard 9. But as part of the repo we should probably keep the non jacked up versions. |
I like that plan On Wed, May 25, 2016, 1:08 PM Peng Ying notifications@github.com wrote:
|
I suspect that this starts happening when I get a new service worker.
Steps:
I did this on a Nexus 6p, mobile web.
The text was updated successfully, but these errors were encountered: