Comments (20)
Thank you for reporting this, can you give an example page so I can test it?
from chrome-prerender.
Is it the same? Let's try https://google.com
:
2017-06-12 14:41:28,750 INFO prerender.chromerdp.navigate:205 Page 08a8d058-66e4-4bd6-ae57-6a5942381f6f [1] navigating to https://google.com
2017-06-12 14:41:58,765 INFO websockets.protocol.fail_connection:618 Failing the WebSocket connection: 1006
2017-06-12 14:41:58,767 WARNING prerender.app._render:95 Temporary browser failure: , retry rendering https://google.com in 1s
2017-06-12 14:41:58,786 ERROR asyncio.serve:450 Task exception was never retrieved
future: <Task finished coro=<Page._evaluate_prerender_ready() done, defined at /Users/idolezalova/.pyenv/versions/3.6.1/lib/python3.6/site-packages/prerender/chromerdp.py:219> exception=AttributeError("'NoneType' object has no attribute 'send'",)>
Traceback (most recent call last):
File "/Users/idolezalova/.pyenv/versions/3.6.1/lib/python3.6/site-packages/prerender/chromerdp.py", line 221, in _evaluate_prerender_ready
res = await self.evaluate('window.prerenderReady == true')
File "/Users/idolezalova/.pyenv/versions/3.6.1/lib/python3.6/site-packages/prerender/chromerdp.py", line 215, in evaluate
'params': {'expression': expr}
File "/Users/idolezalova/.pyenv/versions/3.6.1/lib/python3.6/site-packages/prerender/chromerdp.py", line 171, in send
await self.websocket.send(json.dumps(payload))
AttributeError: 'NoneType' object has no attribute 'send'
2017-06-12 14:41:59,773 INFO prerender.chromerdp.navigate:205 Page 5702afd5-b794-4c0c-85f3-5817f2bcc59f [1] navigating to https://google.com
2017-06-12 14:42:28 - (sanic)[ERROR]: NoneType: None
2017-06-12 14:42:28,742 ERROR sanic.log:104 NoneType: None
2017-06-12 14:42:28,751 INFO websockets.protocol.fail_connection:618 Failing the WebSocket connection: 1006
2017-06-12 14:42:28,751 WARNING prerender.app.handle_request:172 Got 504 for https://google.com in 60006ms
2017-06-12 14:42:28 - (sanic)[ERROR]: Connection lost before response written @ ('127.0.0.1', 62967)
2017-06-12 14:42:28,752 ERROR sanic.write_response:217 Connection lost before response written @ ('127.0.0.1', 62967)
from chrome-prerender.
Sorry for a late reply. I missed the mail sent to me 11 days ago.
Yes, the search engine is a good example.
from chrome-prerender.
For https://google.com
I can't reproduce the exception locally. What's your OS and Chrome version? @akarienta
from chrome-prerender.
OS: macOS Sierra, version 10.12.5 (16F73)
Chrome: Version 59.0.3071.86 (Official) (64bit)
from chrome-prerender.
Oh, I haven't try Chrome stable yet. I am using Chrome Canary for development. Chrome stable might miss some features that unstable/canary version has.
from chrome-prerender.
@messense ok makes sense, I will try Canary and let you know, thanks
from chrome-prerender.
You can also try www.baidu.com, the biggest search engine in China.
I ran on Sierra too.
from chrome-prerender.
@myrfy001 I have no problem rendering www.baidu.com
too.
2017-06-12 21:35:00,284 INFO prerender.chromerdp.navigate:205 Page d1945e18-ff0b-4111-95cf-96611fa58975 [1] navigating to https://www.baidu.com
2017-06-12 21:35:01,017 WARNING prerender.chromerdp._on_log_entry_added:316 https://www.baidu.com/:705 console javascript log warning: A Parser-blocking, cross site (i.e. different eTLD+1) script, https://ss1.bdstatic.com/5eN1bjq8AAUYm2zgoY3K/r/www/cache/static/protocol/https/global/js/all_async_search_0596852.js, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message.See https://www.chromestatus.com/feature/5718547946799104 for more details.
2017-06-12 21:35:01,018 WARNING prerender.chromerdp._on_log_entry_added:316 https://www.baidu.com/:705 console javascript log warning: A Parser-blocking, cross site (i.e. different eTLD+1) script, https://ss1.bdstatic.com/5eN1bjq8AAUYm2zgoY3K/r/www/cache/static/protocol/https/global/js/all_async_search_0596852.js, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message.See https://www.chromestatus.com/feature/5718547946799104 for more details.
2017-06-12 21:35:02,634 INFO prerender.app.handle_request:161 Got 200 for https://www.baidu.com in 2355ms
from chrome-prerender.
@messense It's absolutely the same for me with Version 61.0.3128.0 (Official) canary (64bit)
from chrome-prerender.
@messense I have also the same problem to render www.baidu.com
:
2017-06-12 15:38:33,258 INFO prerender.chromerdp.navigate:205 Page 4f5a3630-5014-4d85-b5ef-249096334e24 [1] navigating to https://www.baidu.com
2017-06-12 15:38:33,932 WARNING prerender.chromerdp._on_log_entry_added:316 https://www.baidu.com/:705 console javascript log warning: A Parser-blocking, cross site (i.e. different eTLD+1) script, https://ss1.bdstatic.com/5eN1bjq8AAUYm2zgoY3K/r/www/cache/static/protocol/https/global/js/all_async_search_0596852.js, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message.See https://www.chromestatus.com/feature/5718547946799104 for more details.
2017-06-12 15:38:33,933 WARNING prerender.chromerdp._on_log_entry_added:316 https://www.baidu.com/:705 console javascript log warning: A Parser-blocking, cross site (i.e. different eTLD+1) script, https://ss1.bdstatic.com/5eN1bjq8AAUYm2zgoY3K/r/www/cache/static/protocol/https/global/js/all_async_search_0596852.js, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message.See https://www.chromestatus.com/feature/5718547946799104 for more details.
2017-06-12 15:39:02 - (sanic)[ERROR]: NoneType: None
2017-06-12 15:39:02,242 ERROR sanic.log:104 NoneType: None
2017-06-12 15:39:02,250 INFO websockets.protocol.fail_connection:618 Failing the WebSocket connection: 1006
2017-06-12 15:39:02,251 WARNING prerender.app.handle_request:172 Got 504 for https://www.baidu.com in 60011ms
2017-06-12 15:39:02 - (sanic)[ERROR]: Connection lost before response written @ ('127.0.0.1', 64642)
2017-06-12 15:39:02,252 ERROR sanic.write_response:217 Connection lost before response written @ ('127.0.0.1', 64642)
2017-06-12 15:39:02,398 ERROR asyncio.serve:450 Task exception was never retrieved
future: <Task finished coro=<Page._evaluate_prerender_ready() done, defined at /Users/idolezalova/.pyenv/versions/3.6.1/lib/python3.6/site-packages/prerender/chromerdp.py:219> exception=AttributeError("'NoneType' object has no attribute 'send'",)>
Traceback (most recent call last):
File "/Users/idolezalova/.pyenv/versions/3.6.1/lib/python3.6/site-packages/prerender/chromerdp.py", line 221, in _evaluate_prerender_ready
res = await self.evaluate('window.prerenderReady == true')
File "/Users/idolezalova/.pyenv/versions/3.6.1/lib/python3.6/site-packages/prerender/chromerdp.py", line 215, in evaluate
'params': {'expression': expr}
File "/Users/idolezalova/.pyenv/versions/3.6.1/lib/python3.6/site-packages/prerender/chromerdp.py", line 171, in send
await self.websocket.send(json.dumps(payload))
AttributeError: 'NoneType' object has no attribute 'send'
@myrfy001 Do you have the same error?
from chrome-prerender.
@akarienta How did you launch Chrome Canary? I am using:
/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary --remote-debugging-port=9222
Make sure you didn't already opened a Chrome Canary before running the command in terminal.
from chrome-prerender.
To debug it, start it with DEBUG=1 prerender
from chrome-prerender.
@messense I go with command from your README:
/Applications/Google Chrome Canary.app/Contents/MacOS/Google\ Chrome\ Canary --headless --remote-debugging-port=9222 --disable-gpu "about:blank"
from chrome-prerender.
@messense Ahahah, it's ok with your command:
/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary --remote-debugging-port=9222
So maybe just let's update the README file 😄
BTW it works in the last stable Chrome as well!
from chrome-prerender.
Good to know. The readme command is for Linux server.
from chrome-prerender.
@messense Ah I see. Very well then, thank you very much for your help!
from chrome-prerender.
BTW, I would expect Chrome Canary to work with --headless
, I guess It's broken for now. But it's unstable version anyway, breakages are kind of normal.
from chrome-prerender.
I have the same problem again (with both google.com
and baidu.com
), even when using the command
/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary --remote-debugging-port=9222
I tried also the --headless
flag. It seems like a problem with Chrome, it works on some runs, on others it doesn't.
from chrome-prerender.
Removed layerPainted
events in 280ca79
from chrome-prerender.
Related Issues (20)
- compare to https://github.com/prerender/prerender, which features are supported? HOT 3
- Reset/renew cache on POST request
- Useragent compatability with nodejs prerender HOT 2
- beforeSend plugin HOT 3
- 请问未来是否会支持限制截图范围 HOT 1
- Invalid syntax error HOT 2
- removeScriptTags plugin HOT 1
- option to disable images HOT 5
- /browser/enable endpoint is not working if CONCURRENCY OS env is not set
- Close page on PRERENDER_TIMEOUT HOT 2
- Subdirs in S3 storage is always same HOT 2
- Remove <meta name="fragment"... from prerendered pages HOT 5
- Prerender stops rendering after some time under high load HOT 8
- chromeless proxy support
- https problem on FreeBSD HOT 53
- Install fail on Centos 7 using pip HOT 1
- Is it possible to use chrome-prerender as a squid parent in a proxy sandwich setup? HOT 5
- Can't view generated mhtml in chrome HOT 1
- Chrome healthcheck
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 chrome-prerender.