hyperfiddle

2025-03-27T06:49:36.480539Z

when ran electric3-starter-app, got this kind of error in dev mode but no error in prod mode. I've searched but didn't get hints why this is happening. Can i get some guide how to workaround it?

❯ clj -A:dev -X dev/-main
Performance warning, hyperfiddle/electric/impl/runtime3.cljc:1800:5 - case has int tests, but tested expression is not primitive.
Performance warning, hyperfiddle/electric/impl/runtime3.cljc:1809:5 - case has int tests, but tested expression is not primitive.
INFO  dev: Starting Electric compiler and server...
INFO  io.undertow: starting server: Undertow - 2.3.10.Final
INFO  org.xnio: XNIO version 3.8.8.Final
INFO  org.xnio.nio: XNIO NIO Implementation Version 3.8.8.Final
INFO  org.jboss.threads: JBoss Threads version 3.5.0.Final
shadow-cljs - server version: 2.26.2 running at 
shadow-cljs - nREPL server started on port 58860
[:dev] Configuring build.
[:dev] Compiling ...
Please sign up or login to activate:  
Failed to authenticate: incorrect authentication redirect.
Compiling ...
[:dev] Build failure:
Hook [0 hyperfiddle.electric.shadow-cljs.hooks3/reload-clj] failed in stage :compile-prepare
hook returned invalid result
{:type :shadow.build/invalid-hook-result, :hook-sym hyperfiddle.electric.shadow-cljs.hooks3/reload-clj, :build-id :dev, :stage :compile-prepare}
ExceptionInfo: hook returned invalid result
...

Dustin Getz (Hyperfiddle) 2025-03-30T10:51:29.057739Z

you're right, we will fix it

👍 1
Geoffrey Gaillard 2025-03-28T08:56:07.468989Z

From the logs on starter app boot in dev mode: Please sign up or login to activate: This is what one should see after clicking the link when the app boots, and after authentication – if not already authenticated. Are you seeing the same thing on your machine?

henrik 2025-03-27T07:49:38.258509Z

For long stacktraces and stuff, consider sticking it in a Text snippet. The size makes the chat a tad unnavigable otherwise.

Geoffrey Gaillard 2025-03-27T08:46:56.416299Z

I tried with a fresh clone of . dev mode compilation worked. I see Failed to authenticate: incorrect authentication redirect. in your logs. Are you able to reproduce the error from a fresh clone?

2025-03-27T20:37:52.848699Z

@henrik Thanks for your tip.

👍 1
2025-03-27T20:55:49.679679Z

@ggaillard I got the same error for fresh clone. early access permission related?

Dustin Getz (Hyperfiddle) 2025-03-27T21:00:27.377979Z

there is no permission check, all logins are accepted

Dustin Getz (Hyperfiddle) 2025-03-27T21:00:42.347069Z

are you using a real email address?

Dustin Getz (Hyperfiddle) 2025-03-27T21:02:21.699939Z

I see successful logins in the auth0 logs, this is our first time seeing this issue

Dustin Getz (Hyperfiddle) 2025-03-27T21:14:18.353549Z

it seems that we aren't scooping logs from the place where the exception is, so i don't see a way to get the exception, we may have to make a change to debug this

2025-03-28T01:13:31.457009Z

@dustingetz what do you mean by real email address? I just git-cloned the repo and ran it. Actually I used well for electric v2 but for v3 I got this problem. In prod mode, build-client is okay and no problem. No idea why login authentication coming out in dev mode.

Dustin Getz (Hyperfiddle) 2025-03-28T01:22:22.074039Z

https://gitlab.com/hyperfiddle/electric3-starter-app#license

2025-03-28T01:59:30.232969Z

Got it. I didn't follow up this change of license.

2025-03-29T10:35:40.730409Z

it seems this problem is caused by redirect-uri http port 8081 that is already bound in system. When got message "please sign-in or login ....", I tried recompiling it from shadow-cljs web page, then electric clojure gave me new redirect-uri using other port like 8082. With new one, I got authentication complete. After authentication done, no further problem.

👀 1
Dustin Getz (Hyperfiddle) 2025-03-29T11:14:54.866659Z

you mean 8081 is conflicting with another running app on your system?

Dustin Getz (Hyperfiddle) 2025-03-29T11:15:12.140879Z

You might also have a dangling tab

2025-03-30T02:18:12.518849Z

Yes, it may. I think redirect-uri port should be more carefully chosed and tried to guarantee it works in browser.