You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[iOS] AutoSkeletonView crashes on mount with "index 0 beyond bounds for empty array" (RCTUIManager flushUIBlocksWithCompletion) #20
Describe the bug AutoSkeletonView crashes the app on iOS immediately on mount when isLoading is true, with a native exception thrown from RCTUIManager flushUIBlocksWithCompletion:. The crash is not related to the shape or styling of the children — it reproduces both with a bare <Text> and with a <Text> wrapped in a styled <View>.
Exception: Exception thrown while executing UI block: *** -[__NSArray0 objectAtIndex:]: index 0 beyond bounds for empty array
Render this screen with isLoading set to true on initial mount.
App crashes immediately with the NSRangeException above.
Expected behavior AutoSkeletonView should render a skeleton placeholder for the wrapped content without crashing, even for a minimal single-child tree.
Screenshots
Attached below — two RedBox crash screens showing the identical exception for both variants of the repro code.
Desktop (please complete the following information):
OS: Mac
RN Version: 0.77
Smartphone (please complete the following information):
Device: iOS Simulator
OS: iOS (RedBox captured on device running the app)
Browser: N/A (native RN app)
Version: react-native-auto-skeleton 0.1.32
Additional context
Crash is 100% reproducible on first render whenever isLoading starts as true.
Not fixed by wrapping the child in a styled View with explicit padding — same trace with or without a wrapper, and with or without SafeAreaView.
Appears related to open issue basic example does not work - expo sdk 53 #15 ("basic example does not work - expo sdk 53"), which reports the same kind of failure on a minimal example.
Crash originates inside the library's native UI block registered via RCTExecuteOnMainQueue, suggesting it accesses an empty subviews/children array before the wrapped view's layout has been committed.
Fixed in v0.1.33 (#22). On the Old Architecture the gradient colors reached native as unprocessed strings, were dropped during conversion, and the empty array was then indexed — that is the index 0 beyond bounds for empty array crash. Colors are now processed by the view config, and the gradient falls back to the defaults if fewer than two colors arrive. Please reopen if you still see it on 0.1.33.
Describe the bug
AutoSkeletonViewcrashes the app on iOS immediately on mount whenisLoadingistrue, with a native exception thrown fromRCTUIManager flushUIBlocksWithCompletion:. The crash is not related to the shape or styling of the children — it reproduces both with a bare<Text>and with a<Text>wrapped in a styled<View>.Exception:
Exception thrown while executing UI block: *** -[__NSArray0 objectAtIndex:]: index 0 beyond bounds for empty arrayStack trace:
__44-[RCTUIManager flushUIBlocksWithCompletion:]_block_invoke (RCTUIManager.mm:1170)
__44-[RCTUIManager flushUIBlocksWithCompletion:]_block_invoke.195
__RCTExecuteOnMainQueue_block_invoke
_dispatch_call_block_and_release
_dispatch_client_callout
_dispatch_main_queue_drain.cold.7
_dispatch_main_queue_drain
_dispatch_main_queue_callback_4CF
CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE
__CFRunLoopRun
_CFRunLoopRunSpecificWithOptions
GSEventRunModal
-[UIApplication _run]
UIApplicationMain
To Reproduce
Steps to reproduce the behavior:
react-native-auto-skeleton(v0.1.32) in a React Native / Expo iOS project.View, no styles):isLoadingset totrueon initial mount.Expected behavior
AutoSkeletonViewshould render a skeleton placeholder for the wrapped content without crashing, even for a minimal single-child tree.Screenshots
Attached below — two RedBox crash screens showing the identical exception for both variants of the repro code.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
isLoadingstarts astrue.Viewwith explicit padding — same trace with or without a wrapper, and with or withoutSafeAreaView.RCTExecuteOnMainQueue, suggesting it accesses an empty subviews/children array before the wrapped view's layout has been committed.