go-ap/fedbox

Directory does not exist

jhert0 opened this issue · 1 comments

After setting up fedbox and trying to get it to work with littr. I get an error that the actor does not exist. Inside the dev folder I have a fedbox.local folder but when trying to retrieve the actor it is looking for a localhost:4000 folder which does not exist.

This is what I get when I go to fedbox.local/actors/ I get a similar error when including an actor id but it just says the actor is not found.

{
  "@context": "http://localhost:4000/ns#errors",
  "errors": [
    {
      "status": 404,
      "message": "/home/fedbox/fedbox/dev/localhost:4000/actors not found",
      "trace": [
        {
          "file": "github.com/go-ap/errors@v0.0.0-20200702155720-f662512ba418/errors.go",
          "line": 79,
          "calee": "github.com/go-ap/errors.wrap(0x0, 0x0, 0xc4ba96, 0xc, 0xc0000cfb70, 0x1, 0x1, 0x0, 0x0, 0x0, ...)"
        },
        {
          "file": "github.com/go-ap/errors@v0.0.0-20200702155720-f662512ba418/errors.go",
          "line": 42,
          "calee": "github.com/go-ap/errors.Annotatef(...)"
        },
        {
          "file": "github.com/go-ap/errors@v0.0.0-20200702155720-f662512ba418/http.go",
          "line": 60,
          "calee": "github.com/go-ap/errors.wrapErr(0x0, 0x0, 0xc4ba96, 0xc, 0xc0000cfb70, 0x1, 0x1, 0x0, 0x0, 0x0, ...)"
        },
        {
          "file": "github.com/go-ap/errors@v0.0.0-20200702155720-f662512ba418/http.go",
          "line": 116,
          "calee": "github.com/go-ap/errors.NotFoundf(...)"
        },
        {
          "file": "github.com/go-ap/fedbox@/storage/fs/repository.go",
          "line": 776,
          "calee": "github.com/go-ap/fedbox/storage/fs.repo.loadFromPath.func1(0xc00028e480, 0x2d, 0x0, 0x0, 0xd5c080, 0xc0002a0cf0, 0x6, 0x1)"
        },
        {
          "file": "path/filepath/path.go",
          "line": 402,
          "calee": "path/filepath.Walk(0xc00028e480, 0x2d, 0xc0000cfdd8, 0x17, 0xc7b1a8)"
        },
        {
          "file": "github.com/go-ap/fedbox@/storage/fs/repository.go",
          "line": 774,
          "calee": "github.com/go-ap/fedbox/storage/fs.repo.loadFromPath(0xc0000ed100, 0x13, 0xc0000ed200, 0x17, 0xc7b1a8, 0xc7b1a8, 0xd5b4a0, 0xc0000c5200, 0x0, 0x0, ...)"
        },
        {
          "file": "github.com/go-ap/fedbox@/storage/fs/repository.go",
          "line": 159,
          "calee": "github.com/go-ap/fedbox/storage/fs.(*repo).LoadCollection(0xc000137f20, 0xd5b4a0, 0xc0000c5200, 0x0, 0x0, 0x0, 0x0)"
        },
        {
          "file": "github.com/go-ap/fedbox@/app/handlers.go",
          "line": 63,
          "calee": "github.com/go-ap/fedbox/app.HandleCollection.func1(0xc00024d2c5, 0x6, 0xc000257c00, 0x7f6a19e0b770, 0xc000137f20, 0x0, 0xc44afe, 0x1, 0x0)"
        },
        {
          "file": "github.com/go-ap/handlers@v0.0.0-20200716200214-53637e4f38c1/handlers.go",
          "line": 163,
          "calee": "github.com/go-ap/handlers.CollectionHandlerFn.ServeHTTP(0xc7b110, 0x7f6a19e0b338, 0xc000258880, 0xc000257c00)"
        },
        {
          "file": "github.com/go-chi/chi@v4.1.2+incompatible/chain.go",
          "line": 31,
          "calee": "github.com/go-chi/chi.(*ChainHandler).ServeHTTP(0xc000061d40, 0x7f6a19e0b338, 0xc000258880, 0xc000257c00)"
        },
        {
          "file": "github.com/go-chi/chi@v4.1.2+incompatible/mux.go",
          "line": 431,
          "calee": "github.com/go-chi/chi.(*Mux).routeHTTP(0xc000057da0, 0x7f6a19e0b338, 0xc000258880, 0xc000257c00)"
        },
        {
          "file": "net/http/server.go",
          "line": 2007,
          "calee": "net/http.HandlerFunc.ServeHTTP(0xc00016c630, 0x7f6a19e0b338, 0xc000258880, 0xc000257c00)"
        },
        {
          "file": "github.com/go-chi/chi@v4.1.2+incompatible/mux.go",
          "line": 70,
          "calee": "github.com/go-chi/chi.(*Mux).ServeHTTP(0xc000057da0, 0x7f6a19e0b338, 0xc000258880, 0xc000257c00)"
        },
        {
          "file": "github.com/go-chi/chi@v4.1.2+incompatible/mux.go",
          "line": 298,
          "calee": "github.com/go-chi/chi.(*Mux).Mount.func1(0x7f6a19e0b338, 0xc000258880, 0xc000257c00)"
        },
        {
          "file": "net/http/server.go",
          "line": 2007,
          "calee": "net/http.HandlerFunc.ServeHTTP(0xc00016b440, 0x7f6a19e0b338, 0xc000258880, 0xc000257c00)"
        },
        {
          "file": "github.com/go-chi/chi@v4.1.2+incompatible/mux.go",
          "line": 431,
          "calee": "github.com/go-chi/chi.(*Mux).routeHTTP(0xc000057d40, 0x7f6a19e0b338, 0xc000258880, 0xc000257c00)"
        },
        {
          "file": "net/http/server.go",
          "line": 2007,
          "calee": "net/http.HandlerFunc.ServeHTTP(0xc00016c620, 0x7f6a19e0b338, 0xc000258880, 0xc000257c00)"
        },
        {
          "file": "github.com/go-ap/fedbox@/app/middleware.go",
          "line": 61,
          "calee": "github.com/go-ap/fedbox/app.ActorFromAuthHeader.func1.1(0x7f6a19e0b338, 0xc000258880, 0xc000257b00)"
        },
        {
          "file": "net/http/server.go",
          "line": 2007,
          "calee": "net/http.HandlerFunc.ServeHTTP(0xc000061cc0, 0x7f6a19e0b338, 0xc000258880, 0xc000257b00)"
        },
        {
          "file": "github.com/go-chi/chi@v4.1.2+incompatible/middleware/get_head.go",
          "line": 37,
          "calee": "github.com/go-chi/chi/middleware.GetHead.func1(0x7f6a19e0b338, 0xc000258880, 0xc000257b00)"
        },
        {
          "file": "net/http/server.go",
          "line": 2007,
          "calee": "net/http.HandlerFunc.ServeHTTP(0xc00016b080, 0x7f6a19e0b338, 0xc000258880, 0xc000257b00)"
        },
        {
          "file": "github.com/go-chi/chi@v4.1.2+incompatible/middleware/realip.go",
          "line": 34,
          "calee": "github.com/go-chi/chi/middleware.RealIP.func1(0x7f6a19e0b338, 0xc000258880, 0xc000257b00)"
        },
        {
          "file": "net/http/server.go",
          "line": 2007,
          "calee": "net/http.HandlerFunc.ServeHTTP(0xc00016b0a0, 0x7f6a19e0b338, 0xc000258880, 0xc000257b00)"
        },
        {
          "file": "github.com/go-chi/chi@v4.1.2+incompatible/mux.go",
          "line": 70,
          "calee": "github.com/go-chi/chi.(*Mux).ServeHTTP(0xc000057d40, 0x7f6a19e0b338, 0xc000258880, 0xc000257b00)"
        },
        {
          "file": "github.com/go-chi/chi@v4.1.2+incompatible/mux.go",
          "line": 298,
          "calee": "github.com/go-chi/chi.(*Mux).Mount.func1(0x7f6a19e0b338, 0xc000258880, 0xc000257b00)"
        },
        {
          "file": "net/http/server.go",
          "line": 2007,
          "calee": "net/http.HandlerFunc.ServeHTTP(0xc00016b680, 0x7f6a19e0b338, 0xc000258880, 0xc000257b00)"
        },
        {
          "file": "github.com/go-chi/chi@v4.1.2+incompatible/mux.go",
          "line": 431,
          "calee": "github.com/go-chi/chi.(*Mux).routeHTTP(0xc000057740, 0x7f6a19e0b338, 0xc000258880, 0xc000257b00)"
        },
        {
          "file": "net/http/server.go",
          "line": 2007,
          "calee": "net/http.HandlerFunc.ServeHTTP(0xc00016c910, 0x7f6a19e0b338, 0xc000258880, 0xc000257b00)"
        },
        {
          "file": "github.com/go-chi/chi@v4.1.2+incompatible/middleware/logger.go",
          "line": 46,
          "calee": "github.com/go-chi/chi/middleware.RequestLogger.func1.1(0xd6ac60, 0xc0001a29a0, 0xc000257a00)"
        },
        {
          "file": "net/http/server.go",
          "line": 2007,
          "calee": "net/http.HandlerFunc.ServeHTTP(0xc00018d320, 0xd6ac60, 0xc0001a29a0, 0xc000257a00)"
        },
        {
          "file": "github.com/go-chi/chi@v4.1.2+incompatible/middleware/request_id.go",
          "line": 76,
          "calee": "github.com/go-chi/chi/middleware.RequestID.func1(0xd6ac60, 0xc0001a29a0, 0xc000257900)"
        },
        {
          "file": "net/http/server.go",
          "line": 2007,
          "calee": "net/http.HandlerFunc.ServeHTTP(0xc00016b6a0, 0xd6ac60, 0xc0001a29a0, 0xc000257900)"
        },
        {
          "file": "github.com/go-ap/fedbox@/app/middleware.go",
          "line": 21,
          "calee": "github.com/go-ap/fedbox/app.Repo.func1.1(0xd6ac60, 0xc0001a29a0, 0xc000257800)"
        },
        {
          "file": "net/http/server.go",
          "line": 2007,
          "calee": "net/http.HandlerFunc.ServeHTTP(0xc00018d350, 0xd6ac60, 0xc0001a29a0, 0xc000257800)"
        },
        {
          "file": "github.com/go-chi/chi@v4.1.2+incompatible/mux.go",
          "line": 86,
          "calee": "github.com/go-chi/chi.(*Mux).ServeHTTP(0xc000057740, 0xd6ac60, 0xc0001a29a0, 0xc000257700)"
        },
        {
          "file": "net/http/server.go",
          "line": 2802,
          "calee": "net/http.serverHandler.ServeHTTP(0xc0001a2000, 0xd6ac60, 0xc0001a29a0, 0xc000257700)"
        },
        {
          "file": "net/http/server.go",
          "line": 1890,
          "calee": "net/http.(*conn).serve(0xc00024e320, 0xd6f3a0, 0xc000258780)"
        },
        {
          "file": "net/http/server.go",
          "line": 2928,
          "calee": "created by net/http.(*Server).Serve"
        }
      ],
      "location": "github.com/go-ap/errors@v0.0.0-20200702155720-f662512ba418/http.go:60"
    }
  ]
}

This seems to be fixed. I now get a list of actors when going to fedbox.local/actors and oauth login seems to be working.