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

RN CRASH when triggering visibility on popover that is no longer in viewport #224

Open
preyansh98 opened this issue Aug 6, 2021 · 2 comments
Labels

Comments

@preyansh98
Copy link

I have a simple popover, for which the visibility is set by the opened prop:

    <Menu
      opened={visible}
      onClose={onClose}
      onBackdropPress={onClose}
      renderer={renderers.Popover}
      rendererProps={{ placement: 'bottom' }}
    >
      <MenuTrigger>
        {children}
      </MenuTrigger>
      <MenuOptions>
        {content}
      </MenuOptions>
    </Menu>

Now let's set flyout visibility to true, after a certain timeout, for example:
setTimeout(() => coachmark.visibility = true, 2000))

Steps to reproduce:

  • Like with the code snippet above, set opened to true after a certain timeout
  • Within this timeout, scroll away to not have the trigger item in the viewport
  • React Native crashes.

Exception found:
From logging, seems to be an invariant violation exception with top: NaN and left: NaN.

{"name":"Invariant Violation","error":"[1965,\"RCTView\",21,{\"padding\":7,\"backgroundColor\":0,\"position\":\"absolute\",\"alignItems\":\"center\",\"transform\":[{\"scale\":0.1}],\"opacity\":0.1,\"top\":\"<<NaN>>\",\"left\":\"<<NaN>>\",\"flexDirection\":\"column\",\"pointerEvents\":\"box-none\"}] is not usable as a native method argument","data":{"componentStack":"\n    in RCTView (at View.js:34)\n    in View (at createAnimatedComponent.js:)\n    in AnimatedComponent (at createAnimatedComponent.js:)\n    in ForwardRef(AnimatedComponentWrapper) (created by Popover)\n    in Popover (created by MenuPlaceholder)\n    in RCTView (at View.js:)\n    in View (created by MenuPlaceholder)\n    in MenuPlaceholder (created by MenuProvider)\n    in RCTView (at View.js:)\n    in View (at SafeAreaView.js:)\n    in ForwardRef(SafeAreaView) (created by MenuProvider)\n    in RCTView (at View.js:)\n    in View (created by MenuProvider)\n 
@thehemaljoshi
Copy link

Facing same issue any solution on this?

@ashirkhan94
Copy link

Same issue for me , any update😥

@sodik82 sodik82 added the bug label Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants