Comments (13)
@tisba I'm pretty sure you started to use new Chrome 119 which broke something. Check your logs before on the successful build and after it started to fail for Chrome version.
from ferrum.
Chrome 119 started to send:
{"method":"Page.frameStoppedLoading","params":{"frameId":"69FE7B40C52D828E8A4681686395EAC8"}}
for the main request which was always missing before. In fact Chrome was always returning an error for the main request:
◀ 0.6014469999936409 {"method":"Network.loadingFailed","params":{"requestId":"B6E447A057194D37B4873953C9448868","timestamp":353280.996004,"type":"Document","errorText":"net::ERR_ABORTED","canceled":true}}
◀ 0.6015239999978803 {"id":1011,"result":{"frameId":"69FE7B40C52D828E8A4681686395EAC8","loaderId":"B6E447A057194D37B4873953C9448868","errorText":"net::ERR_ABORTED"}}
but was missing to send Page.frameStoppedLoading
this is why it broke now.
I believe it works like this because it downloads file in the subprocess, and it doesn't make sense for it to continue main request since it's the same file, so it always cancels main request and starts subprocess to download file. When download is finished the browser gets notification or in case of headless instance Page.downloadProgress
is returned with status completed
.
- Technically speaking
page.go_to("/filename")
is always failing when we download file because errorText's returned and by protocol it means:User friendly error message, present if and only if navigation has failed.
So we must raise an error. I understand that it's frustrating, I think in this case we can considernet::ERR_ABORTED
as due to user action or download and not raise an error. - A file can be 100Kb or 1Gb and currently there's no option to wait until download is finished. We must implement this feature.
/cc @tisba @nickhammond
from ferrum.
@route Nice work! I'll update our app to point to this version.
from ferrum.
I assume you are opening file directly with go_to
?
from ferrum.
@route Yes, to the https://example.com/download/data.xlsx
URL after we've figured out what other parameters that need to be added to it.
from ferrum.
I'm not 100% sure if I see the same issue. When updating to ferrum
0.14 (from 0.13) which I'm using indirectly via cuprite
(0.14.3 → 0.15).
On GitHub Actions we now have a test consistently failing, although I'm having a hard time reproducing it locally. It is failing here:
visit download_file_fixture_path(file)
with:
[…]
Ferrum::StatusError:
Request to http://app.localhost:41805//ds/94ty7cwb/download failed (net::ERR_ABORTED)
[…]
EDIT: Interestingly I can reproduce it on my x86 MacBook Pro 🤔
from ferrum.
Good point, I totally forgot about Chrome itself 🤦♂️
Can't access my M1 MacBook Pro right now to check the version where it worked. On my x86 MacBook Pro (using Docker) I can reproduce the issue with:
Chromium 118.0.5993.0
- that's the version I had initially; exact same version I'm getting at GitHub ActionsChromium 119.0.6045.105
- fails also
Downgrading to Chromium 116.0.5845.180
fixed the issue locally.
I can find references to ERR_ABORTED
in logs for all versions. It's a lot of output, anything in particular you want me to look for, @route?
from ferrum.
Maybe there is an issue with Chrome versions, but this feels more related to upgrading ferrum
(0.13 -> 0.14) and/or cuprite
(0.14.3 → 0.15). With the identical Chrome version it works before the update and breaks consistently after.
from ferrum.
I doubt that because you can see latest builds of ferrum https://github.com/rubycdp/ferrum/commits/main
from ferrum.
Need some more time building a simplified example. At least in our case, the issue is not occuring when staying at ferrum 0.13 and cuprite 0.14.3, both locally on my MacBook Pro (x86) as well as on GitHub Actions 🤷
from ferrum.
@nickhammond can you tell me your Chrome version?
from ferrum.
@route I'll have to test again to ensure it's still happening since I ended up patching and pointing to my own fork.
Chrome: 118.0.5993.70
Patch: nickhammond@b2bc606
from ferrum.
@route Nice digging, appreciate the context! Yah, when I was looking through that network log I wasn't entirely sure what looked normal and what didn't.
from ferrum.
Related Issues (20)
- consider using === in network blacklist matching
- Doesn't work on ruby 3.2 HOT 1
- Saving via browser.mhtml and via cmd+S differs a lot on Youtube HOT 3
- Conditionally Render Page header and footer template HOT 2
- browser.quit doesn't close session HOT 6
- Include type and stackTrace in logging for console API
- `wait_for_network_idle` failing due to pending requests on previous page HOT 1
- Remove `disable-gpu`default flag for Apple Silicon HOT 3
- authenticate current_user in ferrum browser
- Hang/Timeout in dialog HOT 9
- Ferrum::PendingConnectionsError - what to do?
- Browserless 2.0 support HOT 12
- Permission denied when using Firefox HOT 1
- warning: base64 was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0.
- How to add images for PDF ?
- I am getting syntax error after installing ferrum. Am i missing something here HOT 4
- What is the purpose of navigation awaiting in `Page.command` method? HOT 1
- Browser option --kiosk not working HOT 2
- thread.rb: terminated with exception HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ferrum.