Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[modules-core][Android] Fixed the ErrorViewGroup cannot be cast to view class exception #23651

Merged
merged 2 commits into from
Jul 20, 2023

Conversation

lukmccall
Copy link
Contributor

Why

Closes #23586

How

It turns out that RN tries to set props even if the view wasn't constructed correctly and the app is in the background. We can't do much in this situation and ignore those errors.
Moreover, I've improved error handling when setPros fails.

Test Plan

  • bare-expo ✅

@expo-bot expo-bot added the bot: suggestions ExpoBot has some suggestions label Jul 20, 2023
Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
@lukmccall lukmccall merged commit 429abbd into main Jul 20, 2023
@lukmccall lukmccall deleted the @lukmccall/core/fix-error-view-group-cannot-be-cast branch July 20, 2023 11:46
@expo-bot expo-bot added bot: passed checks ExpoBot has nothing to complain about and removed bot: suggestions ExpoBot has some suggestions labels Jul 20, 2023
tsapeta pushed a commit that referenced this pull request Jul 21, 2023
…view class exception (#23651)

# Why

Closes #23586

# How

It turns out that RN tries to set props even if the view wasn't constructed correctly and the app is in the background. We can't do much in this situation and ignore those errors. 
Moreover, I've improved error handling when `setPros` fails.  

# Test Plan

- bare-expo ✅
@tsapeta tsapeta added the published Changes from the PR have been published to npm label Jul 23, 2023
@av185218
Copy link

av185218 commented Aug 26, 2024

Hello,
As I have to make a patch against Expo SDK 48 to resolve View cannot be cast to ViewGroup exception, is it sufficient just to return an ErrorView from handleFailureDuringViewCreation as fix can't be applied as is?

This PR seems to be the last stage of that issue. Thank you in advance!
Note: The upgrade to Expo SDK 49 is not an option as SDK 48 is in production.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: passed checks ExpoBot has nothing to complain about published Changes from the PR have been published to npm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[image][modules-core] ErrorViewGroup cannot be cast to expo.modules.image.ExpoImageViewWrapper
4 participants