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

[iOS]: Possible Unhandled Promise Rejection (id: 0): Error: Unable to open URL: about:blank #20917

Closed
3 tasks done
UrbanChrisy opened this issue Aug 30, 2018 · 11 comments
Closed
3 tasks done
Labels
Platform: iOS iOS applications. Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.

Comments

@UrbanChrisy
Copy link

UrbanChrisy commented Aug 30, 2018

Environment

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

Description

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.

Reproducible Demo

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}}/>
@UrbanChrisy
Copy link
Author

I have narrowed it down to this line will submit PR soon.

@UrbanChrisy UrbanChrisy changed the title Possible Unhandled Promise Rejection (id: 0): Error: Unable to open URL: about:blank [iOS]: Possible Unhandled Promise Rejection (id: 0): Error: Unable to open URL: about:blank Aug 30, 2018
@react-native-bot react-native-bot added the Platform: iOS iOS applications. label Aug 30, 2018
@react-native-bot
Copy link
Collaborator

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.

@bthuan
Copy link

bthuan commented Aug 30, 2018

I am having the same problem. Hope this will be fixed soon

@UrbanChrisy
Copy link
Author

@bthuan Check out the pr i've submitted on how to solve it as a work around for now.

@react-native-bot react-native-bot added the Ran Commands One of our bots successfully processed a command. label Sep 7, 2018
@react-native-bot
Copy link
Collaborator

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.

@JensDebergh
Copy link

@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

@UrbanChrisy
Copy link
Author

@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. #20918

@JensDebergh
Copy link

@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={['*']}

@savioseb
Copy link

@davidcort
Copy link

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 :)

@davidcort
Copy link

originWhitelist={['*']} still do the trick, BUT ...

The social media buttons share in the webview not work :(

@facebook facebook locked as resolved and limited conversation to collaborators Sep 7, 2019
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Platform: iOS iOS applications. Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

6 participants