ihucos / counter.dev-selfhost

GNU Affero General Public License v3.0
18 stars 1 forks source link

Failed to setup Counter.dev Selfhost #1

Open raniaamina opened 1 year ago

raniaamina commented 1 year ago

Hi, i try to follow the install instruction, but get this error message in step 2, create user

panic: NOAUTH Authentication required.

goroutine 1 [running]:
main.getSecret({0xa15f48, 0xc0001c52c0}, {0x8b74f5, 0x19})
        /home/ihucos/counter.dev-selfhosted/main.go:37 +0x2f9
main.getApp(0x7469e1ac00000000?)
        /home/ihucos/counter.dev-selfhosted/main.go:59 +0x20d
main.main.func2(0xc00020c600)
        /home/ihucos/counter.dev-selfhosted/main.go:127 +0xe7
github.com/urfave/cli/v2.(*Command).Run(0xc0000fa9a0, 0xc00020c600, {0xc0001e29c0, 0x6, 0x6})
        /home/ihucos/go/pkg/mod/github.com/urfave/cli/v2@v2.25.0/command.go:273 +0xa42
github.com/urfave/cli/v2.(*Command).Run(0xc0000fadc0, 0xc00020c500, {0xc0000ba000, 0x7, 0x7})
        /home/ihucos/go/pkg/mod/github.com/urfave/cli/v2@v2.25.0/command.go:266 +0xc8a
github.com/urfave/cli/v2.(*App).RunContext(0xc0001ca1e0, {0xa151b8?, 0xc0000c2048}, {0xc0000ba000, 0x7, 0x7})
        /home/ihucos/go/pkg/mod/github.com/urfave/cli/v2@v2.25.0/app.go:332 +0x605
github.com/urfave/cli/v2.(*App).Run(...)
        /home/ihucos/go/pkg/mod/github.com/urfave/cli/v2@v2.25.0/app.go:309
main.main()
        /home/ihucos/counter.dev-selfhosted/main.go:167 +0x507

is there any clue to solve this? I use Debian 11 as server for this test.

raniaamina commented 1 year ago

it's fixed, by adding redis credential inside redis url. But whe i try to run the service, i get blank page as you can see below, after login.

gambar

salim-b commented 1 year ago

I see the same page after login 🫤

In the browser console, I don't see anything that could cause the missing page content, only that /load.js has the wrong MIME type (text/plain instead of text/javascript), but it gets loaded anyways (unless you set the X-Content-Type-Options: nosniff header; see https://github.com/ihucos/counter.dev-selfhost/issues/2).

Any hints @ihucos?

ihucos commented 1 year ago

Apologies for the super late response. I will check it!

ihucos commented 1 year ago

Thank you very much for the patience.

I was not able to reproduce it. The mentioned issue #2 is fixed, a new release can be found here: https://github.com/ihucos/counter.dev-selfhost/releases/tag/0.2.1

I don't imagine this fixed this issue, but maybe worth a try with the new release.

Weird that the console does not hint at anything. Which browser is that. Are you able to create a new user ($ cntr createuser --redis-url redis://localhost:6379 --utc-offset 2 newuser) and then simulate a page tracking curl http://localhost:8080/track?id=insert-long-uuid-here -H 'Origin: test.dev'.

This is how I tried to reproduce.

Thanks!

raniaamina commented 11 months ago

@ihucos, how i can get uuid for test? I try serve latest version as you share in https://github.com/ihucos/counter.dev-selfhost/releases/tag/0.2.1 but still get same blank page as before

ihucos commented 10 months ago

The uuid is in the data-id attribute of a snipped code. So you can register a test user and you are immediately redirected to your snipped code where you can find the uuid.