Skip to content

iOS Crash: [nullthrows] "Got unexpected undefined" in UIManager.measureInWindow #41730

Closed
@jgillick

Description

@jgillick

Description

I am seeing app crash reports on iOS with the error:

Got unexpected undefined

The stacktrace shows that it comes from this line in UIManager.measureInWindow:
https://github.com/facebook/react-native/blob/v0.72.6/packages/react-native/Libraries/ReactNative/UIManager.js#L88

This implies that the method getFabricUIManager() returns undefined.

My app has fabric disabled.

Full stack track:

Error Got unexpected undefined 
    Users/runner/work/together/together/packages/dating-app/node_modules/nullthrows/nullthrows.js:7:23 nullthrows
    Users/runner/work/together/together/packages/dating-app/node_modules/react-native/Libraries/ReactNative/UIManager.js:88:40 measureInWindow
    Users/runner/work/together/together/packages/dating-app/node_modules/@ui-kitten/components/devsupport/components/measure/measure.component.js:60:48 measureSelf
    Users/runner/work/together/together/packages/dating-app/node_modules/@ui-kitten/components/devsupport/components/measure/measure.component.js:50:23 onUIManagerMeasure
    (native) apply
    Users/runner/work/together/together/packages/dating-app/node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:474:12 __invokeCallback
    Users/runner/work/together/together/packages/dating-app/node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:124:27 anonymous
    Users/runner/work/together/together/packages/dating-app/node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:368:10 __guard
    Users/runner/work/together/together/packages/dating-app/node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:123:16 invokeCallbackAndReturnFlushedQueue

Interestingly, the main branch looks like it might not be much better. nativeFabricUIManagerProxy seems to be initialized to undefined (see code), however, the code will only define a value for it if it is null. (see code). However, I could be misreading ithis.

React Native Version

0.71.6

Output of npx react-native info

System:
OS: macOS 14.1.1
CPU: (8) arm64 Apple M2
Memory: 194.55 MB / 24.00 GB
Shell:
version: 3.6.1
path: /opt/homebrew/bin/fish
Binaries:
Node:
version: 18.18.2
path: /usr/local/bin/node
Yarn:
version: 3.6.1
path: /usr/local/bin/yarn
npm:
version: 9.8.1
path: /usr/local/bin/npm
Watchman:
version: 2023.10.09.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.13.0
path: /Users/jeremy/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 23.0
- iOS 17.0
- macOS 14.0
- tvOS 17.0
- watchOS 10.0
Android SDK: Not Found
IDEs:
Android Studio: 2022.3 AI-223.8836.35.2231.10811636
Xcode:
version: 15.0.1/15A507
path: /usr/bin/xcodebuild
Languages:
Java:
version: 16.0.1
path: /usr/bin/javac
Ruby:
version: 3.2.2
path: /Users/jeremy/.rbenv/shims/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.72.6
wanted: 0.72.6
react-native-macos: Not Found
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false

Steps to reproduce

I have not been able to reproduce it directly and am just going by the stack traces from the crash reports.

Snack, screenshot, or link to a repository

Unfortunately, I have not been able to create a reproduction directly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions