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

[Hold for Payment 2023-12-21][$1000] IOS - Permission popup indicates wrong message #23421

Closed
1 of 6 tasks
kbecciv opened this issue Jul 23, 2023 · 124 comments
Closed
1 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Waiting for copy User facing verbiage needs polishing Weekly KSv2

Comments

@kbecciv
Copy link

kbecciv commented Jul 23, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

Action Performed:
Go to phone settings Turn off Microphone permission.

  • Go to New Expensify App
  1. Go to setting
  2. Go to any workspace
  3. Setup Bank account
  4. On last step click Save & continue

Expected Result:

It should show Alert for Microphone permission.

Actual Result:

t shows Camera permission alert instead of microphone permission

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.42-26
Reproducible in staging?: n/a
Reproducible in production?: n/a
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation

RPReplay_Final1689943670.mp4

Expensify/Expensify Issue URL:
Issue reported by: @DinalJivani
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1689948082634299

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01479aaf3e91037a82
  • Upwork Job ID: 1683857056510726144
  • Last Price Increase: 2023-08-08
  • Automatic offers:
    • situchan | Contributor | 26071892
    • DinalJivani | Reporter | 26071895
    • ishpaul777 | Contributor | 27357555
@kbecciv kbecciv added Daily KSv2 Needs Reproduction Reproducible steps needed Bug Something is broken. Auto assigns a BugZero manager. labels Jul 23, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 23, 2023

