Comments (7)
Implemented a workaround, searching for some other string instead (chose unicode null character in order not to match anything). Pushed out v0.9 - you can try with that. Also the hang is fixed too.
from electron-render-service.
Hi,
Debugging your example - it does not work indeed.
(The render service actually just goes into a never-ending loop or soβ¦ itβs not possible to render another working URL, either.)
Semiobvious thing is missing - no response is returned after search times out (default is 30s) and the render window is not returned to pool.
Will push fix soon for this.
from electron-render-service.
Electron findInPage API returns zero results indefinitely for injected content.
Hmm, by trying it in Chrome 55 - immediately starting searching for foo, it also returns 0 results π².
Looks like this is a bug in Chrome since M53: https://crbug.com/670498
Constantly searching for the same string always returns 0 results.
from electron-render-service.
Yes, it works with the work-around β thanks a lot for the quick move! Very much appreciated.
from electron-render-service.
I think the fix for capturing the timeout to prevent the never-ending loop now causes an exception. If I set e.g. waitForText=foox
and try to render the test file I get this:
delaying pdf generation, waiting for text "foox" to appear
Error: Failed to find text: foox
[2017-01-26T09:13:21.259Z] [email protected] - GET 404 /pdf?accessKey=secret&delay=0&url=http://10.5.0.141:2015&waitForText=foox 73 "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/55.0.2883.87 Chrome/55.0.2883.87 Safari/537.36" 22729.453 ms
/usr/lib/node_modules/electron-render-service/src/server.js:253
process.on('uncaughtException', (err) => { throw err; });
^
Error: Callback was already called.
at /usr/lib/node_modules/electron-render-service/node_modules/async/internal/onlyOnce.js:9:32
at renderWorker (/usr/lib/node_modules/electron-render-service/src/window_pool.js:85:7)
at WebContents.foundInPage (/usr/lib/node_modules/electron-render-service/src/renderer.js:100:28)
at emitTwo (events.js:106:13)
at WebContents.emit (events.js:191:7)
Result in the browser window seems to be OK:
{"error":{"code":"TEXT_NOT_FOUND","message":"Failed to find text: foox"}}
from electron-render-service.
Oops, forgot to remove the found-in-page
event listener in not found case. Pushed 0.9.1
from electron-render-service.
Great, working perfectly now. Thanks again.
from electron-render-service.
Related Issues (20)
- Refactor waitForText to use HTML body (allows to wait for non-visual text) HOT 3
- Docker Swarm mode misc. points HOT 2
- Feature request: Debian packages HOT 4
- Styles not being rendered correctly HOT 3
- Empty PDFs when writing to file using Node.js... HOT 1
- insecure dependency
- How to disable certificate check? HOT 2
- Version 10 of node.js has been released
- Private Websites HOT 1
- Unable to install on Debian 9 HOT 1
- An in-range update of supertest is breaking the build π¨ HOT 2
- Is this repo still maintained? HOT 7
- An in-range update of eslint is breaking the build π¨ HOT 2
- An in-range update of electron is breaking the build π¨ HOT 1
- An in-range update of electron is breaking the build π¨ HOT 6
- An in-range update of eslint-plugin-jest is breaking the build π¨ HOT 6
- An in-range update of eslint is breaking the build π¨ HOT 3
- An in-range update of prettier is breaking the build π¨ HOT 1
- An in-range update of eslint-plugin-import is breaking the build π¨ HOT 3
- How to use the service with a wikimedia page that needs authentication? HOT 5
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 electron-render-service.