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

postMessage from HTML file to react-native results in app crash #203

Open
ashokseervidev opened this issue Oct 10, 2018 · 0 comments
Open

Comments

@ashokseervidev
Copy link

“react-native-wkwebview-reborn”: “1.22.0",

<WKWebView
               ref={(wbref) => {
                 this.webview = wbref;
               }}
               style={{ backgroundColor: 'red' }}
               source={require('../../../../../../ios/3dView/car.html')}
               onLoadStart={this.onLoadStart}
               onLoad={this.onLoad}
               onLoadEnd={this.onLoadEnd}
               onError={this.onError}
               renderError={this.renderError}
               onMessage={this.handleMessageFromBuilder}
               cacheEnabled={false}
               cookiesEnabled={false}
               scalesPageToFit
               bounces={false}
               scrollEnabled={false}
           />

When i postMessage from html file to react-native it crashes.

window.postMessage(JSON.stringify({
               type: ‘READY_TO_RENDER’
 }), ‘*’);

Additional info


Environment:
  OS: macOS High Sierra 10.13.6
  Node: 9.6.1
  Yarn: Not Found
  npm: 5.6.0
  Watchman: 4.9.0
  Xcode: Xcode 10.0 Build version 10A255
  Android Studio: 3.1 AI-173.4819257

Packages: (wanted => installed)
  react: v16.3.2 => 16.3.2
  react-native: 0.53 => 0.53.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant