encoredev / encore

Encore is the Backend Development Platform purpose-built to help you create event-driven and distributed systems.

Home Page:https://encore.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

❌ Verifying application configuration...

braswelljr opened this issue · comments

❌ Verifying application configuration... Failed: Unhandled Panic

── Unhandled Panic ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────[E0001]──

A unhandled panic occurred: runtime error: invalid memory address or nil pointer dereference

This is a bug in Encore and should not have occurred. Please report this issue to the Encore team either on Github at https://github.com/encoredev/encore/issues/new and include this
error.

╭─[Stack Trace]
├─▶ compiler.(*builder).Build.func1 D:/a/encore/encore/encr.dev/compiler/build.go:161
├─▶ ast.(*Ident).Pos C:/hostedtoolcache/windows/go/1.19.2/x64/src/go/ast/ast.go:481
├─▶ internal.FromGoASTNode D:/a/encore/encore/encr.dev/pkg/errinsrc/internal/golocation.go:22
├─▶ srcerrors.DatabaseNotFound D:/a/encore/encore/encr.dev/pkg/errinsrc/srcerrors/errors.go:75
├─▶ compiler.(*builder).checkApp D:/a/encore/encore/encr.dev/compiler/build.go:292
├─▶ compiler.(*builder).Build D:/a/encore/encore/encr.dev/compiler/build.go:205
╰─[... remaining frames omitted ...]

Thanks for the report @braswelljr! Could you share a reproducer of what the code is that panics? Thank you!

Thanks for the concern @eandre had a bad import which caused the issue.

@braswelljr glad to hear you found the cause, but the Encore compiler should not panic in that case! If you can share roughly what the code was it would be great so we can fix it. Thanks!

I was able to reproduce a very similar looking error message by requesting a named db:
var userDB = sqldb.Named("user").Stdlib()
without even having a migrations folder in the user folder.