Closed john-s-morgan closed 2 years ago
Hi John,
Actually, I am not sure what happened.
How about trying that again after upgrading all buffalo components to the recent versions? There were some changes regarding grift(the engine of tasks like buffalo task routes
) and routing print mechanism with a virtual host recently, but it seems like your output format of buffalo routes
is the old one. So if your situation and environment allow it, please try that again after upgrading all modules to a recent one and let us know the symptom.
good point, our version was out of date. Upgraded modules to latest CLI and framework version, ran buffalo fix
to update, and here's the updated output:
oot@03dc3dc53f56:/src/api# buffalo routes # github.com/mattn/go-sqlite3 sqlite3-binding.c: In function ‘sqlite3SelectNew’: sqlite3-binding.c:128049:10: warning: function may return address of local variable [-Wreturn-local-addr] 128049 | return pNew; | ^~~~ sqlite3-binding.c:128009:10: note: declared here 128009 | Select standin; | ^~~~~~~ METHOD | HOST | PATH | ALIASES | NAME | HANDLER ------ | ---- | ---- | ------- | ---- | -------
-> Go: Checking installation ✓ The `go` executable was found on your system at: /usr/local/go/bin/go -> Go: Checking minimum version requirements ✓ Your version of Go, 1.18.2, meets the minimum requirements. -> Go: Checking Package Management ✓ You are using Go Modules (`go`) for package management. -> Go: Checking PATH ✓ Your PATH contains /go/bin. -> Node: Checking installation ✓ The `node` executable was found on your system at: /usr/local/nvm/versions/node/v16.15.0/bin/node -> Node: Checking minimum version requirements ✓ Your version of Node, v16.15.0, meets the minimum requirements. -> NPM: Checking installation ✓ The `npm` executable was found on your system at: /usr/local/nvm/versions/node/v16.15.0/bin/npm -> NPM: Checking minimum version requirements ✓ Your version of NPM, 8.5.5, meets the minimum requirements. -> Yarn: Checking installation ✘ The `yarnpkg` executable could not be found on your system. For help setting up your Yarn environment please follow the instructions for you platform at: https://yarnpkg.com/en/docs/install -> PostgreSQL: Checking installation ✘ The `postgres` executable could not be found on your system. For help setting up your Postgres environment please follow the instructions for you platform at: https://www.postgresql.org/download/ -> MySQL: Checking installation ✘ The `mysql` executable could not be found on your system. For help setting up your MySQL environment please follow the instructions for you platform at: https://www.mysql.com/downloads/ -> SQLite3: Checking installation ✓ The `sqlite3` executable was found on your system at: /usr/bin/sqlite3 -> SQLite3: Checking minimum version requirements ✓ Your version of SQLite3, 3.34.1, meets the minimum requirements. -> Cockroach: Checking installation ✘ The `cockroach` executable could not be found on your system. For help setting up your Cockroach environment please follow the instructions for you platform at: https://www.cockroachlabs.com/docs/stable/ -> Buffalo (CLI): Checking installation ✓ The `buffalo` executable was found on your system at: /go/bin/buffalo -> Buffalo (CLI): Checking minimum version requirements ✓ Your version of Buffalo (CLI), v0.18.6, meets the minimum requirements. -> Buffalo: Application Details Pwd /src/api Root /src/api GoPath /go PackagePkg github.com/CheeseTheApp/Backend/api ActionsPkg github.com/CheeseTheApp/Backend/api/actions ModelsPkg github.com/CheeseTheApp/Backend/api/models GriftsPkg github.com/CheeseTheApp/Backend/api/grifts WithModules true Name api Bin bin/api VCS none WithPop true WithSQLite false WithDep false WithWebpack false WithNodeJs false WithYarn false WithDocker true WithGrifts true AsWeb false AsAPI true InApp true PackageJSON {map[build:webpack --mode production --progress dev:webpack --watch]} -> Buffalo: config/buffalo-app.toml name = "api" bin = "bin/api" vcs = "none" with_pop = true with_sqlite = false with_dep = false with_webpack = false with_nodejs = false with_yarn = false with_docker = true with_grifts = true as_web = false as_api = true -> Buffalo: config/buffalo-plugins.toml [[plugin]] binary = "buffalo-pop" go_get = "github.com/gobuffalo/buffalo-pop/v3" -> Buffalo: config/config.go package config import ( "context" "strings" "cloud.google.com/go/firestore" firebase "firebase.google.com/go/v4" "firebase.google.com/go/v4/auth" "firebase.google.com/go/v4/messaging" "github.com/CheeseTheApp/Backend/api/utils" "github.com/gobuffalo/envy" "google.golang.org/api/option" ) type Config struct { ctx context.Context firebaseOpts []option.ClientOption IVSPEM string } // ProvideConfig constructs a new application configuration. func ProvideConfig(ctx context.Context) *Config { var ( cfg = &Config{ctx: ctx} creds = envy.Get("GOOGLE_APPLICATION_CREDENTIALS_JSON", "invalidcredentials") ) if strings.HasPrefix(creds, `{"`) { cfg.firebaseOpts = append(cfg.firebaseOpts, option.WithCredentialsJSON([]byte(creds))) } // TODO: b64 encode and decode ivs pem key to overcome secret manager limitations cfg.IVSPEM = envy.Get("IVS_PEM_BASE64", "") return cfg } // ProvideFirebaseApp constructs a firebase application. func ProvideFirebaseApp(cfg *Config) (*firebase.App, error) { return firebase.NewApp(cfg.ctx, nil, cfg.firebaseOpts...) } // ProvideFirestore constructs a firestore client. func ProvideFirestore(cfg *Config, firebaseApp *firebase.App) (*firestore.Client, error) { return firebaseApp.Firestore(cfg.ctx) } // ProvideFirebaseAuth construct the firebase auth client. func ProvideFirebaseAuth(cfg *Config, firebaseApp *firebase.App) (*auth.Client, error) { return firebaseApp.Auth(cfg.ctx) } // ProvideFirebaseMessaging construct the firebase messaging client. func ProvideFirebaseMessaging(cfg *Config, firebaseApp *firebase.App) (*messaging.Client, error) { // no firebase messaging emulator available for local development if utils.IsDevelopment() { return nil, nil } return firebaseApp.Messaging(cfg.ctx) } -> Buffalo: go.mod module github.com/CheeseTheApp/Backend/api go 1.18 require ( cloud.google.com/go/firestore v1.6.1 firebase.google.com/go/v4 v4.8.0 github.com/RichardKnop/machinery v1.10.6 github.com/alicebob/miniredis/v2 v2.18.0 github.com/aws/aws-sdk-go v1.44.1 github.com/deckarep/golang-set/v2 v2.1.0 github.com/go-co-op/gocron v1.13.0 github.com/gobuffalo/buffalo v0.18.7 github.com/gobuffalo/envy v1.10.1 github.com/gobuffalo/httptest v1.5.1 github.com/gobuffalo/logger v1.0.6 github.com/gobuffalo/mw-contenttype v0.0.0-20190224202710-36c73cc938f3 github.com/gobuffalo/mw-paramlogger v0.0.0-20190129202837-395da1998525 github.com/gobuffalo/nulls v0.4.1 github.com/gobuffalo/pop/v6 v6.0.4 github.com/gobuffalo/suite/v4 v4.0.2 github.com/gobuffalo/validate/v3 v3.3.1 github.com/gobuffalo/x v0.1.0 github.com/gofrs/uuid v4.2.0+incompatible github.com/golang-jwt/jwt v3.2.2+incompatible github.com/gomodule/redigo v2.0.0+incompatible github.com/google/uuid v1.3.0 github.com/google/wire v0.5.0 github.com/googleapis/gax-go/v2 v2.3.0 github.com/jackc/pgconn v1.12.1 github.com/markbates/grift v1.5.0 github.com/pkg/errors v0.9.1 github.com/rs/cors v1.8.0 github.com/sirupsen/logrus v1.8.1 github.com/stretchr/testify v1.7.1 github.com/swaggo/buffalo-swagger v1.2.0 github.com/swaggo/swag v1.8.0 google.golang.org/api v0.76.0 google.golang.org/grpc v1.45.0 gopkg.in/DataDog/dd-trace-go.v1 v1.36.2 gopkg.in/launchdarkly/go-sdk-common.v2 v2.5.0 gopkg.in/launchdarkly/go-server-sdk.v5 v5.9.0 ) require ( cloud.google.com/go v0.100.2 // indirect cloud.google.com/go/compute v1.6.0 // indirect cloud.google.com/go/iam v0.3.0 // indirect cloud.google.com/go/pubsub v1.20.0 // indirect cloud.google.com/go/storage v1.21.0 // indirect github.com/BurntSushi/toml v1.1.0 // indirect github.com/DataDog/datadog-agent/pkg/obfuscate v0.34.0-rc.1 // indirect github.com/DataDog/datadog-go v4.8.3+incompatible // indirect github.com/DataDog/datadog-go/v5 v5.0.2 // indirect github.com/DataDog/sketches-go v1.3.0 // indirect github.com/KyleBanks/depth v1.2.1 // indirect github.com/Masterminds/semver/v3 v3.1.1 // indirect github.com/Microsoft/go-winio v0.5.1 // indirect github.com/PuerkitoBio/purell v1.1.1 // indirect github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect github.com/RichardKnop/logging v0.0.0-20190827224416-1a693bdd4fae // indirect github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a // indirect github.com/aymerick/douceur v0.2.0 // indirect github.com/bradfitz/gomemcache v0.0.0-20220106215444-fb4bf637b56d // indirect github.com/cespare/xxhash/v2 v2.1.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/dgraph-io/ristretto v0.1.0 // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect github.com/dustin/go-humanize v1.0.0 // indirect github.com/fatih/color v1.13.0 // indirect github.com/fatih/structs v1.1.0 // indirect github.com/felixge/httpsnoop v1.0.3 // indirect github.com/fsnotify/fsnotify v1.5.4 // indirect github.com/go-openapi/jsonpointer v0.19.5 // indirect github.com/go-openapi/jsonreference v0.19.6 // indirect github.com/go-openapi/spec v0.20.4 // indirect github.com/go-openapi/swag v0.19.15 // indirect github.com/go-redis/redis/v8 v8.11.5 // indirect github.com/go-redsync/redsync/v4 v4.5.0 // indirect github.com/go-sql-driver/mysql v1.6.0 // indirect github.com/go-stack/stack v1.8.1 // indirect github.com/gobuffalo/events v1.4.2 // indirect github.com/gobuffalo/fizz v1.14.0 // indirect github.com/gobuffalo/flect v0.2.5 // indirect github.com/gobuffalo/github_flavored_markdown v1.1.1 // indirect github.com/gobuffalo/helpers v0.6.4 // indirect github.com/gobuffalo/meta v0.3.1 // indirect github.com/gobuffalo/mw-csrf v1.0.0 // indirect github.com/gobuffalo/plush/v4 v4.1.11 // indirect github.com/gobuffalo/tags/v3 v3.1.2 // indirect github.com/golang/glog v1.0.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/go-cmp v0.5.7 // indirect github.com/gorilla/css v1.0.0 // indirect github.com/gorilla/handlers v1.5.1 // indirect github.com/gorilla/mux v1.8.0 // indirect github.com/gorilla/securecookie v1.1.1 // indirect github.com/gorilla/sessions v1.2.1 // indirect github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/inconshreveable/mousetrap v1.0.0 // indirect github.com/jackc/chunkreader/v2 v2.0.1 // indirect github.com/jackc/pgio v1.0.0 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect github.com/jackc/pgproto3/v2 v2.3.0 // indirect github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b // indirect github.com/jackc/pgtype v1.11.0 // indirect github.com/jackc/pgx/v4 v4.16.1 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmoiron/sqlx v1.3.5 // indirect github.com/joho/godotenv v1.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/karrick/godirwalk v1.17.0 // indirect github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect github.com/kelseyhightower/envconfig v1.4.0 // indirect github.com/klauspost/compress v1.15.1 // indirect github.com/launchdarkly/ccache v1.1.0 // indirect github.com/launchdarkly/eventsource v1.6.2 // indirect github.com/launchdarkly/go-semver v1.0.2 // indirect github.com/luna-duclos/instrumentedsql v1.1.3 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/markbates/oncer v1.0.0 // indirect github.com/markbates/refresh v1.12.0 // indirect github.com/markbates/safe v1.0.1 // indirect github.com/mattn/go-colorable v0.1.12 // indirect github.com/mattn/go-isatty v0.0.14 // indirect github.com/mattn/go-sqlite3 v2.0.3+incompatible // indirect github.com/microcosm-cc/bluemonday v1.0.18 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/monoculum/formam v3.5.5+incompatible // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/patrickmn/go-cache v2.1.0+incompatible // indirect github.com/philhofer/fwd v1.1.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/robfig/cron/v3 v3.0.1 // indirect github.com/rogpeppe/go-internal v1.8.1 // indirect github.com/sergi/go-diff v1.2.0 // indirect github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d // indirect github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e // indirect github.com/spf13/cobra v1.4.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/streadway/amqp v1.0.0 // indirect github.com/tinylib/msgp v1.1.6 // indirect github.com/xdg-go/pbkdf2 v1.0.0 // indirect github.com/xdg-go/scram v1.1.1 // indirect github.com/xdg-go/stringprep v1.0.3 // indirect github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a // indirect github.com/yuin/gopher-lua v0.0.0-20200816102855-ee81675732da // indirect go.mongodb.org/mongo-driver v1.9.0 // indirect go.opencensus.io v0.23.0 // indirect golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e // indirect golang.org/x/net v0.0.0-20220531201128-c960675eff93 // indirect golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 // indirect golang.org/x/sync v0.0.0-20220513210516-0976fa681c29 // indirect golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 // indirect golang.org/x/text v0.3.7 // indirect golang.org/x/time v0.0.0-20220224211638-0e9765cccd65 // indirect golang.org/x/tools v0.1.7 // indirect golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/appengine/v2 v2.0.1 // indirect google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4 // indirect google.golang.org/protobuf v1.28.0 // indirect gopkg.in/launchdarkly/go-jsonstream.v1 v1.0.1 // indirect gopkg.in/launchdarkly/go-sdk-events.v1 v1.1.1 // indirect gopkg.in/launchdarkly/go-server-sdk-evaluation.v1 v1.5.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect )
Thanks! I will try to reproduce the issue tomorrow.
It seems like I found an issue on your go.mod
. I can see the following line there:
github.com/mattn/go-sqlite3 v2.0.3+incompatible // indirect
However, version v2 is actually not a recent version, and as far as I remember there are some issues with the version. You can see the information about the versions of the package on the below links:
Latest stable version is v1.14 or later, not v2.
NOTE: The increase to v2 was an accident. There were no major changes or features.
The contents on the pages are the same by the way. I am not sure why that was included in your go.mod
. In buffalo family, there is no package using that so I think you can just remove the line from go.mod
, run go mod tidy
again to fill the correct version, and please try again. If you have any other packages using that which is not buffalo family, you may need to check with them if there is a solution for them.
Description
buffalo routes
fails to show the routing table. Returns a sqlLite error and we have sqlLite turned off for our install. Buffalo itself is serving the routes as expected.Steps to Reproduce the Problem
Please describe in painful detail what you did (so others can play along with you) to get to this point. This includes things like the exact command(s) you used, or the
curl
command you used, that sort of thing.buffalo routes
Expected Behavior
Expected the routing table to appear.
Actual Behavior
Info
Please run
buffalo info
and paste the information below where it says "PASTE_HERE".