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

Expo Go App now requires Expo SDK 52 #1017

Closed
4hel opened this issue Jan 9, 2025 · 5 comments
Closed

Expo Go App now requires Expo SDK 52 #1017

4hel opened this issue Jan 9, 2025 · 5 comments
Assignees
Labels

Comments

@4hel
Copy link

4hel commented Jan 9, 2025

When scanning the QR-Code, The Expo Go App complains that the project is using Expo SDK 49 and the project needs to be upgraded to Expo SDK 52

So a Hyperview App can currently not be tested on a real phone unfortunately.

@flochtililoch
Copy link
Collaborator

Thanks for reporting @4hel. The team will look into updating Expo next week.

@UmerHA
Copy link

UmerHA commented Jan 29, 2025

Hey @flochtililoch - Do you have an estimate when you'll be done? Happy to help, if I can be useful

@flochtililoch
Copy link
Collaborator

flochtililoch commented Jan 29, 2025

Hi @UmerHA, thanks for reaching out and for offering to help - I have this work on pause right now, and likely won't resume it for another 10 days or so. I had originally merged #1021, but ended up reverting in #1053 as I discovered some blocking issues with scroll views, I'll share my internal post about what the issue is here:

The "keyboard aware scroll view" functionality (provided by this ancient/unmaintained library) is no longer working, because of an obscure RN bug (the most recent issue I found about this bug is 9 years old, and the code that's failing haven't been touched for about as long). From my investigation, the condition here fails because view is of type RCTScrollViewComponentView instead of expected RCTScrollView (the class RCTScrollViewComponentView is part of "Fabric", the new rendering system that's part of the RN new architecture).
Tracking the issue back to the JS triggering the issue, lands me on this call to getContentSize . I'm able to easily swap this to use instead the instance method measure on the scrollview, to get the same values, and I can restore the functionality, but only partially: the view with keyboard-avoid attribute no longer animates with the keyboard opening/closing (see videos).
It's worth noting that the existing functionality is not exempt of bugs, as can be seen on the video current-keyboard-aware-scrollview at ~15s (input 3 gets out of view when focused). See the new behavior with the quick fix on new-keyboard-aware-scrollview.

And the video captures I refer to above:

Pre-SDK update Post-SDK update Post-SDK with manual fix
pre-update post-update post-update-fix

Here's the fix I manually applied to the react-native-keyboard-aware-scrollview.

diff --git a/node_modules/react-native-keyboard-aware-scrollview/src/KeyboardAwareBase.js b/node_modules/react-native-keyboard-aware-scrollview/src/KeyboardAwareBase.js
index fb1c58a..3a98cfb 100644
--- a/node_modules/react-native-keyboard-aware-scrollview/src/KeyboardAwareBase.js
+++ b/node_modules/react-native-keyboard-aware-scrollview/src/KeyboardAwareBase.js
@@ -56,10 +56,10 @@ export default class KeyboardAwareBase extends Component {
   }

   _updateKeyboardAwareViewContentSize() {
-    if(ScrollViewManager && ScrollViewManager.getContentSize) {
-      ScrollViewManager.getContentSize(ReactNative.findNodeHandle(this._keyboardAwareView), (res)=> {
+    if(this._keyboardAwareView) {
+      this._keyboardAwareView.measure((x, y, width, height) => {
         if(this._keyboardAwareView) {
-          this._keyboardAwareView.contentSize = res;
+          this._keyboardAwareView.contentSize = { width, height };
           if(this.state.scrollBottomOnNextSizeChange) {
             this.scrollToBottom();
             this.state.scrollBottomOnNextSizeChange = false;

Two issues with the patch: since this needs to be applied to a 3rd party dependency, we cannot just include a patch with patch-package tool, as consumers of the Hyperview library would need to manually apply that patch too. Instead we would need to fork that module or integrate its code directly in the Hyperview repo - not ideal, especially since it's not working great even after the patch.

Some things to explore, and where you can help:

  • We have discussed internally about swapping out the react-native-keyboard-aware-scrollview with this library: https://github.com/baijunjie/react-native-input-scroll-view - it might be worth testing it out
  • React Native core provides KeyboardAvoidingView, maybe we can build a replacement component that leverages this for our keyboard aware scrollview.
  • Maybe my patch can be improved to restore complete functionality, if so then it becomes worth forking the library

Let me know if you need any help getting started with any of these.

Thanks!

@flochtililoch
Copy link
Collaborator

flochtililoch commented Feb 13, 2025

The issue with the view not animating smoothly with the keyboard is not related to the library react-native-keyboard-aware-scrollview, but instead appears to be linked to react-native-reanimated, specifically on/after Expo 52.
The issue was just fixed last week, but it might take a bit to propagate back into Expo.

That's good news though, I'll proceed with the patch for react-native-keyboard-aware-scrollview, then we'll live with the visual glitch until a new version of react-native-reanimated is released (hopefully soon).

Trail of issues I mentioned above:

@flochtililoch
Copy link
Collaborator

Resolved by #1072

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants