Skip to content
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

When the files that are going to be uploaded don't exist give a descriptive error #144

Closed
feniix opened this issue Jan 20, 2015 · 2 comments

Comments

@feniix
Copy link

feniix commented Jan 20, 2015

Hi, I run into an issue today while running s3_website for a jekyll site.

In my s3_website.yml file I had this statement public/_site and when running locally I was using jekyll serve -w so the site was being generated.

When I tried to use s3_website within my continuous build, by mistake I forgot to generate the site which is generated to the directory public/_site.

Instead of saying "file not found" or something like that, s3_website just outputted this stack trace.

cd public && s3_website push --dry-run --verbose
[info] Downloading https://github.com/laurilehmijoki/s3_website/releases/download/v2.7.3/s3_website.jar into /home/ubuntu/.rvm/gems/ruby-2.1.3/gems/s3_website-2.7.3/s3_website-2.7.3.jar
[debg] Using /home/ubuntu/.rvm/gems/ruby-2.1.3/gems/s3_website-2.7.3/s3_website-2.7.3.jar
[info] Simulating the deployment of /home/ubuntu/spantree.net/public/_site/* to www.spantree.net
[debg] Querying S3 files
Exception in thread "main" java.lang.NullPointerException
    at scala.collection.mutable.ArrayOps$ofRef$.newBuilder$extension(ArrayOps.scala:190)
    at scala.collection.mutable.ArrayOps$ofRef.newBuilder(ArrayOps.scala:186)
    at scala.collection.TraversableLike$class.filterImpl(TraversableLike.scala:257)
    at scala.collection.TraversableLike$class.filter(TraversableLike.scala:270)
    at scala.collection.mutable.ArrayOps$ofRef.filter(ArrayOps.scala:186)
    at s3.website.model.Files$.recursiveListFiles(push.scala:131)
    at s3.website.model.Files$.listSiteFiles(push.scala:148)
    at s3.website.UploadHelper$.resolveDeletes(UploadHelper.scala:53)
    at s3.website.Push$$anonfun$9$$anonfun$10$$anonfun$apply$8.apply(Push.scala:102)
    at s3.website.Push$$anonfun$9$$anonfun$10$$anonfun$apply$8.apply(Push.scala:102)
    at scala.util.Either.fold(Either.scala:99)
    at s3.website.Push$$anonfun$9$$anonfun$10.apply(Push.scala:100)
    at s3.website.Push$$anonfun$9$$anonfun$10.apply(Push.scala:99)
    at scala.concurrent.Future$$anonfun$flatMap$1.apply(Future.scala:251)
    at scala.concurrent.Future$$anonfun$flatMap$1.apply(Future.scala:249)
    at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745) command cd public && s3_website push --dry-run --verbose took more than 3 minutes since last output

After running the site generate s3_website started working so I am pretty sure the missing directory was causing s3_website to choke.

Let me know if you need more info, I am using s3_website 2.7.3

Regards

@laurilehmijoki
Copy link
Owner

Hi @feniix and thanks for reporting the problem.

I just released the version 2.7.4. It should give you a helpful error message if the site directory does not exist.

Please try that version. Does it solve your problem?

@feniix
Copy link
Author

feniix commented Jan 21, 2015

That is great!

[info] Downloading https://github.com/laurilehmijoki/s3_website/releases/download/v2.7.4/s3_website.jar into /Users/otaeguis/.rvm/gems/ruby-2.1.5/gems/s3_website-2.7.4/s3_website-2.7.4.jar
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
[fail] Could not load the site:
       Could not find a site at public/_site. Check the --site argument..
       Either use the --site=DIR command-line argument or define the location of the site in s3_website.yml.

@feniix feniix closed this as completed Jan 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants