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

Cannot read properties of undefined (reading 'getBoudningClientRect') #243

Closed
pro-vi opened this issue Sep 2, 2022 · 2 comments · Fixed by #247
Closed

Cannot read properties of undefined (reading 'getBoudningClientRect') #243

pro-vi opened this issue Sep 2, 2022 · 2 comments · Fixed by #247
Assignees
Labels

Comments

@pro-vi
Copy link

pro-vi commented Sep 2, 2022

Bug description: Upon rendering the WebView using a uri source, an error pops up Cannot read properties of undefined (reading 'getBoudningClientRect')

In WebView I'm using server-rendered react with nestJS. Upon examining the code I see that the package is trying to wrap each individual element in a wrapper div, but in this case the wrapper is undefined. This error only happens few seconds after the WebView has been rendered.

Environment:

  • OS: Android
  • OS version: Android 12
  • react-native version: 0.68.2
  • react-native-webview version: 11.23.0
  • react-native-autoheight-webview version: 1.6.4
@pro-vi pro-vi added the bug label Sep 2, 2022
@iou90
Copy link
Owner

iou90 commented Sep 5, 2022

Please provide your uri source.

@pro-vi
Copy link
Author

pro-vi commented Sep 6, 2022

Please provide your uri source.

As of now, it is a local endpoint. Will let you know once it's accessible. But here's what's happening in the uri:

An editor based on lexical (https://playground.lexical.dev/) which uses ContentEditable under the hood (https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/contenteditable)

I was able to reproduce the error on a page without ContentEditable by triggering a height update. So more likely an issue with next.js? Also, this error doesn't affect the normal function - autoheight still works well despite of the error showing. The error is suppressed on production environment.

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

Successfully merging a pull request may close this issue.

2 participants