Skip to content

Argument 1 (NSNumber) of UIManager.measureLayout must not be null #3

Description

@rsml

The error is "Argument 1 (NSNumber) of UIManager.measureLayout must not be null". But the rest of the stack trace is useless. The error always occurs when I am opening a popover, which is why I think this library is causing it. I think it has to do with trying to navigate to a different page while opening a popover on a slow application. I've gotten the error multiple times when testing on my iOS 11 or 12 phone, but it's very tough to reproduce.

I'm using react@16.5.2, react-native@0.55.4.

The only place where that is used in react-native-simple-popover is in PopoverContainer.js where it has the function registerPopover where you have:
UIManager.measureLayout( element, findNodeHandle(this._root), // ...

However, since registerPopover is invoked asynchronously (using setTimeout(() => {...})), I think this can lead to cases (such as when navigating between pages on a slow app) where findNodeHandle(this._root) will return null, and produce this error.

Thanks for this great library!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions