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

Crash with react navigation #1

Closed
rdhox opened this issue May 18, 2021 · 10 comments
Closed

Crash with react navigation #1

rdhox opened this issue May 18, 2021 · 10 comments

Comments

@rdhox
Copy link

rdhox commented May 18, 2021

Thanks for your lib!
I have a crash when I use it with react-navigation (v5). If I use Tip on a screen in a Stack Navigator for example. Here the following step:

  1. Go to the screen with Tip
  2. Press on Tip => it's working as expected
  3. Go back in navigation stack
  4. Return to the screen with Tip
  5. Press on Tip, this error appear:
Invariant Violation: [1083,"RCTView",71,{"accessible":true,"position":"absolute","top":"<<NaN>>","left":"<<NaN>>","transform":[{"translateX":"<<NaN>>"},{"translateY":"<<NaN>>"}],"opacity":1,"focusable":true}] is not usable as a native method argument

This error is located at:
    in RCTView (at View.js:34)
    in View (at createAnimatedComponent.js:165)
    in AnimatedComponent (at createAnimatedComponent.js:215)
    in ForwardRef(AnimatedComponentWrapper) (at TouchableOpacity.js:224)
    in TouchableOpacity (at TouchableOpacity.js:302)
    in ForwardRef (at TipProvider.js:394)
    in TipProvider (at App.tsx:139)
    in App (at renderApplication.js:45)
    in RCTView (at View.js:34)
    in View (at AppContainer.js:106)
    in RCTView (at View.js:34)
    in View (at AppContainer.js:132)
    in AppContainer (at renderApplication.js:39)

Crash on android and ios.

@MaiconGilton
Copy link
Owner

I will try to reproduce it and see what I can do. It can see that for some reason the coordinates was not calculated. Could you share this part of your code?

@rdhox
Copy link
Author

rdhox commented May 18, 2021

Yes here how I use it:

...

      {type === "styles" && (
        <Tip
          id={id}
          title="MyText"
          body="MyBody"
          style={{
            position: "absolute",
            top: 0,
            left: 68,
            width: 18,
            height: 18,
            borderRadius: 9,
            borderWidth: 2,
            borderColor: "red",
            backgroundColor: "white",
            zIndex: 100,
          }}
        >
          <View style={styles.bubbles}>
            <Text
              color={buttonRed}
              size="small"
            >
              i
            </Text>
          </View>
        </Tip>
      )}

...

@MaiconGilton
Copy link
Owner

Thanks! I'll try to test it today. I'll let you know.

@MaiconGilton
Copy link
Owner

I fixed the problem! Upgrade to version 0.0.3 to apply changes. Thank so much for you feedback and patience!

@rdhox
Copy link
Author

rdhox commented May 19, 2021

Thanks for your reactivity!

@rdhox rdhox closed this as completed May 19, 2021
@MaiconGilton
Copy link
Owner

@rdhox I made some other improvements on version 0.0.4, you might want to check the CHANGELOG.md.

@rdhox
Copy link
Author

rdhox commented May 21, 2021

Thanks!

@noway
Copy link
Contributor

noway commented Aug 5, 2021

Having the same issue on 0.0.18

@MaiconGilton
Copy link
Owner

@noway Could you give me more details?

@noway
Copy link
Contributor

noway commented Aug 5, 2021

see #2

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

3 participants