title: Using React Native Webview in iOS App is crashing intermittently
body: <p>I have a <strong>react native iOS application</strong> (version 0.62.2) using <strong>react-native-webview</strong> <strong>plugin</strong> latest version 11.x to render few webview screens in the App. Recently noticed in the crash logs that sometimes the webview screens crash intermittently on launch. Got below exception from the error logs of the sessions.</p>
  <p><strong>Error</strong></p>
  <pre><code>NSInvalidArgumentException *** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[1]
  </code></pre>
  <p><strong>Need inputs on the below point:</strong></p>
  <ol>
  <li><p>How to decode this error? If I try to replicate the same behavior on xcode I get the error 1 out of 5 times and it points to the webview plugin.
  <a href="https://i.stack.imgur.com/SSccI.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SSccI.jpg" alt="enter image description here" /></a></p>
  </li>
  <li><p>Is there a way to try/catch this error so that the App at least does not crash? I tried error boundary but that will not catch this exception.</p>
  </li>
  </ol>
  <p>Update: adding code as requested</p>
  <pre><code>&lt;View height={getScreenHeight() - 150}&gt;
      &lt;KeyboardAvoidingView {...keyboardBehavior}&gt;
        &lt;WebView
          style={isApplyDeviceHeight ? styleWithHeight : style}
          originWhitelist={['*']}
          javaScriptEnabled
          injectedJavaScript={this.captureAnchors()}
          startInLoadingState
          thirdPartyCookiesEnabled={thirdPartyCookiesEnabled}
          source={{
            uri: this.updateUrl(pageUrl),
            headers: {'channel': WebViewHeaderChannel},
          }}
          onMessage={this.handleWebViewEvents}
          useWebKit={isIOSDevice}
          allowsInlineMediaPlayback
        /&gt;
      &lt;/KeyboardAvoidingView&gt;
    &lt;/View&gt;
  
  
  updateUrl = webURL =&gt; {
  const {webAppDomain, siteId} = getAPIConfig();
  const url = this.updateToken(webURL);
  let URL = url;
  // url path transformation in case of absolute image URL
  if (/^http/.test(url)) {
    URL = url ? url.replace(/^\//, '') : '';
  } else if (webURL.includes(`/${siteId}/`)) {
    // url path transformation in case of relative image URL
    URL = `${webAppDomain}${url}`;
  } else {
    URL = `${webAppDomain}/${siteId}${url}`;
  }
  return URL;
  </code></pre>
  <p>};</p>
  <p>Any help is greatly appreciated.</p>