jamesgpearce / confess

[ARCHIVED] Uses PhantomJS to headlessly analyze web pages and generate manifests. You may be able to use the puppeteer-har package instead.
874 stars 101 forks source link

undefined:4 SyntaxError: Parse error #3

Open pkuczynski opened 12 years ago

pkuczynski commented 12 years ago

I get this error when I run following command:

phantomjs confess.js http://www.rafalkuczynski.com

My version of phantomjs is 1.3.0 and I am running MacOS X Lion

jamesgpearce commented 12 years ago

Hmmm... can't reproduce on 1.4.0. It seems to work fine.

phantomjs confess.js http://www.rafalkuczynski.com 
CACHE MANIFEST

# Time: Tue Jan 17 2012 12:06:27 GMT-0800 (PST)
# This manifest was created by confess.js, http://github.com/jamesgpearce/confess
#
# Retrieved URL: http://www.rafalkuczynski.com/
# User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X) AppleWebKit/534.34 (KHTML, like Gecko) PhantomJS/1.4.0 Safari/534.34
#
# Config:
#  task: appcache
#  userAgent: default
#  wait: 0
#  consolePrefix: #
#  verbose: true
#  appcache:
#   urlsFromDocument: true
#   urlsFromRequests: false
#   cacheFilter: .*
#   networkFilter: null
#  url: http://www.rafalkuczynski.com
#  configFile: config.json

CACHE:
/images/1x1.gif
/images/ico-email.png
/images/ico-facebook.png
/images/ico-linkedin.png
/images/ico-phone.png
/images/ico-skype.png
/images/text-contactme.png
/images/text-myprojects.png
/images/text-rafal-kuczynski.png
/js/history.js-1.7.0/compressed/history.adapter.jquery.js
/js/history.js-1.7.0/compressed/history.html4.js
/js/history.js-1.7.0/compressed/history.js
/js/jquery-1.4.2.min.js
/rafalkuczynski.css
http://www.google-analytics.com/ga.js
http://www.rafalkuczynski.com/images/arrows.png
http://www.rafalkuczynski.com/images/background.jpg
http://www.rafalkuczynski.com/images/line-h.gif
http://www.rafalkuczynski.com/images/line-v.gif
http://www.rafalkuczynski.com/images/loading-thumb.gif
http://www.rafalkuczynski.com/images/menu-all.png

NETWORK:
*
pkuczynski commented 12 years ago

This issue actually exists even with 1.5.0, but only when you have no connectivity to the remote URL

jamesgpearce commented 12 years ago

Piotr,

I can't reproduce this: on Phantom 1.4, I get this (first with no network, the second with)

Any thoughts? James

jpearcemba:confess jpearce$ ./phantomjs --version 1.4.0 jpearcemba:confess jpearce$ ./phantomjs confess.js http://www.rafalkuczynski.com

FAILED TO LOAD

jpearcemba:confess jpearce$ ./phantomjs confess.js http://www.rafalkuczynski.com CACHE MANIFEST

Time: Sun May 27 2012 20:09:53 GMT-0700 (PDT)

This manifest was created by confess.js,

http://github.com/jamesgpearce/confess #

Retrieved URL: http://www.rafalkuczynski.com/

User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.11 (KHTML,

like Gecko) Chrome/17.0.963.12 Safari/535.11 #

Config:

task: appcache

userAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.11 (KHTML,

like Gecko) Chrome/17.0.963.12 Safari/535.11

wait: 0

consolePrefix:

verbose: true

appcache:

urlsFromDocument: true

urlsFromRequests: false

cacheFilter: .*

networkFilter: null

url: http://www.rafalkuczynski.com

configFile: config.json

CACHE: /images/1x1.gif /images/ico-email.png /images/ico-facebook.png /images/ico-linkedin.png /images/ico-phone.png /images/ico-skype.png /images/text-contactme.png /images/text-myprojects.png /images/text-rafal-kuczynski.png /js/history.js-1.7.0/compressed/history.adapter.jquery.js /js/history.js-1.7.0/compressed/history.html4.js /js/history.js-1.7.0/compressed/history.js /js/jquery-1.4.2.min.js /rafalkuczynski.css http://www.google-analytics.com/ga.js http://www.rafalkuczynski.com/images/arrows.png http://www.rafalkuczynski.com/images/background.jpg http://www.rafalkuczynski.com/images/line-h.gif http://www.rafalkuczynski.com/images/line-v.gif http://www.rafalkuczynski.com/images/loading-thumb.gif http://www.rafalkuczynski.com/images/menu-all.png

NETWORK: *

On 16 May 2012 15:43, Piotr Kuczynski < reply@reply.github.com

wrote:

This issue actually exists even with 1.5.0, but only when you have no connectivity to the remote URL


Reply to this email directly or view it on GitHub: https://github.com/jamesgpearce/confess/issues/3#issuecomment-5754092

pkuczynski commented 12 years ago

Yes! I actually know what was wrong! The scripts works fine with the open internet. It only fails in my office, where we need to use proxy servers. The error message was misleading me and the script did not used the Mac OS X terminal variables http_proxy. I didnt know that, until I tried on the open network just recently! Sorry for not letting you know earlier...

Do you need any info to debug it and modify it to give better error message?