openpredictionmarkets / socialpredict

Easy to Deploy Prediction Market Platform
https://github.com/openpredictionmarkets/socialpredict
MIT License
54 stars 10 forks source link

Can't Resolve Markets #177

Closed pwdel closed 2 months ago

pwdel commented 3 months ago

Image

Image

ResolveModal.jsx:16 selectedResolution:  YES
/api/v0/resolve/9:1 

       Failed to load resource: the server responded with a status of 502 (Bad Gateway)
ResolveUtils.jsx:30 Error resolving market: Error: Network response was not ok
    at ResolveUtils.jsx:21:23
(anonymous) @ ResolveUtils.jsx:30
ResolveModal.jsx:22 Failed to resolve market: Error: Network response was not ok
    at ResolveUtils.jsx:21:23
pwdel commented 2 months ago

Backend error for more information:

2024-07-15 13:22:58 2024/07/15 18:22:58 [/backend/handlers/bets/placebethandler.go:C] Variable Name: 'user.AccountBalance after', Type: int64, Value: -11
2024-07-15 13:23:03 2024/07/15 18:23:03 http: panic serving 172.19.0.4:50328: runtime error: invalid memory address or nil pointer dereference
2024-07-15 13:23:03 goroutine 71 [running]:
2024-07-15 13:23:03 net/http.(*conn).serve.func1()
2024-07-15 13:23:03     /usr/local/go/src/net/http/server.go:1873 +0xb9
2024-07-15 13:23:03 panic({0xa1e8c0?, 0x1010400?})
2024-07-15 13:23:03     /usr/local/go/src/runtime/panic.go:920 +0x270
2024-07-15 13:23:03 socialpredict/middleware.(*HTTPError).Error(0xc000390431?)
2024-07-15 13:23:03     /backend/middleware/authutils.go:17
2024-07-15 13:23:03 socialpredict/handlers/markets.ResolveMarketHandler({0xbd1dd0, 0xc00037ec40}, 0xc0000b7400)
2024-07-15 13:23:03     /backend/handlers/markets/resolvemarket.go:35 +0xad
2024-07-15 13:23:03 net/http.HandlerFunc.ServeHTTP(0xc0000b7300?, {0xbd1dd0?, 0xc00037ec40?}, 0x10?)
2024-07-15 13:23:03     /usr/local/go/src/net/http/server.go:2141 +0x29
2024-07-15 13:23:03 github.com/gorilla/mux.(*Router).ServeHTTP(0xc000120000, {0xbd1dd0, 0xc00037ec40}, 0xc0000b7200)
2024-07-15 13:23:03     /go/pkg/mod/github.com/gorilla/mux@v1.8.1/mux.go:212 +0x1c5
2024-07-15 13:23:03 socialpredict/server.Start.(*Cors).Handler.func1({0xbd1dd0, 0xc00037ec40}, 0xc0000b7200)
2024-07-15 13:23:03     /go/pkg/mod/github.com/rs/cors@v1.10.1/cors.go:281 +0x184
2024-07-15 13:23:03 net/http.HandlerFunc.ServeHTTP(0x412605?, {0xbd1dd0?, 0xc00037ec40?}, 0xc00037ec01?)
2024-07-15 13:23:03     /usr/local/go/src/net/http/server.go:2141 +0x29
2024-07-15 13:23:03 net/http.serverHandler.ServeHTTP({0xbcf990?}, {0xbd1dd0?, 0xc00037ec40?}, 0x6?)
2024-07-15 13:23:03     /usr/local/go/src/net/http/server.go:2943 +0x8e
2024-07-15 13:23:03 net/http.(*conn).serve(0xc00040f3b0, {0xbd35e0, 0xc000119ad0})
2024-07-15 13:23:03     /usr/local/go/src/net/http/server.go:2014 +0x5f4
2024-07-15 13:23:03 created by net/http.(*Server).Serve in goroutine 1
2024-07-15 13:23:03     /usr/local/go/src/net/http/server.go:3091 +0x5cb