This repo contains a minimal app to reproduce the error when GridTemplate of the @iternio/react-native-auto-play library is set as a root template on Android Auto
-
npm install -
Connect Android device via USB
-
Start the Metro server
npm run start- Install the app to connected device
npm run android- Go to the DHU emulator directory, run it with connection to the USB-connected device with running app
cd ~/Library/Android/sdk/extras/google/auto
./desktop-head-unit --usb- Open the app on DHU emulator, click any grid item and see the error
A patch for the library is included in the patches/ directory. To apply it:
- Apply the patch:
npx patch-package- Run the app as described in the above section, the error should be fixed
The patch fixes AndroidAutoScreen.getScreenManager() to find the first non-cluster session instead of always looking up ROOT_SESSION, which caused a crash when navigating from a grid template.
| Before patch | After patch |
|---|---|
![]() |
![]() |

