mikhael28/paretOS

Bug: Daily Achievement Proof does not upload to S3 Bucket - "Error: Region is missing"

Closed this issue · 1 comments

Description

When a user attempts to submit proof of a daily achievement, they receive an alert that "region is missing" and are unable to upload photo evidence of their proof.

Screen Shot 2022-03-18 at 3 49 50 PM

This appears to be related to missing or incorrect settings in the Storage.put() method of the uploadToS3 function.

Steps to Reproduce

  1. Navigate to or create an active sprint
  2. Click the "submit work" button on one of the Daily Achievements
  3. Select an image file to upload as 'proof' of completing the achievement
  4. Dismiss any error notifications and click "Submit Proof"

Expected behavior:

When the user selects an image file, they should receive a toast notification indicating that the image uploaded successfully. After clicking "submit proof", the achievement should then be visible under "Finished Achievements" and clicking on "Press to See Proof" should allow the user to view the proof that they submitted.
Screen Shot 2022-03-18 at 4 44 22 PM

Actual behavior

The user receives an error notice that "Region is missing." They are able to click the "Submit Proof" button and their achievement appears under "Finished Achievements", but the achievement indicates that no proof was submitted.
Screen Shot 2022-03-18 at 4 34 51 PM

Reproduces how often

100%

Additional Information

You might encounter additional S3- and Amplify-related errors/bugs in the 'Submit proof' workflow after resolving this issue. However, for this PR it will be sufficient just to resolve the "Region missing" error, we can address any other bugs later in separate issues!

@jayeclark pinning this issue - great example of how to write a world-class ticket!