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

URL fragments dropped after redirect #92

Closed
omervk opened this issue Apr 14, 2016 · 8 comments
Closed

URL fragments dropped after redirect #92

omervk opened this issue Apr 14, 2016 · 8 comments
Labels

Comments

@omervk
Copy link

omervk commented Apr 14, 2016

On some pages, the web page is not completely rendered when getPageSource is called. Calling pageWait or even Thread.sleep to wait for the script to run does not help.

Example: https://www.duolingo.com/privacy

@hollingsworthd
Copy link
Collaborator

Thanks for reporting this. Someone else had also and it's now fixed in master or 0.11.1-SNAPSHOT. Will be in next release.

@omervk
Copy link
Author

omervk commented Apr 15, 2016

That's great. Would you kindly point to the original issue?

@omervk
Copy link
Author

omervk commented May 5, 2016

@hollingsworthd Hi, I've just started using version 0.12.0 and this issue still exists...

@hollingsworthd
Copy link
Collaborator

@omervk does calling pageWait() help? Or try increasing ajaxWait to something higher than 150 ms Settings.bulder().ajaxWait(..)

@hollingsworthd hollingsworthd changed the title getPageSource does not return complete web page when it's rendered via JavaScript Blocking for ajax to complete on certain pages May 11, 2016
@omervk
Copy link
Author

omervk commented May 11, 2016

@hollingsworthd I've had pageWait from the start and it didn't help. Added ajaxWait with higher and higher values, up to 10 seconds, and none work. You're can use the URL in the OP to debug the issue.

@hollingsworthd
Copy link
Collaborator

@omervk This is the source I get: http://pastebin.com/uw19pStZ

Is that not similar to what you're getting?

Also can you enable logging and post the output? Settings.builder().logJavascript(true).logTrace(true).logWire(true)...

@omervk
Copy link
Author

omervk commented May 11, 2016

That is definitely not what I'm seeing, but is indeed what I expected to see.

I took another look and found my mistake: It's actually http://duolingo.com/#/privacy and not http://duolingo.com/privacy. Running the latter works great, but the former fails.

@hollingsworthd hollingsworthd changed the title Blocking for ajax to complete on certain pages URL fragments dropped after redirect May 11, 2016
@hollingsworthd
Copy link
Collaborator

I was able to reproduce this. Glad you found/reported this. Fix will be in next release. Thanks!

Background: fragments were not passed on redirects -- related info, http://stackoverflow.com/questions/2286402/url-fragment-and-302-redirects

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants