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

UIWebView not loading assets after redirect #196

Closed
lukaswuerzburger opened this issue Sep 9, 2019 · 3 comments
Closed

UIWebView not loading assets after redirect #196

lukaswuerzburger opened this issue Sep 9, 2019 · 3 comments
Labels
bug Something isn't working

Comments

@lukaswuerzburger
Copy link
Collaborator

lukaswuerzburger commented Sep 9, 2019

I'm experiencing loading issues in a UIWebView after coming from a redirect.

These are the steps my app goes through:

  1. The app requests a URL that immediatley redirects to another URL.
  2. The redirected page loads, but no additional requests are made like e.g. loading CSS or Javascript files.

I don't even use any florets in my Cauli setup:

let cauli = Cauli([], configuration: .standard)
cauli.run()

If the app requests the redirected URL directly, it actually loads the CSS. But this is of course not possible in a real life scenario for my app (oauth flow).

In the picture on the left side you can see the version with a call that redirects. On the right side without redirect.

xing-bug

This is also reproducible on a local machine.

  1. Create a test directory with a php file index.php in it:
<?php
header("Location: https://google.com/");
?>
  1. Start a PHP server in that directory:
php -S 0.0.0.0:8888
  1. Use the test project that i've created: https://github.com/lukaswuerzburger/cauli-redirect-bug/ Don't forget to use your IP address here: https://github.com/lukaswuerzburger/cauli-redirect-bug/blob/14e45beec3d261a5abf68bdb1c32f1bdca58852d/cauli-redirect-bug/ViewController.swift#L17
@brototyp brototyp added the bug Something isn't working label Sep 10, 2019
@brototyp
Copy link
Member

Hey @lukaswuerzburger, thanks for the splendid bug report. It really helped to nail down this issue.
I think I found a fix for it. Can you have a look at this PR and verify it's working? #211

@lukaswuerzburger
Copy link
Collaborator Author

I've tested it on several iOS versions and clicked around and it works just fine 🎉

@brototyp
Copy link
Member

I've tested it on several iOS versions and clicked around and it works just fine 🎉

Sweet. Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants