System:
OS: macOS High Sierra 10.13.5
CPU: x64 Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
Memory: 147.76 MB / 16.00 GB
Shell: 5.3 - /bin/zsh
Binaries:
Node: 8.11.2 - /usr/local/bin/node
Yarn: 1.9.4 - /usr/local/bin/yarn
npm: 6.2.0 - /usr/local/bin/npm
SDKs:
iOS SDK:
Platforms: iOS 11.4, macOS 10.13, tvOS 11.4, watchOS 4.3
IDEs:
Android Studio: 3.1 AI-173.4819257
Xcode: 9.4.1/9F2000 - /usr/bin/xcodebuild
npmPackages:
react: 16.4.0 => 16.4.0
react-native: 0.56.0 => 0.56.0
When I embed certain urls inside of a WebView on iOS is throws an uncaught exception, you can view this log here, which doesn't crash the app or do anything serious that I can find currently. But it shows up in my Sentry crash logs quite a bit. So i though id have a look at why it is occurring.
I tried reproduce it on the expo demo but it doesn't seem to be showing the warning errors, you may have to turn them on but any way. Paste this into any view to get the warnings come up in the console.
<WebView bounces={false}
source={{uri: `https://www.youtube.com/embed/CjyIP1AGqzw?version=3&rel=1&fs=1&autohide=2&showsearch=0&showinfo=1&iv_load_policy=1&wmode=transparent`}}
style={{flex: 1}}/>
I have narrowed it down to this line will submit PR soon.
Can you run react-native info and edit your issue to include these results under the Environment section?
If you believe this information is irrelevant to the reported issue, you may write [skip envinfo] under Environment to let us know.
I am having the same problem. Hope this will be fixed soon
@bthuan Check out the pr i've submitted on how to solve it as a work around for now.
I am closing this issue because it does not contain the necessary environment info, and there has been no followup in a while.
If you found this thread after encountering the same issue in the latest release, please feel free to create a new issue with up-to-date information by clicking here.
@UrbanChrisy Hey there!
Any link to the pull request you submitted? Can't seem to find it and I'm experiencing the same issues in our app.
Kind regards
@JensDebergh I don't know why all the links are broken but here it is. I need to fix that pr for it to be merged. https://github.com/facebook/react-native/pull/20918
@UrbanChrisy Meanwhile I already found a "fix" for the unpromised rejection.
Providing an origin whitelist fixes the issue, although not ideal it does work:
originWhitelist={['*']}
For more info: https://facebook.github.io/react-native/docs/webview#source
OS: macOS 10.14.3
iOS SDK:
Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
originWhitelist={['*']} still do the trick :)
originWhitelist={['*']} still do the trick, BUT ...
The social media buttons share in the webview not work :(
Most helpful comment
@UrbanChrisy Meanwhile I already found a "fix" for the unpromised rejection.
Providing an origin whitelist fixes the issue, although not ideal it does work: