Shopify/polaris-viz

`@shopify/polaris-viz-native` crashes with `unrecognized selector sent to instance` error

Closed this issue · 1 comments

Bug summary

Screenshot 2024-03-18 at 5 12 12 PM

Expected behavior

It should load the chart properly.

Actual behavior

The app crashes instead.

Exception thrown while executing UI block: -[__NSArrayM objectForKeyedSubscript:]: unrecognized selector sent to instance 0x600018e30f90

__44-[RCTUIManager flushUIBlocksWithCompletion:]_block_invoke
RCTUIManager.m:1211
__44-[RCTUIManager flushUIBlocksWithCompletion:]_block_invoke_2
_dispatch_call_block_and_release
_dispatch_client_callout
_dispatch_main_queue_drain
_dispatch_main_queue_callback_4CF
CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE
__CFRunLoopRun
CFRunLoopRunSpecific
GSEventRunModal
-[UIApplication _run]
UIApplicationMain
main
start_sim
0x0
0x0

Steps to reproduce the problem

I am simply installing (yarn add @shopify/polaris-viz-native) in a brand new Expo app (managed), and this is happening. I also installed react-native-svg which seemed required.

Specifications

  System:
    OS: macOS 14.4
    CPU: (10) arm64 Apple M1 Max
    Memory: 189.45 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.11.0 - ~/.nvm/versions/node/v20.11.0/bin/node
    Yarn: 1.22.21 - ~/.nvm/versions/node/v20.11.0/bin/yarn
    npm: 10.2.4 - ~/.nvm/versions/node/v20.11.0/bin/npm
    pnpm: 7.28.0 - ~/Library/pnpm/pnpm
  Browsers:
    Chrome: 122.0.6261.129
    Safari: 17.4
  npmPackages:
    @shopify/polaris-viz-native: 11.0.0 => 11.0.0 
    react: 18.2.0 => 18.2.0 

Closing as #1613 (comment) fixed it. react-native-viz should be included as a peer dependency instead!