Comments (21)
Can you test this with 3.2.0
You should not have .close()
it every time. This is definitely not expected behaviour.
from electron-screenshot-service.
Just tried it with 3.2.0, no luck :(. Still getting the errors
from electron-screenshot-service.
I just tested it with the example/multiple.js
and everything is working fine. Can you provide a simple example that fails for you?
from electron-screenshot-service.
example/multiple.js
runs screenshot.close()
after running it? What happens if you omit that?
from electron-screenshot-service.
It runs it after all screenshots where made. Promise.all([])
waits till all the promises are fulfilled.
[Edit]
If it is omitted the process will never stop.
from electron-screenshot-service.
There are three iframes on the page I am trying to capture. When I visit a page without iframes, the error does not occur. Could this be the possible source for the problem?
from electron-screenshot-service.
Thanks for the hint. I will try with multiple iframe!
from electron-screenshot-service.
I can't reproduce it here. I tried with multiple screenshot of the front page of codepen.io
where 6 iframes are loaded each time and everything is working fine.
from electron-screenshot-service.
did you omit screenshot.close() ? In my case I want to keep the process open, as I send multiple domains to process over time.
from electron-screenshot-service.
Here is the code I am using.
from electron-screenshot-service.
gives a 404
from electron-screenshot-service.
Sorry, should work now.
from electron-screenshot-service.
hi, this code gives me the error. It's not consistent, you might need to run it a couple of times.
It might have something to do with the load of the websites in the iframes?
Or does this occur because screenshot.close() is never called?
from electron-screenshot-service.
When you run cat node_modules/electron-prebuilt/dist/version
in the root of your project dose this print v1.2.6
?
from electron-screenshot-service.
yes
from electron-screenshot-service.
This is a hard one... I can't reproduce it on my side.
from electron-screenshot-service.
Really appreciate the help. I understand it's tricky to debug this way. The complete error:
Uncaught Exception:
TypeError: Cannot read property 'id' of null
at Timeout.makeScreenshot (<PATH>/node_modules/electron-screenshot-service/electron-service/node_modules/electron-screenshot-app/index.js:61:42)
at tryOnTimeout (timers.js:224:11)
at Timer.listOnTimeout (timers.js:198:5)
at listOnTimeoutNT (timers.js:242:26)
at _combinedTickCallback (internal/process/next_tick.js:71:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
from electron-screenshot-service.
Just tried using Network Link Conditioner
to throttle my connection to 3G but it still worked. There seams to be a race condition in the iframe detection code.
[Edit]
Could you test inserting:
if (popupWindow === null) return;
in line 60 of index.js
from electron-screenshot-service.
I'm still getting an error when inserting the code:
I really don't understand, shouldn't the return prohibit the code from executing?
Uncaught Exception:
TypeError: Cannot read property 'capturePage' of null
at Timeout.setTimeout (<PATH>/node_modules/electron-screenshot-service/electron-service/node_modules/electron-screenshot-app/index.js:85:17)
at tryOnTimeout (timers.js:224:11)
at Timer.listOnTimeout (timers.js:198:5)
[Edit]
What version of node are you on? I'm at 5.2.0
[Edit2]
It does seem to suppress some errors, however in my other code visiting example.com triggers the error mentioned above
[Edit3]
I have suppressed all remaining errors by adding your suggestion at line 60 and 81
if (popupWindow === null) return;
Everything seems to be working fine for now. Thank you so much for thinking along!
from electron-screenshot-service.
Are the if (popupWindow === null) return;
solutions at line 60 and 81 valid enough to implement? As I think this solves the issue.
from electron-screenshot-service.
Added in [email protected]
from electron-screenshot-service.
Related Issues (20)
- Can't install it on windows 10 HOT 3
- count is not updated when a spawned process crashes HOT 4
- Feature Request: Inject JavaScript HOT 2
- Not Working on Heroku Deployment HOT 3
- RangeError: "port" argument must be >= 0 and < 65536 HOT 3
- `page` option not working HOT 3
- Javascript not executing properly HOT 1
- Installation error on windows HOT 3
- PORT issue on windows HOT 1
- Pass cookies HOT 2
- electron error while installing HOT 1
- Uncaught (in promise) TypeError: Bad argument(…) HOT 2
- Running as a service: won't create second screenshot HOT 1
- electron-service missing version number in package.json HOT 1
- Caching HOT 2
- No compatible version found: axon@'^2.0.2' HOT 4
- Clustering and zombie processes
- Doesn't throw an error and it just hangs on Ubuntu 16.04 with NodeJS 6.10.3 HOT 3
- the "file " argument must be of type string 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 electron-screenshot-service.