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-01-20] Cannot read property 'length' of undefined in ReportUtils getIcon #14019

Closed
luacmartins opened this issue Jan 5, 2023 · 12 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Internal Requires API changes or must be handled by Expensify staff Reviewing Has a PR in review

Comments

@luacmartins
Copy link
Contributor

luacmartins commented Jan 5, 2023

Problem

I believe this issue was introduced in this PR. From the Crashlytics crash report:


> new.expensify@1.2.48-2 symbolicate:android
> npx metro-symbolicate android/app/build/generated/sourcemaps/react/release/index.android.bundle.map

Non-fatal Exception: io.invertase.firebase.crashlytics.JavaScriptError: Cannot read property 'length' of undefined
       at .getIcons(address at /home/runner/work/App/App/src/libs/ReportUtils.js:474:getIcons)
       at .render(address at /home/runner/work/App/App/src/pages/ReportDetailsPage.js:123:render)
       at .finishClassComponent(address at /home/runner/work/App/App/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:4692:finishClassComponent)
       at .updateClassComponent(address at /home/runner/work/App/App/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:4663:updateClassComponent)
       at .beginWork$1(address at /home/runner/work/App/App/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:7837:beginWork$1)
       at .performUnitOfWork(address at /home/runner/work/App/App/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:7278:performUnitOfWork)
       at .workLoopSync(address at /home/runner/work/App/App/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:7271:workLoopSync)
       at .renderRootSync(address at /home/runner/work/App/App/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:7253:renderRootSync)
       at .performSyncWorkOnRoot(address at /home/runner/work/App/App/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:6948:performSyncWorkOnRoot)
       at .flushSyncCallbacks(address at /home/runner/work/App/App/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:2145:flushSyncCallbacks)
       at .scheduleUpdateOnFiber(address at /home/runner/work/App/App/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:6602:scheduleUpdateOnFiber)
       at .enqueueSetState(address at /home/runner/work/App/App/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:2590:classComponentUpdater.enqueueSetState)
       at .anonymous(address at /home/runner/work/App/App/node_modules/react/cjs/react.production.min.js:12:E.prototype.setState)
       at .setWithOnyxState(address at /home/runner/work/App/App/node_modules/react-native-onyx/lib/withOnyx.js:103:setWithOnyxState)
       at .sendDataToConnection(address at /home/runner/work/App/App/node_modules/react-native-onyx/lib/Onyx.js:592:sendDataToConnection)
       at .anonymous(address at /home/runner/work/App/App/node_modules/react-native-onyx/lib/Onyx.js:642:Promise.all.then.then$argument_0)
       at .tryCallOne(null:null:null)
       at .anonymous(null:null:null)
       at .anonymous(address at /home/runner/work/App/App/node_modules/react-native/Libraries/Core/Timers/JSTimers.js:248:_allocateCallback$argument_0)
       at ._callTimer(address at /home/runner/work/App/App/node_modules/react-native/Libraries/Core/Timers/JSTimers.js:112:_callTimer)
       at ._callReactNativeMicrotasksPass(address at /home/runner/work/App/App/node_modules/react-native/Libraries/Core/Timers/JSTimers.js:162:_callReactNativeMicrotasksPass)
       at .callReactNativeMicrotasks(address at /home/runner/work/App/App/node_modules/react-native/Libraries/Core/Timers/JSTimers.js:413:callReactNativeMicrotasks)
       at .__callReactNativeMicrotasks(address at /home/runner/work/App/App/node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:390:__callReactNativeMicrotasks)
       at .anonymous(address at /home/runner/work/App/App/node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:132:__guard$argument_0)
       at .__guard(address at /home/runner/work/App/App/node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:367:__guard)
       at .flushedQueue(address at /home/runner/work/App/App/node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:131:flushedQueue)
       at .callFunctionReturnFlushedQueue(address at /home/runner/work/App/App/node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:116:callFunctionReturnFlushedQueue)

Why is this important

It can crash the app and lead to unexpected behavior

Solution

Check if participants exists.

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0173d7bfb058627d0a
  • Upwork Job ID: 1612491915725602816
  • Last Price Increase: 2023-01-09
@luacmartins luacmartins added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jan 5, 2023
@luacmartins luacmartins self-assigned this Jan 5, 2023
@melvin-bot melvin-bot bot locked and limited conversation to collaborators Jan 5, 2023
@luacmartins luacmartins added the Reviewing Has a PR in review label Jan 5, 2023
@luacmartins luacmartins added the Internal Requires API changes or must be handled by Expensify staff label Jan 9, 2023
@melvin-bot melvin-bot bot unlocked this conversation Jan 9, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jan 9, 2023

Job added to Upwork: https://www.upwork.com/jobs/~0173d7bfb058627d0a

@melvin-bot
Copy link

melvin-bot bot commented Jan 9, 2023

Triggered auto assignment to Contributor Plus for review of internal employee PR - @Santhosh-Sellavel (Internal)

@luacmartins
Copy link
Contributor Author

PR here. @rushatgabhane I'm swapping you with @sobitneupane since he already reviewed the PR.

@melvin-bot
Copy link

melvin-bot bot commented Jan 16, 2023

@CortneyOfstad, @luacmartins, @sobitneupane Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@sobitneupane
Copy link
Contributor

PR deployed to Production on 13th Jan.
Screenshot 2023-01-17 at 09 22 22

@luacmartins luacmartins changed the title Cannot read property 'length' of undefined in ReportUtils getIcon [HOLD for payment 2023-01-20] Cannot read property 'length' of undefined in ReportUtils getIcon Jan 17, 2023
@luacmartins
Copy link
Contributor Author

Updated the title to reflect the pay due date

@CortneyOfstad
Copy link
Contributor

@luacmartins Is this ready for payment? I just want to confirm, and the only one receiving payment is @sobitneupane, correct? And if so, is this $250 or $1000? No price point is listed in the title. TIA!

@luacmartins
Copy link
Contributor Author

@CortneyOfstad correct, this is ready to be paid and that'd be $1000 to @sobitneupane for the PR review!

@CortneyOfstad
Copy link
Contributor

Thank you! Sending over the contract now and will pay it ASAP once it is accepted!

@CortneyOfstad
Copy link
Contributor

@sobitneupane contract has been sent over!

@sobitneupane
Copy link
Contributor

@CortneyOfstad Thanks. Accepted the offer.

@CortneyOfstad
Copy link
Contributor

Paid! Thank you!!

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. Daily KSv2 Internal Requires API changes or must be handled by Expensify staff Reviewing Has a PR in review
Projects
None yet
Development

No branches or pull requests

4 participants