Skip to content

[HOLD for payment 2023-01-20] Cannot read property 'length' of undefined in ReportUtils getIcon #14019

Closed

Description

@luacmartins

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

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jan 5, 2023
  2. self-assigned this
    on Jan 5, 2023
  3. locked and limited conversation to collaborators on Jan 5, 2023
  4. added
    ReviewingHas a PR in review
    InternalRequires API changes or must be handled by Expensify staff
    on Jan 5, 2023
  5. unlocked this conversation on Jan 9, 2023
  6. melvin-bot commented on Jan 9, 2023

    @melvin-bot
  7. melvin-bot commented on Jan 9, 2023

    @melvin-bot

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

  8. luacmartins commented on Jan 9, 2023

    @luacmartins
    ContributorAuthor

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

  9. melvin-bot commented on Jan 16, 2023

    @melvin-bot

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

  10. sobitneupane commented on Jan 17, 2023

    @sobitneupane
    Contributor

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

  11. 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[/+] on Jan 17, 2023
  12. luacmartins commented on Jan 17, 2023

    @luacmartins
    ContributorAuthor

    Updated the title to reflect the pay due date

  13. CortneyOfstad commented on Jan 23, 2023

    @CortneyOfstad
    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!

  14. luacmartins commented on Jan 23, 2023

    @luacmartins
    ContributorAuthor

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

  15. CortneyOfstad commented on Jan 23, 2023

    @CortneyOfstad
    Contributor

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

  16. CortneyOfstad commented on Jan 23, 2023

    @CortneyOfstad
    Contributor

    @sobitneupane contract has been sent over!

  17. sobitneupane commented on Jan 24, 2023

    @sobitneupane
    Contributor

    @CortneyOfstad Thanks. Accepted the offer.

  18. CortneyOfstad commented on Jan 24, 2023

    @CortneyOfstad
    Contributor

    Paid! Thank you!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2InternalRequires API changes or must be handled by Expensify staffReviewingHas a PR in review

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions