-
Notifications
You must be signed in to change notification settings - Fork 9
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
question: Get lots of : select: Invalid argument #50
Comments
Hello @liu0fanyi , Could you please post full |
Hello @dr-dimitru |
Please, support this project by:
|
@dr-dimitru Sorry...I get them back...
and curl nothing, curl just block. Is there a way to get all errors from Thanks very much....I can't get what's wrong here... |
Is |
@dr-dimitru Yes, I can get phantomjs -v, it's 2.1.1
|
and I try to use phantomjs alone:
It was ok, without any error...... |
Looks like you bump into #49 @nabilfreeman could you take a look on #49 ? |
- Dependencies update - Compatibility with latest Meteor release - Merge #49 , fix for #50 , thanks to @nabilfreeman
Please update to latest release. |
@liu0fanyi let me know if latest release solve your issue |
Hello @liu0fanyi , Have you figured out how to fix this issue tuning |
Hello @dr-dimitru |
@nabilfreeman could you please take a look on this thread? |
The same thing happens to me. After few hours of debugging: application without Looks like error is produced by phantomjs stderr (but I'm not 100 % sure). I tried with multiple versions of phantomjs, tried downgrading meteor version... still no luck. |
Hello @perak , @liu0fanyi , Thank you for the update. Could you try to execute phantomjs --load-images=false --ssl-protocol=any --ignore-ssl-errors=true --disk-cache=true --disk-cache-path=/data/phantomjs --cookies-file=/data/phantomjs/cookies.txt --local-storage-path=/data/phantomjs --local-to-remote-url-access=true --offline-storage-path=/data/phantomjs --web-security=false Make sure Let's see if this will help, perhaps it's cookies, localStorage or cache issue, as it can't be stored in memory is some special circumstances. |
Hello @dr-dimitru I have tried It was ok, I dont get error info cookies.txt:
http_localhost_3000.localstorage:
|
@liu0fanyi it's a great news. |
No update is needed, custom flags can be passed via Let me know if it will work for you |
@dr-dimitru @liu0fanyi Thanks, I'll try and let you know. I hope it works... I already spent too much time with this and I'm clise to give up and stick to prerender. BTW, the same error happens with original spiderable package and also with few other forks. |
@perak keep me updated. This should solve it. Updated docs with explanation for every flag is on the way |
👍 tnx! |
BTW, @dr-dimitru, I'm just curious, can you reproduce/do you have the same issue?
curl http://localhost:3000/?_escaped_fragment_= and... kaboom! select: invalid argument (didn't tried yet to set env var as you suggested in last messages, typing from mobile phone, will try as soon as I reach my computer) |
@perak Just tried on The one difference |
The same OS and phantomjs but installed via And the same problem on Ubuntu 16.04 & phantomjs. OK, now I'm with my computer... |
- Attempt so solve #50 , thanks to @perak and @liu0fanyi - Introducing `SPIDERABLE_FLAGS` env.var to set `phantomjs` process flags (attributes), see [updated docs](https://github.com/VeliovGroup/jazeee-meteor-spiderable#spiderable _flags-environment-variable) - Better tests with `meteor test-packages ./` - Overall codebase minor enhancements
OK, thank you! I will do it when I reach my computer (most likely ~10 hours after now). |
Oh, okay, keep me updated |
Sure. Thank you for your help again! BTW, I'll put you to the list of contributors at meteorkitchen.com once we solve this 👍 |
Thanks a lot :) Meanwhile I've tested various older phantomjs versions including v1.x.x with no luck. Not sure if it's related, but - unlike modern browsers phantomjs may not forgive developer for miswritten code. At the same time this is not applicable as babel wouldn't forgive it too, or at least will fix some mistakes on compilation. Anyways - I recommend to run ESLint against your code, perhaps some static file (which is not processed by babel) may have an error. |
I have ran into the same issue. Running Meteor 1.4 using the following environment variables — SPIDERABLE_FLAGS="--load-images=no --ssl-protocol=TLSv1 --ignore-ssl-errors=true --web-security=false". Still have the same problem. |
@vmatekole did you tried latest not yet published a94a976 or you are using latest published version? |
@perak I just added the package today — do I have to fork and install locally for this patch? |
@perak yes, just drop it into |
@vmatekole I suggest you to try script posted here in this thread, you'll get more error messages than "select: invalid argument" abd will be easier ti debug. Copy it to file, change url to point to your site and run: phantomjs your_file.js |
having the exact same issue. lots of "select: Invalid argument" then i increased bufferSize: Spiderable.bufferSize = 500 * 1024 * 1024; and now i got
after 5-10seconds. standalone script is running:
but also needs roughly 10seconds its a heavy react app Edit: with 1.3.4 i get (after 10-15s):
Edit 2: It fails at this point, because the stdout is too long there, its again the endless list of "select: Invalid argument" (RangeError might be because of this: nodejs/node-v0.x-archive#14170) |
After pause I am fighting with this again. Using remote debugging for phantomjs I finally got better error message that causes infinite loop of "select: invalid argument" which causes buffer overflow at the end. Problem is: some of js code contains ES6 (not transpiled properly to ES5) which didn't happen with Meteor 1.3. Since I upgraded to 1.4 problem appears (and the same after upgrade to 1.5). In my case modules.js contains ES6 code (arrow functions to be precise) which produces "unespected symbol >". Now investigating in that direction (can be Meteor's bug) |
By the way, this is not directly caused by this package, but I suggest to keep this thread open as it affects SEO (abd at the end can cause people stop using phantomjs/spiderable as error messages are hidden). |
I switched to https://github.com/bosondata/chrome-prerender which ngnix config (node-prerender-middleware should also work), which works fine so far. phantomjs is dead. We should finally burry it. |
@perak anyways I believe it's not an issue for this package apps nowadays should be compatible with ES5-only browsers. Could you fix it with ecmascript package and .babelrc config? |
@macrozone @perak speaking of rendering with headless chrome - it works. |
@dr-dimitru finally, when I remove |
@perak are you using |
Using it because I am instantiating global |
@perak Could you give a code sample? Looks like it works on my end with |
@dr-dimitru excuse me, I gave you wrong info... I'm trying everything and my code is in mess. It's not caused by babel-pooyfill. Last what is suspicious (before I drop tired last night) was my npm module "blaze2gasoline" (plus fact it is written by me makes more chance it is a problem :D ). Will continue investigation later today... |
(if I just add "blaze2gasoline" to project it doesn't crash phantom. It crashes when I use it, so after I put that code into comment I finally got page rendered by phantom.... |
@perak thank you keep this thread updated |
@dr-dimitru OK, fixed! 😃 Actually, not sure exact solution but this is what I have done:
After that, I rebuilt everything (deleted And again: I am still not sure what exactly caused the problem but after these actions it worked and as I spent too much time on this, I simply cannot investigate more. I believe nobody else is using gasoline-turbo and blaze2gasoline (libs specific for my project meteor-kitchen), but I guess they have similar problem - must be something with npm modules/es6/transpiling. |
@dr-dimitru By the way, I added you to the contributors list, don't know your name so I hope "Dr.Dimitru" is OK :) https://www.meteorkitchen.com/contribute Thanks again. |
@perak great thanks. |
@dr-dimitru Sure, I will change that. Mail: see at contribute page / donate section is my e-mail address. |
@perak you might me interested in Let me know what do you think |
after
curl http://localhost:3000/\?_escaped_fragment_\=
get lots of
select: Invalid argument
, and can't stopI do these steps:
meteor add jazeee:spiderable-longer-timeout
Meteor.isReadyForSpiderable = true;
in one of my react component'scomponentDidMount()
I use
react-router
, so .... I can't findRouter.onAfterAction
...I want some suggestions or sample.....
Thanks a lot!
The text was updated successfully, but these errors were encountered: