confess icon indicating copy to clipboard operation
confess copied to clipboard

undefined:4 SyntaxError: Parse error

Open pkuczynski opened this issue 13 years ago • 4 comments

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

pkuczynski avatar Jan 05 '12 15:01 pkuczynski

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:
*

jamesgpearce avatar Jan 17 '12 20:01 jamesgpearce

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

pkuczynski avatar May 16 '12 22:05 pkuczynski

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 < [email protected]

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

jamesgpearce avatar May 28 '12 03:05 jamesgpearce

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?

pkuczynski avatar May 28 '12 17:05 pkuczynski