jacobobryant / biff

A Clojure web framework for solo developers.
https://biffweb.com
MIT License
829 stars 40 forks source link

Biff example site does not load: java.lang.ArithmeticException: long overflow #187

Closed dhazel closed 6 months ago

dhazel commented 6 months ago

Hi!

Thanks for the great project! I love that Biff is a quick option for getting started with Clojure webdev.

I am quite new to Biff and Clojure webdev in general, so if this is a noob question, then thanks for humoring me :)

My system info is as follows:

When I follow the getting started instructions, found here, after running clj -M:dev dev, then every time I hit the site at localhost:7888 I am seeing the following error repeated in the console:

ERROR:
java.lang.ArithmeticException: long overflow
        at java.base/java.lang.Math.multiplyExact(Math.java:1004)
        at clojure.lang.Numbers.multiply(Numbers.java:1971)
        at nrepl.bencode$read_long.invokeStatic(bencode.clj:128)
        at nrepl.bencode$read_long.invokePrim(bencode.clj)
        at nrepl.bencode$read_netstring_STAR_.invokeStatic(bencode.clj:155)
        at nrepl.bencode$read_netstring_STAR_.invoke(bencode.clj:153)
        at nrepl.bencode$read_token.invokeStatic(bencode.clj:246)
        at nrepl.bencode$read_token.invoke(bencode.clj:236)
        at nrepl.bencode$read_bencode.invokeStatic(bencode.clj:256)
        at nrepl.bencode$read_bencode.invoke(bencode.clj:253)
        at nrepl.transport$bencode$fn__28600$fn__28601.invoke(transport.clj:122)
        at nrepl.transport$bencode$fn__28600.invoke(transport.clj:122)
        at nrepl.transport$fn_transport$fn__28554.invoke(transport.clj:50)
        at clojure.core$binding_conveyor_fn$fn__5823.invoke(core.clj:2047)
        at clojure.lang.AFn.call(AFn.java:18)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
        at java.base/java.lang.Thread.run(Thread.java:840)

This looks similar to an error reported in the nrepl repository.

I wonder if there is a fix or a work-around for it for Biff?

jacobobryant commented 6 months ago

Hi! I think this is the problem:

every time I hit the site at localhost:7888

You need to go to localhost:8080 in your browser; port 7888 is only meant to be used by your editor's nrepl plugin. I get the same overflow error if I do curl http://localhost:7888.

dhazel commented 6 months ago

Success! Thank you!!