Giter Club home page Giter Club logo

NSInvalidArgumentException __76-[RCTModalHostViewManager presentModalHostView:withViewController:animated:]_block_invoke.38 Application tried to present modally a view controller <RCTModalHostViewController: 0x7fcf53855110> that is already being presented by <UIViewController: 0x7fcf4791 about react-native HOT 7 OPEN

gkasireddy202 avatar gkasireddy202 commented on June 28, 2024 1
NSInvalidArgumentException __76-[RCTModalHostViewManager presentModalHostView:withViewController:animated:]_block_invoke.38 Application tried to present modally a view controller that is already being presented by from react-native.

Comments (7)

gkasireddy202 avatar gkasireddy202 commented on June 28, 2024 2

Sorry, my team forgot to provide the issue in github repo.

Loginpage.js
import React,{Component} from "react";
import {View,Text,} from 'react-native';
import { CommonActions } from '@react-navigation/native';
class Loginpage extends Component
{

constructor(props) {
    super(props);
    this.state = {
     
    };
  }
handleLogin()
{
    const resetAction =  CommonActions.reset({ index: 0,routes: [ { name: "HomePage" },],})
    this.props.navigation.dispatch(resetAction);
}
render()
{
    return(
    
        <View style={{flex:1,alignItems:'center',justifyContent:'center'}}>
            <Text onPress={()=>this.handleLogin()}>Login</Text>
        </View>
    )
}

}

export default Loginpage;

HomePage.js
import React, { Component } from 'react';
import { View, Text, TouchableOpacity } from 'react-native';
import { CommonActions } from '@react-navigation/native';
import AlertPro from "react-native-alert-pro";
export default class HomePage extends Component {
constructor(props) {
super(props);
this.state = {

};

}

openConfirmationDialog = () => {

this.AlertPro.open();

}

handleLogout() {
const resetAction = CommonActions.reset({
index: 0,
routes: [
{ name:'Loginpage' },
],
})
this.props.navigation.dispatch(resetAction);
}
render() {

return (

  <View style={{ flex: 1,backgroundColor:'red' }}>
   
    <TouchableOpacity onPress={()=>this.openConfirmationDialog()}style={{flex:1,alignItems:'center',justifyContent:'center'}}>
      <Text>Logout</Text>
    </TouchableOpacity>
    <AlertPro
      ref={ref => {
        this.AlertPro = ref;
      }}
      title="Logout"
      message="Do you want to Logout ?"
      textCancel="No"
      textConfirm="Yes"
      onConfirm={() => this.handleLogout()}
      onCancel={() => this.AlertPro.close()}
      customStyles={{

        mask: {
          backgroundColor: "rgba(0, 0, 0, 0.6)"
        },
        container: {
          borderWidth: 1,
          borderColor: "#E6E6E6",
          width: 300,
        },
        buttonCancel: {
          backgroundColor:'#5E4D46'

        },
        buttonConfirm: {
          backgroundColor:'#5E4D46'
        }
      }}
    />
  </View>
);

}
}

Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2024-05-20.at.16.41.26.mp4

from react-native.

github-actions avatar github-actions commented on June 28, 2024
⚠️ Newer Version of React Native is Available!
ℹ️ You are on a supported minor version, but it looks like there's a newer patch available - 0.73.8. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

from react-native.

github-actions avatar github-actions commented on June 28, 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.

gkasireddy202 avatar gkasireddy202 commented on June 28, 2024

"dependencies": {
"@bam.tech/react-native-image-resizer": "^3.0.7",
"@bugsnag/react-native": "^7.20.2",
"@el173/react-native-passcode-auth": "^1.0.1",
"@ismnoiet/react-native-dropdown": "0.0.2",
"@react-native-async-storage/async-storage": "^1.23.1",
"@react-native-community/datetimepicker": "^3.5.2",
"@react-native-community/masked-view": "^0.1.11",
"@react-native-community/netinfo": "^5.9.10",
"@react-native-community/toolbar-android": "0.1.0-rc.2",
"@react-native-cookies/cookies": "^6.2.1",
"@react-navigation/native": "^6.1.17",
"@react-navigation/native-stack": "^6.9.26",
"accounting": "^0.4.1",
"axios": "^0.21.4",
"base-64": "^1.0.0",
"buffer": "^6.0.3",
"create-react-class": "^15.7.0",
"expo": "^50.0.17",
"expo-local-authentication": "^13.8.0",
"install": "^0.13.0",
"intl": "^1.2.5",
"mock-async-storage": "^2.2.0",
"mockstorage": "^0.1.4",
"moment": "^2.30.1",
"moment-timezone": "^0.5.43",
"native-base": "^2.15.2",
"pdf-to-base64": "^1.0.3",
"querystring": "^0.2.1",
"react": "18.2.0",
"react-dom": "^18.2.0",
"react-native": "0.73.7",
"react-native-alert-pro": "^1.1.2",
"react-native-calendar-events": "^2.2.0",
"react-native-calendars": "^1.1303.0",
"react-native-device-info": "^7.4.0",
"react-native-dialog": "^6.2.0",
"react-native-document-picker": "^4.3.0",
"react-native-drop-down-item": "^1.1.0",
"react-native-elements": "^2.3.2",
"react-native-file-viewer": "^2.1.5",
"react-native-floating-label-text-image-input": "^1.0.1",
"react-native-floating-labels": "^1.1.9",
"react-native-fs": "^2.20.0",
"react-native-geocoding": "^0.4.0",
"react-native-geolocation-service": "^5.3.1",
"react-native-gesture-handler": "^2.16.2",
"react-native-google-maps-directions": "^2.1.1",
"react-native-htmlview": "^0.16.0",
"react-native-image-base64": "^0.1.4",
"react-native-image-crop-picker": "^0.40.3",
"react-native-image-progress": "1.1.1",
"react-native-indicators": "^0.17.0",
"react-native-keychain": "^8.2.0",
"react-native-localize": "^2.2.6",
"react-native-maps": "^0.27.1",
"react-native-material-dropdown": "github:harshitjee/react-native-material-dropdown",
"react-native-material-menu": "^1.2.0",
"react-native-modal": "^13.0.1",
"react-native-modal-datetime-picker": "^11.0.0",
"react-native-navigation-directions": "^1.0.4",
"react-native-open-maps": "^0.3.6",
"react-native-openanything": "0.0.6",
"react-native-orientation": "^3.1.3",
"react-native-permissions": "^3.10.1",
"react-native-popup-dialog": "^0.18.3",
"react-native-progress": "^4.1.2",
"react-native-read-more-text": "^1.1.2",
"react-native-reanimated": "^3.11.0",
"react-native-responsive-fontsize": "^0.5.1",
"react-native-safe-area-context": "^4.10.1",
"react-native-scoped-storage": "^1.9.2",
"react-native-screens": "^3.31.1",
"react-native-sectioned-multi-select": "^0.10.0",
"react-native-signature-capture": "^0.4.12",
"react-native-simple-radio-button": "^2.7.4",
"react-native-splash-screen": "^3.3.0",
"react-native-sqlite-storage": "^6.0.1",
"react-native-super-grid": "^4.6.1",
"react-native-svg": "^12.1.1",
"react-native-tab-view": "^2.16.0",
"react-native-textarea": "^1.0.4",
"react-native-vector-icons": "^10.0.3",
"react-native-whc-toast": "^1.0.0",
"react-navigation": "^4.4.4",
"react-navigation-drawer": "^2.7.2",
"react-navigation-stack": "^2.10.4",
"react-navigation-tabs": "^2.11.2",
"rn-fetch-blob": "^0.12.0",
"uninstall": "0.0.0",
"utf8": "^3.0.0"
},

from react-native.

cortinico avatar cortinico commented on June 28, 2024

gopikrishnacse55/UIExample.git

How do we trigger the crash?

from react-native.

testloancare avatar testloancare commented on June 28, 2024

Facing same issue Please let me know if found somthing.

from react-native.

gkasireddy202 avatar gkasireddy202 commented on June 28, 2024

@testloancare - I temporarily fixed this issue.

onConfirm={() => this.AlertPro.close();
setTimeout(() => {
this.handleLogout();
}, 1000);
}

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.