You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Hold for payment 7-17][$1000] Web - Console log "Invalid Attempt to destructure non-iterable instance" error when clicking 'Add reaction' icon #21833
BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorReviewingHas a PR in review
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.34.1 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
StyleUtils.getThemeBackgroundColor will be called twice when show popup menu and when show reaction modal.
And the return value of the first call becomes the input of the second call.
The return value of the first call is of the same format as rgb(6, 33, 20).
hexadecimalToRGBArray must return an array of at least three items. If it doesn't, there is no way to convert the result from hexadecimalToRGBArray into values for backgroundRed, backgroundGreen, backgroundBlue.
So the error Invalid attempt to destructure non-iterable instance occurs.
What changes do you think we should make in order to solve the problem?
StyleUtils.getThemeBackgroundColor should return in the form of #062114.
We can add rgbArrayToHexadecimal function which takes rgb array and return hex format color.
And in StyleUtils.getThemeBackgroundColor return hex format color using above function.
What alternative solutions did you explore? (Optional)
Please re-state the problem that we are trying to solve in this issue.
Web - Console log error when clicking 'Add reaction' icon
What is the root cause of that problem?
getThemeBackgroundColor in src/styles/StyleUtils.js is designed to get hexadecimal color. but it sometimes gets rgb color.
At that time, hexadecimalToRGBArray method returns undefined. so this line throws error.
📣 @bhargavagonugunta! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:
Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
changed the title [-]Web - Console log error when clicking 'Add reaction' icon[/-][+][$1000] Web - Console log error when clicking 'Add reaction' icon[/+]on Jun 28, 2023
BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorReviewingHas a PR in review
Activity
melvin-bot commentedon Jun 28, 2023
Triggered auto assignment to @Christinadobrzyn (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Jun 28, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)StevenKKC commentedon Jun 28, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
When clicking 'Add reaction' icon, console log error is shown.
What is the root cause of that problem?
When show modal, status bar color will be set using
StyleUtils.getThemeBackgroundColor.App/src/components/Modal/index.web.js
Lines 27 to 35 in 3dc50e0
StyleUtils.getThemeBackgroundColorwill be called twice when show popup menu and when show reaction modal.And the return value of the first call becomes the input of the second call.
The return value of the first call is of the same format as
rgb(6, 33, 20).App/src/styles/StyleUtils.js
Lines 699 to 710 in 3dc50e0
hexadecimalToRGBArrayfunction can't convert this format and returnundefined.App/src/styles/StyleUtils.js
Lines 396 to 404 in 3dc50e0
hexadecimalToRGBArraymust return an array of at least three items. If it doesn't, there is no way to convert the result fromhexadecimalToRGBArrayinto values forbackgroundRed, backgroundGreen, backgroundBlue.App/src/styles/StyleUtils.js
Line 702 in 3dc50e0
So the error
Invalid attempt to destructure non-iterable instanceoccurs.What changes do you think we should make in order to solve the problem?
StyleUtils.getThemeBackgroundColorshould return in the form of#062114.We can add
rgbArrayToHexadecimalfunction which takesrgbarray and return hex format color.And in
StyleUtils.getThemeBackgroundColorreturn hex format color using above function.What alternative solutions did you explore? (Optional)
None.
jfquevedol2198 commentedon Jun 28, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Web - Console log error when clicking 'Add reaction' icon
What is the root cause of that problem?
getThemeBackgroundColorinsrc/styles/StyleUtils.jsis designed to gethexadecimalcolor. but it sometimes getsrgbcolor.At that time,
hexadecimalToRGBArraymethod returnsundefined. so this line throws error.App/src/styles/StyleUtils.js
Line 701 in 98bb603
What changes do you think we should make in order to solve the problem?
App/src/styles/StyleUtils.js
Line 698 in 98bb603
For the case that
bgColorisrgbcolor, addrgbToArrayfunction to get[r, g, b]]array fromrgbcolorAnd, update
App/src/styles/StyleUtils.js
Line 701 in 98bb603
to
What alternative solutions did you explore? (Optional)
N/A
bhargavagonugunta commentedon Jun 28, 2023
hear check out this hexadecimal values parameters are not hexadecimal

check out the image
melvin-bot commentedon Jun 28, 2023
📣 @bhargavagonugunta! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:
Format:
Christinadobrzyn commentedon Jun 28, 2023
I can reproduce - adding External label
[-]Web - Console log error when clicking 'Add reaction' icon[/-][+][$1000] Web - Console log error when clicking 'Add reaction' icon[/+]melvin-bot commentedon Jun 28, 2023
Job added to Upwork: https://www.upwork.com/jobs/~0177a9790c8518250d
38 remaining items
laurenreidexpensify commentedon Jul 31, 2023
This one fell through the cracks - apols @Natnael-Guchima, we still owe you for reporting bonus.
@Natnael-Guchima payment details are in #23914 and an Upwork offer has been sent
Natnael-Guchima commentedon Jul 31, 2023
No problem @laurenreidexpensify
laurenreidexpensify commentedon Jul 31, 2023
Payment summary
Natnael-Guchima commentedon Jul 31, 2023
@laurenreidexpensify I am not paid yet
Nathan-Mulugeta commentedon Jul 31, 2023
Hey @laurenreidexpensify I think you have paid me on upwork, I think the reporter is @Natnael-Guchima
laurenreidexpensify commentedon Jul 31, 2023
ah yes i just noticed this! Sorry folks Monday brain!! Nat v Nat!!
Natnael-Guchima commentedon Jul 31, 2023
No problem 😁
laurenreidexpensify commentedon Jul 31, 2023
@Natnael-Guchima offer sent in Upwork 😅
Natnael-Guchima commentedon Jul 31, 2023
Accepted the offer. Thanks @laurenreidexpensify 😁
laurenreidexpensify commentedon Jul 31, 2023
Okay we can close now! Correct Nat has been paid!