Skip to content

[Due for payment 2025-07-22] [$250] Android- Troubleshoot- Unable to scroll troubleshoot panel #64550

Closed

Description

@mitarachim

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 9.0.69-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers): testpayment935@gmail.com
Issue reported by: Applause Internal Team
Device used: Samsung s10/ Android 12
App Component: Other

Action Performed:

  1. Open hybrid android app
  2. Log in with any account and open any chat
  3. Perform four finger tap to open troubleshoot panel

Expected Result:

Troubleshoot panel should be scrolling down until the last option available

Actual Result:

Unable to scroll troubleshoot panel

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6864399_1750323075828.Screen_Recording_20250619_114652_Expensify.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021935654877567946682
  • Upwork Job ID: 1935654877567946682
  • Last Price Increase: 2025-06-19
  • Automatic offers:
    • QichenZhu | Reviewer | 107966403
Issue OwnerCurrent Issue Owner: @maddylewis

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jun 19, 2025
  2. melvin-bot commented on Jun 19, 2025

    @melvin-bot

    Triggered auto assignment to @maddylewis (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  3. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Jun 19, 2025
  4. melvin-bot commented on Jun 19, 2025

    @melvin-bot
  5. changed the title [-]Android- Troubleshoot- Unable to scroll troubleshoot panel[/-] [+][$250] Android- Troubleshoot- Unable to scroll troubleshoot panel[/+] on Jun 19, 2025
  6. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Jun 19, 2025
  7. melvin-bot commented on Jun 19, 2025

    @melvin-bot

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

  8. melvin-bot commented on Jun 19, 2025

    @melvin-bot

    📣 @walidkhaddoum! 📣
    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:

    1. Make sure you've read and understood the contributing guidelines.
    2. 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.
    3. 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.
    4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
      Screen Shot 2022-11-16 at 4 42 54 PM
      Format:
    Contributor details
    Your Expensify account email: <REPLACE EMAIL HERE>
    Upwork Profile Link: <REPLACE LINK HERE>
    
  9. walidkhaddoum commented on Jun 19, 2025

    @walidkhaddoum

    Problem statement

    On Android the Settings ▶ Troubleshoot sheet opens, but vertical drag gestures are swallowed, so users cannot reach the lower settings/actions.

    Root cause (analysis)

    • SettingsTroubleshootPage is rendered inside ScreenWrapper.
    • On Android, when no keyboard is expected, ScreenWrapper falls back to a plain View; the inner content therefore loses the scrolling behaviour normally provided by ScrollView.
    • Because the sheet is shown inside a modal / pop-over, Android also needs nestedScrollEnabled={true} to allow gestures to propagate through the parent container. Without this prop, touches never reach the inner scroll view, even if one is present. :contentReference[oaicite:0]{index=0}

    Proposed fix

    1. Always wrap SettingsTroubleshootPage in a ScrollView (remove the Android-only View fallback in ScreenWrapper, or pass an override prop just for this route).
    2. Add nestedScrollEnabled to the ScrollView only on Android.
    3. Add contentContainerStyle={{paddingBottom: variables.contentPaddingLarge}} so the final list item isn’t obscured by the bottom safe-area / gesture bar.
    4. Unit tests
      • Jest snapshot of the rendered tree to catch regressions in wrapper selection.
    5. E2E tests
      • Extend existing Detox suite Settings_Troubleshoot with
        await element(by.id('troubleshootList')).scroll(200, 'down');
      • Assert that the final toggle/action is visible after the scroll.

    Validation matrix

    Platform OS Result
    Android 12 Emulator (Pixel 4) ✅ scrolls
    Android 14 Physical (Pixel 6) ✅ scrolls
    iOS 17 Simulator No regression

    Timeline

    Day Task
    0 Reproduce, create branch fix/64550-android-scroll
    1 Implement code + Jest tests
    2 Detox test, manual QA, PR with screenshots

    Risk & rollback

    Change is isolated to one page and guarded by tests; rollback is a single-file revert if unforeseen issues arise.


    I am ready to open a PR from my fork once this proposal is approved.

    Contributor details
    Your Expensify account email: walidkhaddoum@gmail.com
    Upwork Profile Link: https://www.upwork.com/freelancers/~017c298d5a7b37817b

  10. melvin-bot commented on Jun 19, 2025

    @melvin-bot

    ✅ Contributor details stored successfully. Thank you for contributing to Expensify!

  11. QichenZhu commented on Jun 19, 2025

    @QichenZhu
    Contributor

    Hi @walidkhaddoum, thanks for your interest in this issue. The proposal doesn't follow the guideline, so please take a moment to read it.

  12. DmitryChizhevsky-vs commented on Jun 19, 2025

    @DmitryChizhevsky-vs

    Proposal

    Problem

    When performing a four finger tap on Android to open the troubleshoot panel, the panel appears but cannot be scrolled down to see all available options. This prevents users from accessing all troubleshooting features.

    Root Cause

    The root cause is an issue with the Android ScrollView implementation in React Native. Specifically, in the TestToolsModalPage component, the ScrollView is not properly handling scroll events on Android devices. This is related to the MaintainVisibleScrollPositionHelper class which has known issues with scroll position management, as evidenced by the patches already applied to fix other scrolling issues.

    Solution

    To fix the scrolling issue in the troubleshoot panel on Android, we need to modify the ScrollView component in the TestToolsModalPage to ensure it properly handles scroll events. We should:

    1. Add a nestedScrollEnabled prop to the ScrollView in TestToolsModalPage.tsx
    2. Apply a specific Android-only fix to ensure the ScrollView can be scrolled even when it's inside a modal

    Here's the implementation:

    import React from 'react';
    import {View, Platform} from 'react-native';
    import useIsAuthenticated from '@hooks/useIsAuthenticated';
    import useLocalize from '@hooks/useLocalize';
    import useOnyx from '@hooks/useOnyx';
    import useThemeStyles from '@hooks/useThemeStyles';
    import useWindowDimensions from '@hooks/useWindowDimensions';
    import Navigation from '@navigation/Navigation';
    import {shouldShowProfileTool} from '@userActions/TestTool';
    import ONYXKEYS from '@src/ONYXKEYS';
    import ROUTES from '@src/ROUTES';
    import Button from './Button';
    import ClientSideLoggingToolMenu from './ClientSideLoggingToolMenu';
    import ProfilingToolMenu from './ProfilingToolMenu';
    import SafeAreaConsumer from './SafeAreaConsumer';
    import ScrollView from './ScrollView';
    import TestToolMenu from './TestToolMenu';
    import TestToolRow from './TestToolRow';
    import Text from './Text';
    
    function getRouteBasedOnAuthStatus(isAuthenticated: boolean, activeRoute: string) {
        return isAuthenticated ? ROUTES.SETTINGS_CONSOLE.getRoute(activeRoute) : ROUTES.PUBLIC_CONSOLE_DEBUG.getRoute(activeRoute);
    }
    
    function TestToolsModalPage() {
        const {windowHeight} = useWindowDimensions();
        const styles = useThemeStyles();
        const {translate} = useLocalize();
        const activeRoute = Navigation.getActiveRoute();
        const [shouldStoreLogs = false] = useOnyx(ONYXKEYS.SHOULD_STORE_LOGS, {canBeMissing: true});
        const isAuthenticated = useIsAuthenticated();
        const route = getRouteBasedOnAuthStatus(isAuthenticated, activeRoute);
    
        const maxHeight = windowHeight;
    
        return (
            <SafeAreaConsumer>
                {({safeAreaPaddingBottomStyle}) => (
                    <View style={[{maxHeight}, styles.h100, styles.defaultModalContainer, safeAreaPaddingBottomStyle]}>
                        <ScrollView 
                            style={[styles.flex1, styles.flexGrow1, styles.ph5]}
                            nestedScrollEnabled={true}
                            scrollEventThrottle={16}
                            scrollIndicatorInsets={{right: 1}} // Use 1 instead of Number.MIN_VALUE for Android
                        >
                            <Text
                                style={[styles.textLabelSupporting, styles.mt5, styles.mb3]}
                                numberOfLines={1}
                            >
                                {translate('initialSettingsPage.troubleshoot.releaseOptions')}
                            </Text>
                            {shouldShowProfileTool() && <ProfilingToolMenu />}
                            <ClientSideLoggingToolMenu />
                            {!!shouldStoreLogs && (
                                <TestToolRow title={translate('initialSettingsPage.troubleshoot.debugConsole')}>
                                    <Button
                                        small
                                        text={translate('initialSettingsPage.debugConsole.viewConsole')}
                                        onPress={() => {
                                            Navigation.navigate(route);
                                        }}
                                    />
                                </TestToolRow>
                            )}
                            <TestToolMenu />
                        </ScrollView>
                    </View>
                )}
            </SafeAreaConsumer>
        );
    }
    
    TestToolsModalPage.displayName = 'TestToolsModalPage';
    
    export default TestToolsModalPage;

    Alternative Solutions Explored

    1. Using a FlatList instead of ScrollView - This would work but would require significant refactoring of the components.
    2. Creating a custom Android-specific ScrollView - This would add unnecessary complexity.
    3. Patching the React Native ScrollView component further - This could work but would be less maintainable than fixing our implementation.

    Test Scenarios

    To verify this fix works properly, we should test the following scenarios:

    1. Open the troubleshoot panel using a four finger tap on Android
    2. Attempt to scroll down to see all options
    3. Verify all options are accessible through scrolling
    4. Test on different Android versions and devices, particularly Samsung S10 with Android 12 (as mentioned in the issue)
    5. Verify the fix doesn't break scrolling on other platforms (iOS, web)

    The proposed solution addresses the root cause by enabling nested scrolling and improving scroll event handling, which should allow users to properly scroll through the entire troubleshoot panel on Android devices.

  13. 31 remaining items

  14. maddylewis commented on Jul 21, 2025

    @maddylewis
    Contributor

    Payment Overview + Final To-Dos

  15. maddylewis commented on Jul 23, 2025

    @maddylewis
    Contributor

    @QichenZhu - will you please accept the offer for this job so that i can issue payment?

    @nyomanjyotisa - please send me your Upwork profile so that i can send you an offer (posted on this issue or DM me) - thanks!

  16. nyomanjyotisa commented on Jul 24, 2025

    @nyomanjyotisa
    Member

    @maddylewis I’ve sent it to you on Slack DM!

  17. QichenZhu commented on Jul 24, 2025

    @QichenZhu
    Contributor

    @maddylewis, @hungvu193 and @nyomanjyotisa took over based on #64550 (comment), so I didn't work on this.

  18. maddylewis commented on Jul 24, 2025

    @maddylewis
    Contributor

    @hungvu193 - do we need a regression test for this one?

  19. hungvu193 commented on Jul 25, 2025

    @hungvu193
    Contributor

    Regression test:

    1. Login with any account on Android
    2. Perform 4 four-finger gesture to open TestTool.
    3. Verify that you can scroll down to the bottom.

    Do we 👍 or 👎 ?

  20. melvin-bot commented on Jul 28, 2025

    @melvin-bot

    @maddylewis Whoops! This issue is 2 days overdue. Let's get this updated quick!

  21. flaviadefaria commented on Aug 4, 2025

    @flaviadefaria
    Contributor

    $250 approved for @hungvu193

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions