Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

[FxA] if you login without ever having uploaded a shot, My Shots fails #5184

Closed
ianb opened this issue Nov 15, 2018 · 5 comments
Closed

[FxA] if you login without ever having uploaded a shot, My Shots fails #5184

ianb opened this issue Nov 15, 2018 · 5 comments
Assignees

Comments

@ianb
Copy link
Contributor

ianb commented Nov 15, 2018

For instance, log into https://screenshots.stage.mozaws.net (where you probably haven't uploaded anything) and go to My Shots, and it'll fail. In the logs it will show a parse error (related to #5183)

This is because you've never registered any device with that accountId, and so the query for all related devices returns [].

I'm not sure if we should return [] from Shot.getShotsForDevice in this case (which would be reasonable), or if we should raise an exception. We might want different messaging for this case, in which case an exception would let us distinguish it.

@punamdahiya
Copy link
Contributor

It's easier to replicate issue if one create a new account, go to server site and hit my shots before uploading new shots

@punamdahiya punamdahiya self-assigned this Nov 16, 2018
@ianb ianb closed this as completed in ca76999 Nov 16, 2018
ianb added a commit that referenced this issue Nov 16, 2018
Fixes #5184 - My shots fail if accessed with zero shots and no deviceIds
@SoftVision-CosminMuntean

I have tested this issue and it seems that is still reproducible on Screenshots dev server with newly created FxA accounts if you never used Screenshots.

[Prerequisites]

  • The latest Screenshots dev version is installed.
  • Screenshots was never used and no screenshots were uploaded.

[Steps to reproduce]:

  1. Navigate to https://screenshots.dev.mozaws.net.
  2. Click the "#" button.
  3. Create a new FxA account and activate it.
  4. Navigate to https://screenshots.dev.mozaws.net.
  5. Log in with the newly created FxA account.
  6. Click the "My Shost" button and observe the behavior.

[Expected Results]:

  • You are correctly redirected to "My Shots" page and the "No saved shots. Go on, create some." message is displayed.

[Actual Results]:

  • The loading indicator is displayed and nothing happens.

However, it seems that the behavior is different on Screenshots stage server.
On stage, after you are logged with a newly created account and you click the "My Shots" button, you are correctly redirected to "My Shots" page. But, if you click the "Settings" button, it says that you are not logged in.
Even if you try to log in again, on the "Settings" page appears that you are not logged in. Only after you upload a shot, then you are successfully log in.
Here is a screen recording with the behavior on stage server: https://drive.google.com/open?id=1vTJ298RGeT5U-jxiXtvrYn5aXVmJEbmI

@punamdahiya
Copy link
Contributor

I have tested this issue and it seems that is still reproducible on Screenshots dev server with newly created FxA accounts if you never used Screenshots.

I will look at logs whats different on dev server, this issue should be fixed for both dev and stage

However, it seems that the behavior is different on Screenshots stage server.
On stage, after you are logged with a newly created account and you click the "My Shots" button, you are correctly redirected to "My Shots" page. But, if you click the "Settings" button, it says that you are not logged in.

Logged #5193 to track and fix this issue

Even if you try to log in again, on the "Settings" page appears that you are not logged in. Only after you upload a shot, then you are successfully log in.
Here is a screen recording with the behavior on stage server: https://drive.google.com/open?id=1vTJ298RGeT5U-jxiXtvrYn5aXVmJEbmI

@punamdahiya
Copy link
Contributor

I have tested this issue and it seems that is still reproducible on Screenshots dev server with newly created FxA accounts if you never used Screenshots.

I will look at logs whats different on dev server, this issue should be fixed for both dev and stage

Dev server is still pointing to 36.0.0 https://screenshots.dev.mozaws.net/__version__, fix of this issue should be reflected in 36.1.0

@punamdahiya
Copy link
Contributor

Closing issue as fixed

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants