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

App crashes on onConfirm and onCancel method on android os 11 and 12 for RN 0.72 #752

Open
Shweta-UMR opened this issue Jan 8, 2024 · 4 comments

Comments

@Shweta-UMR
Copy link

Hello All,
I am using datepicker for my app which is working fine in RN version 0.68. when i upgraded version to 0.72 it is crashing for android version 11 and 12. but working fine with version 13.
Datepicker is showing properly but when i tries to click on onConfirm and onCancel method it existed app with showing crash.
my code is as below.

 <DatePicker
        modal
        open={open}
        date={date}
        onConfirm={(date) => {
          setOpen(false)
          setDate(date)
        }}
        onCancel={() => {
          setOpen(false)
        }}
      />   

Help me
Thanks

@Shweta-UMR Shweta-UMR changed the title App crashes on onConfirm and onCancel method on android os 11 and 12. App crashes on onConfirm and onCancel method on android os 11 and 12 for RN 0.72 Jan 8, 2024
@henninghall
Copy link
Owner

Can you provide the stack trace of the crash? (found in android studio etc)

@Shweta-UMR
Copy link
Author

Shweta-UMR commented Jan 8, 2024

@henninghall thanks for response, following is my stack log found in android studio

FATAL EXCEPTION: mqt_native_modules
    Process: com.exampleApp, PID: 27077
    android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.

@Antho2407
Copy link

@henninghall I think we are experiencing the same issue, quite rare but always caused by the date picker on Android :

Fatal Exception: android.view.ViewRootImpl$CalledFromWrongThreadException
Only the original thread that created a view hierarchy can touch its views.

@vabruzzese
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants