Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to add Admin (or non-admin) Profile Picture. #4803

Closed
ShubhadeepKarmakar opened this issue Dec 24, 2022 · 17 comments · Fixed by #5118
Closed

Failed to add Admin (or non-admin) Profile Picture. #4803

ShubhadeepKarmakar opened this issue Dec 24, 2022 · 17 comments · Fixed by #5118
Assignees
Labels
bug End user-perceivable behaviors which are not desirable. Impact: Low Low perceived user impact (e.g. edge cases). Work: Low Solution is clear and broken into good-first-issue-sized chunks.

Comments

@ShubhadeepKarmakar
Copy link
Collaborator

Describe the bug
Whenever I try to change admin profile picture or basically setup, I get redirected to gallery but after selecting approximate picture I go back to the previous section (profile progress activity) but the profile picture is not set.

To Reproduce
Steps to reproduce the behavior:

  1. Go to app drawer.
  2. Click on Admin Profile Picture
  3. Then again click on the profile picture and then click 'Choose From Gallery' option.
  4. Select any image from gallery.
  5. See the error: Admin Profile Picture is not.

Demonstration
https://user-images.githubusercontent.com/99060332/209429780-72e28ad6-7de1-4dd5-9f2a-5dda875cfe9f.mp4
Environment

  • Device being used: Redmi Note pro
  • Android version: Android 11
  • App version: 0.10-beta
@BenHenning
Copy link
Member

Thanks @ShubhadeepKarmakar. This looks closely related to #4806 (and probably has the same root cause).

@nawaz-anwar
Copy link

nawaz-anwar commented Feb 5, 2023

Please assign it to me I know to handle this. Whenever the user tries to change the admin profile picture, the app is redirecting to the gallery, but after selecting an image and returning to the previous section, the profile picture is not set.

@seanlip
Copy link
Member

seanlip commented Feb 5, 2023

@nawaz-anwar Thanks for your interest in this issue. Could you please provide an explanation of what exactly your PR will do (with names of files you're changing, what you plan to change in each file, etc.). If it looks good, we can assign you to this issue.

Thanks!

@nawaz-anwar
Copy link

@seanlip I have gone through the problem-solving process and found a solution that worked. I have documented the solution in the form of a video, which I would like to share with you.

Video Link: https://drive.google.com/file/d/1UQEiJD55ck9Mjl5JJKw0O6miYLfY8ncf/view

@seanlip
Copy link
Member

seanlip commented Feb 6, 2023

@nawaz-anwar I'm not quite sure what app you're using, but the app shown in the video is not the Oppia android app.

@nawaz-anwar
Copy link

nawaz-anwar commented Feb 7, 2023

@seanlip @BenHenning I have successfully resolved the issue with the failed admin profile picture. As shown in the attached video, the problem has been fixed. May I request for a code merge?

Video Link: https://drive.google.com/file/d/1UaXZ61hW-3lGEcSSrqqQNg1mSRPTuSGm/view

@seanlip
Copy link
Member

seanlip commented Feb 7, 2023

Hi @nawaz-anwar -- yup, please go ahead and make a PR. Thanks!

@seanlip
Copy link
Member

seanlip commented Feb 7, 2023

@nawaz-anwar That said -- please make sure to follow the instructions here first, too, otherwise your PR may be closed by Oppiabot: https://github.com/oppia/oppia-android/wiki/Contributing-to-Oppia-android . Thanks!

@nawaz-anwar
Copy link

@nawaz-anwar That said -- please make sure to follow the instructions here first, too, otherwise your PR may be closed by Oppiabot: https://github.com/oppia/oppia-android/wiki/Contributing-to-Oppia-android . Thanks!

Hi @nawaz-anwar -- yup, please go ahead and make a PR. Thanks!

@seanlip When I attempted to create a pull request, I received an error message saying "permission denied".
Screenshot_20230207_191047

@seanlip
Copy link
Member

seanlip commented Feb 7, 2023

Please make sure to follow all the steps on the page I linked you to, from top to bottom.

@nawaz-anwar
Copy link

Please make sure to follow all the steps on the page I linked you to, from top to bottom.

@seanlip Can't create a new pull request: Push failed: remote: Permission to oppia/oppia-android.git denied to nawaz-anwar. unable to access 'https://github.com/oppia/oppia-android.git/': The requested URL returned error: 403

@seanlip
Copy link
Member

seanlip commented Feb 8, 2023

From the docs I linked you, which step exactly are you following and which command are you running when you get the error?

@nawaz-anwar
Copy link

nawaz-anwar commented Feb 8, 2023

@seanlip While pushing my branch using this command " git push --set-upstream origin .

nawaz-anwar added a commit to nawaz-anwar/oppia-android that referenced this issue Feb 8, 2023
@seanlip
Copy link
Member

seanlip commented Feb 12, 2023

@nawaz-anwar I don't see the command you're running in the wiki page: https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR

Could you please point out which step you are following and which instruction in that page doesn't work? If you don't follow these steps but use some other commands, you might run into unexpected issues.

(It might also be better to have this discussion on GitHub Discussions instead if you are running into generic issues with git that aren't related to this issue in particular -- there are more people looking at those boards who can help you faster.)

@BenHenning
Copy link
Member

Per #4906 this will also affect non-admins.

@BenHenning BenHenning changed the title Failed to add Admin Profile Picture. Failed to add Admin (or non-admin) Profile Picture. Mar 24, 2023
@adhiamboperes adhiamboperes added Impact: Low Low perceived user impact (e.g. edge cases). bug End user-perceivable behaviors which are not desirable. Work: Medium The means to find the solution is clear, but it isn't at good-first-issue level yet. labels Jun 15, 2023
@ShubhadeepKarmakar
Copy link
Collaborator Author

ShubhadeepKarmakar commented Aug 5, 2023

Hey @adhiamboperes I have the solution, if you don't work on it, can I be responsible??
Just two lines of codebase changes and things will be fine.

@ShubhadeepKarmakar
Copy link
Collaborator Author

I have made the PR, @adhiamboperes please review it.

adhiamboperes added a commit that referenced this issue Aug 10, 2023
<!-- READ ME FIRST: Please fill in the explanation section below and
check off every point from the Essential Checklist! -->
## Explanation

- Fix #4803 
val galleryIntent = Intent(Intent.ACTION_PICK,
MediaStore.Images.Media.EXTERNAL_CONTENT_URI)
The above code (previous) is the explicit way to get images from gallery
but is not working here. But the updated code below is less explicit but
works fine,
val galleryIntent = Intent(Intent.ACTION_GET_CONTENT).apply { type =
"image/*" }


## Essential Checklist
<!-- Please tick the relevant boxes by putting an "x" in them. -->
- [x] The PR title and explanation each start with "Fix #bugnum: " (If
this PR fixes part of an issue, prefix the title with "Fix part of
#bugnum: ...".)
- [x] Any changes to
[scripts/assets](https://github.com/oppia/oppia-android/tree/develop/scripts/assets)
files have their rationale included in the PR explanation.
- [x] The PR follows the [style
guide](https://github.com/oppia/oppia-android/wiki/Coding-style-guide).
- [x] The PR does not contain any unnecessary code changes from Android
Studio
([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#undo-unnecessary-changes)).
- [x] The PR is made from a branch that's **not** called "develop" and
is up-to-date with "develop".
- [x] The PR is **assigned** to the appropriate reviewers
([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#clarification-regarding-assignees-and-reviewers-section)).

## Screen Recording


https://github.com/oppia/oppia-android/assets/99060332/b6379a06-e3e6-41eb-9bed-de6271dcd346

---------

Co-authored-by: Adhiambo Peres <[email protected]>
@adhiamboperes adhiamboperes added Work: Low Solution is clear and broken into good-first-issue-sized chunks. and removed Work: Medium The means to find the solution is clear, but it isn't at good-first-issue level yet. labels Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug End user-perceivable behaviors which are not desirable. Impact: Low Low perceived user impact (e.g. edge cases). Work: Low Solution is clear and broken into good-first-issue-sized chunks.
Development

Successfully merging a pull request may close this issue.

5 participants