Triggered auto assignment to @zanyrenney (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot
Copy link

melvin-bot bot commented Jul 23, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@DinalJivani
Copy link

Here's the video for detailed steps for reproduction:

WhatsApp.Video.2023-07-24.at.3.26.51.PM.mp4

@zanyrenney
Copy link
Contributor

We should have this error message:
image

@zanyrenney zanyrenney added the External Added to denote the issue can be worked on by a contributor label Jul 25, 2023
@melvin-bot melvin-bot bot changed the title IOS - Permission popup indicates wrong message [$1000] IOS - Permission popup indicates wrong message Jul 25, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 25, 2023

Job added to Upwork: https://www.upwork.com/jobs/~01479aaf3e91037a82

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 25, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 25, 2023

Current assignee @zanyrenney is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented Jul 25, 2023

Triggered auto assignment to Contributor-plus team member for initial proposal review - @0xmiroslav (External)

@shubham1206agra
Copy link
Contributor

shubham1206agra commented Jul 25, 2023

Proposal

Please re-state the problem that we are trying to solve in this issue.

IOS - Permission popup indicates the wrong message

What is the root cause of that problem?

In

if (_.contains([CONST.ONFIDO.ERROR.USER_CAMERA_PERMISSION, CONST.ONFIDO.ERROR.USER_CAMERA_DENINED, CONST.ONFIDO.ERROR.USER_CAMERA_CONSENT_DENIED], errorMessage)) {
Alert.alert(
this.props.translate('onfidoStep.cameraPermissionsNotGranted'),
this.props.translate('onfidoStep.cameraRequestMessage'),

When the permission got failed for the microphone, this code is triggered, which pops up the alert modal, which has the message as the following.

App/src/languages/en.js

Lines 928 to 929 in 74ae95c

cameraPermissionsNotGranted: 'Camera permissions not granted',
cameraRequestMessage: 'You have not granted us camera access. We need access to complete verification.',

What changes do you think we should make in order to solve the problem?

Change the message to

cameraPermissionsNotGranted: 'Camera / Microphone permissions not granted',
cameraRequestMessage: 'You have not granted us either camera or microphone access. We need access to both for complete verification.',

And similar message for other languages

Alternative Solutions

May want to shift towards OnfidoCaptureType.MOTION instead of VIDEO. (Maybe it's in the territory of feature request).
DOCS: https://github.com/onfido/react-native-sdk#1-creating-the-sdk-configuration

@ishpaul777
Copy link
Contributor

ishpaul777 commented Jul 25, 2023

Proposal

Problem

IOS - Permission popup indicates wrong message when asking for permission for microphone, instead of requesting for microphone it asks for camera permission

Root cause

Here we are checking for camera permission and based on that we are showing the popup message, microphone permission is not handled so even if errorMessage is for microphone permission it will show the popup message for camera permission because of this condition CONST.ONFIDO.ERROR.USER_CAMERA_DENINED is genric error message triggering alert with camera permission request.

if (_.contains([CONST.ONFIDO.ERROR.USER_CAMERA_PERMISSION, CONST.ONFIDO.ERROR.USER_CAMERA_DENINED, CONST.ONFIDO.ERROR.USER_CAMERA_CONSENT_DENIED], errorMessage)) {
	Alert.alert(
		......

Changes

  1. we need to add/modify constants in CONST.ONFIDO.ERROR

ref - https://github.com/onfido/onfido-ios-sdk/blob/master/README.md#response-handler-errors

USER_CAMERA_DENINED: 'Onfido.OnfidoFlowError.cameraPermission', // before "Onfido.OnfidoFlowError"
USER_MICROPHONE_PERMISSION: 'Encountered an error: microphonePermission',
USER_MICROPHONE_DENINED: 'Onfido.OnfidoFlowError.microphonePermission',
  1. check for camera and microphone permission, so we need check for microphone and camera permission seperately
// Replace the previous condition that checks for camera permission with separate checks for camera and microphone permissions.
if (_.contains([CONST.USER_CAMERA_PERMISSION, CONST.USER_CAMERA_DENIED], errorMessage)) {
	// Alert for camera permission
} else if (_.contains([CONST.USER_MICROPHONE_PERMISSION, CONST.USER_MICROPHONE_DENIED], errorMessage)) {
	// Alert with desired translated message for microphone permission (Add the phrase keys to the translation file)
}
  1. since the CONST.ONFIDO.ERROR.USER_CAMERA_CONSENT_DENIED is edge case and same error message for both camera and microphone permission, we should discuss a alternative behaviour for this case. (like exit the flow or show a generic error message "Something went wrong, please try again")

Alternatively

If we can check whether we have microphone and camera permission programatically. We can show the popup message for microphone/camera permission based on that. With my research I found that we can check for permissions in android. I am not sure whether we can check for permissions in IOS within React Native.
we are using react-native-permissions package already we can check for permission using the check method to check if we have permission for microphone and camera so we dont have to rely on permission error messages coming from onfido

@melvin-bot melvin-bot bot added the Overdue label Jul 27, 2023
@zanyrenney
Copy link
Contributor

@0xmiroslav any thoughts on these proposals, please?

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Jul 28, 2023
@zanyrenney
Copy link
Contributor

bump @0xmiroslav ? please can you take a look!

@melvin-bot melvin-bot bot removed the Overdue label Jul 31, 2023
@0xmiros
Copy link
Contributor

0xmiros commented Jul 31, 2023

@zanyrenney I think we should confirm copy for microphone permission denied message. Both English and Spanish. Should we add Waiting for copy label?

@melvin-bot
Copy link

melvin-bot bot commented Aug 1, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@zanyrenney
Copy link
Contributor

Hey @0xmiroslav - I agree with Spanish, but why can't we use the same copy as the screenshot provided here? Let me know your thoughts!

@zanyrenney
Copy link
Contributor

Heading ooo we're still debating the copy here and if we need to add the waiting for copy label / get this translated in spanish! thanks in advance for the help moving this along BZ team!

@zanyrenney zanyrenney removed the Bug Something is broken. Auto assigns a BugZero manager. label Aug 1, 2023
@zanyrenney zanyrenney removed their assignment Aug 1, 2023
@zanyrenney zanyrenney added the Bug Something is broken. Auto assigns a BugZero manager. label Aug 1, 2023
@chiragsalian
Copy link
Contributor

but similar in both ios and android

Yup. that sounds good to me.

If agreed We can make this change specific to ios only like this

That code block looks good to me.

@ishpaul777
Copy link
Contributor

ishpaul777 commented Nov 9, 2023

Camera Microphone
Screenshot 2023-11-10 at 2 01 19 AM Screenshot 2023-11-10 at 1 59 42 AM

Do we agree on the copy 👍 or 👎, if yes can i get spanish copy here or should i ask for translated copy in slack?

cc @mallenexpensify @chiragsalian @situchan

@mallenexpensify
Copy link
Contributor

Yes, that's looks good to me @ishpaul777

@chiragsalian
Copy link
Contributor

chiragsalian commented Nov 9, 2023

Hmm copy mostly LGTM. This part reads weird to me,

Please enable via Settings..

Shouldn't it instead be

Please enable it via Settings..

or

Please enable access in Settings..

or something similar.
Thoughts @mallenexpensify? Or is the copy fine as is?

@mallenexpensify
Copy link
Contributor

Let's leave the copy as-is, I think it reads well-enough. @ishpaul777 please add a period to the end of each of the sentences, thx.

@chiragsalian
Copy link
Contributor

chiragsalian commented Nov 10, 2023

Cool works for me, i think spanish copy is still needed. I'll ask on slack to translate these,

Enable Camera Access
We need access to your camera to complete bank account verification. Please enable via Settings > New Expensify.

Enable Microphone Access
We need access to your microphone to complete bank account verification. Please enable via Settings > New Expensify.

Asked here

@chiragsalian
Copy link
Contributor

Spanish translations:

Permiso para acceder a la cámara
Necesitamos acceso a tu cámara para completar la verificación de tu cuenta de banco. Por favor habilita los permisos en Configuración > Nuevo Expensify.

Permiso para acceder al micrófono
Necesitamos acceso a tu micrófono para completar la verificación de tu cuenta de banco. Por favor habilita los permisos en Configuración > Nuevo Expensify.

@mallenexpensify
Copy link
Contributor

From the PR, @ishpaul777 will be out a couple days

I apologize for the unexpected turn of events, but I have to travel urgently for the next two days due to an emergency. I will make sure to complete this over the weekend. I sincerely apologize for any inconvenience this delay may cause.

@ishpaul777
Copy link
Contributor

ishpaul777 commented Nov 18, 2023

  • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.

@mallenexpensify for double confirmation of above item in author checklist do we need to capitalize each word in header title as in approved copy?

@mallenexpensify
Copy link
Contributor

Good catch @ishpaul777 , I believe we recently made a change for capitalization . Please have the titles be

  • Enable camera access
  • Enable microphone access

Copy link

melvin-bot bot commented Nov 21, 2023

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@situchan
Copy link
Contributor

PR not merged yet. False alarm

@melvin-bot melvin-bot bot added Monthly KSv2 and removed Weekly KSv2 labels Dec 15, 2023
Copy link

melvin-bot bot commented Dec 15, 2023

This issue has not been updated in over 15 days. @chiragsalian, @mallenexpensify, @zanyrenney, @ishpaul777, @situchan eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

@ishpaul777
Copy link
Contributor

PR deployed yesterday, looks like automation failed. @mallenexpensify can you please switch label to weekly again

@mallenexpensify mallenexpensify added Weekly KSv2 and removed Monthly KSv2 labels Dec 18, 2023
@mallenexpensify mallenexpensify changed the title [$1000] IOS - Permission popup indicates wrong message [Hold for Payment 2023-12-21][$1000] IOS - Permission popup indicates wrong message Dec 18, 2023
@mallenexpensify
Copy link
Contributor

PR deployed to production 4 days ago, updated title to reflect payment is due the 21st. Updated to Weekly too.

@situchan
Copy link
Contributor

BZ Checklist:
No regression but incorrectly implemented from the beginning.
I don't think this is worth adding to regression test suite

@mallenexpensify
Copy link
Contributor

mallenexpensify commented Dec 21, 2023

Reporter: @DinalJivani paid $250 via Upwork
Contributor: @ishpaul777 paid $500 via Upwork ($1k payment then $500 refund)
Contributor: @allroundexperts due $500 via NewDot
Contributor+: @situchan paid $1000 Upwork. (two $500 payments)

Above is a lil wonky, but, once the $500 refund from @ishpaul777 is confirmed we'll be all set. More context from #23421 (comment) to #23421 (comment)

@situchan , can you please accept the job and reply here once you have?
https://www.upwork.com/jobs/~01adeea47f2373964b

@situchan
Copy link
Contributor

Accepted thanks

@ishpaul777
Copy link
Contributor

Hii @mallenexpensify, can you please pay @allroundexperts 500$ for their help in testing i will refund 500$ if you have paid to me already

@situchan
Copy link
Contributor

@mallenexpensify please check the compensation discussion from here to here

@mallenexpensify
Copy link
Contributor

updated payment post above
Once I confirm @ishpaul777 's refund I'll close (and after double checking if we need/want a regression test for this).

@ishpaul777
Copy link
Contributor

Refunded, @mallenexpensify can you please check and confirm..

@mallenexpensify
Copy link
Contributor

mallenexpensify commented Dec 23, 2023

Thanks @ishpaul777 , confirming.
image

I'm going to agree with you that we don't need a regression test @situchan cuz someone would have to manually go in and change the code from Mic > Camera which I can't see that ever happening.

Payment breakdown above is updated.

@JmillsExpensify
Copy link

$500 payment to @allroundexperts based on this comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Waiting for copy User facing verbiage needs polishing Weekly KSv2
Projects
None yet
Development

No branches or pull requests