Giter Site home page Giter Site logo

Comments (9)

gurbela avatar gurbela commented on September 27, 2024 1

It will be great if you provide a repro using this template: https://github.com/react-native-community/reproducer-react-native

I have simple scrolling, I use ScrollView, I started scrolling up and down and then the application on Android is crashed,
I using React Native 75.2 version, New architect of react native enabled.

from react-native.

cipolleschi avatar cipolleschi commented on September 27, 2024 1

@gurbela please create a reproducer using this template. We cannot look into issue if they are not created with it.

Also, it is unclear if this is related to The New Architecture or not. We have a template to collect New Architecture issues that should be used if that's the case.

from react-native.

react-native-bot avatar react-native-bot commented on September 27, 2024
⚠️ Missing Reproducible Example
ℹ️ We could not detect a reproducible example in your issue report. Please provide either:
  • If your bug is UI related: a Snack
  • If your bug is build/update related: use our Reproducer Template. A reproducer needs to be in a GitHub repository under your username.

from react-native.

react-native-bot avatar react-native-bot commented on September 27, 2024
⚠️ Missing Reproducible Example
ℹ️ We could not detect a reproducible example in your issue report. Please provide either:

from react-native.

shubhamguptadream11 avatar shubhamguptadream11 commented on September 27, 2024

It will be great if you provide a repro using this template: https://github.com/react-native-community/reproducer-react-native

from react-native.

shubhamguptadream11 avatar shubhamguptadream11 commented on September 27, 2024

@gurbela Not able to repro it on latest version. I am using a scrollView with lots of items.
Can you share your App.tsx file?

from react-native.

gurbela avatar gurbela commented on September 27, 2024

@gurbela Not able to repro it on latest version. I am using a scrollView with lots of items. Can you share your App.tsx file?



import 'react-native-gesture-handler';
import React, { useEffect, useLayoutEffect, } from 'react';
import { Provider } from 'react-redux';
import { PersistGate } from 'redux-persist/lib/integration/react';
import { store, persistor } from 'store';
import { Navigation } from 'navigation';

import { closeToast, openToast, saveToastRef } from 'utils/toast';
import { SafeAreaProvider } from 'react-native-safe-area-context';
import { GestureHandlerRootView } from 'react-native-gesture-handler';
import { ErrorBoundary, Modal, ModalSheet, Toast } from 'components';
import { saveModalRef } from 'utils/modal';

import { LogBox, Platform, StatusBar } from 'react-native';
import { Colors } from 'theme/Variables';
import BootSplash from 'react-native-bootsplash';

import { useIsConnectionAlive } from 'hooks';
import { ApplicationErrorWrapper } from 'components';
import { useGlobalStyles } from 'theme/Global.styles';
import { modalSheetRef } from 'utils/modalSheet';
import { initSentry } from 'utils/sentry';
import { i18nInitializationPromise } from './translations';

LogBox.ignoreAllLogs();

const App = () => {
  const globalStyles = useGlobalStyles();

  useEffect(() => {
    const initializeApp = async () => {
      try {
        await i18nInitializationPromise;
      } catch (error) {
        console.warn('Failed to initialize i18n:', error);
      } finally {
        await BootSplash.hide({ fade: true });
      }
    };

    initializeApp();

    initSentry();

    return () => {
      closeToast();
    };
  }, []);

  //  We set statusbar custom color - only for android on the root level
  //   For IOS, we need to tweak the statusbar, so CustomStatusbar Component was created
  useLayoutEffect(() => {
    StatusBar.setBarStyle('dark-content');
    if (Platform.OS === 'android') {
      StatusBar.setBackgroundColor(Colors.dashboardBackground);
    }
  }, []);

  const { isConnectionAlive } = useIsConnectionAlive();

  useEffect(() => {
    if (!isConnectionAlive) {
      openToast('error.network_error', 'error');
    }

    return () => {
      closeToast();
    };
  }, [isConnectionAlive]);

  return (
    <ErrorBoundary>
      <GestureHandlerRootView style={globalStyles.fill}>
        <SafeAreaProvider>
          <Provider store={store}>
            <PersistGate loading={null} persistor={persistor}>
              <ApplicationErrorWrapper>
                <Navigation />
                <Modal ref={saveModalRef} />
                <ModalSheet ref={modalSheetRef} />
                <Toast ref={saveToastRef} />
              </ApplicationErrorWrapper>
            </PersistGate>
          </Provider>
        </SafeAreaProvider>
      </GestureHandlerRootView>
    </ErrorBoundary>
  );
};

export default App;

from react-native.

shubhamguptadream11 avatar shubhamguptadream11 commented on September 27, 2024

@gurbela Can you narrow down the issue to bare react native project?

from react-native.

gurbela avatar gurbela commented on September 27, 2024

@gurbela Can you narrow down the issue to bare react native project?

  const scrollHandler = useAnimatedScrollHandler({
    onScroll: event => {
      const y = event.contentOffset.y;
      translateY.value = y > 0 ? y : 0;
      scroll.value = y;
      shouldClose.value = y > 0;
    },
  });

<Animated.FlatList
        nestedScrollEnabled
        data={['']}
        ref={sectionListRef}
        refreshControl={<RefreshControl refreshing={refreshing} onRefresh={handleRefresh} />}
        onScroll={scrollHandler}
        contentContainerStyle={styles.sectionListContent}
        showsVerticalScrollIndicator={false}
        renderItem={renderLists}
        maxToRenderPerBatch={1}
        removeClippedSubviews={true}
      />

I'm using scrollHandler, and it causes this error (a crash)

from react-native.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.