Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue when hitting public stats when running estuary-www on dev env #46

Open
jonathangoc opened this issue Jun 21, 2022 · 2 comments
Open
Labels

Comments

@jonathangoc
Copy link

jonathangoc commented Jun 21, 2022

Description
When running the Estuary set-up (back- and front- end) on dev environment there seems to be an issue with the ‘View Performance Dashboard’ at http://localhost:4444/ecosystem

Steps to reproduce the issue

  1. Once estuary node is installed, run the following command to start the backend: ./estuary --logging --verified-deal=true
  2. Then run the following commend to start the front-end npm run dev
  3. Hit http://localhost:3004/public/stats on the browser
  4. Click on 'View Performance Dashboard'

Screenshot 2022-06-20 at 16 22 16

Screenshot 2022-06-20 at 21 38 03

Additional information
When using the API call curl -X GET -H "Authorization: Bearer EST1e089cb2-7eae-4b62-a18d-a0f2b31053e2ARY" http://localhost:3004/public/stats here´s what I've got: {"totalStorage":2019768358,"totalFiles":3,"dealsOnChain":0}

Components
INFO estuary estuary/main.go:501 estuary version: v0.1.0-25-g01032e9 {"app_version": "v0.1.0-25-g01032e9"}

> [email protected] dev

@jimmylee
Copy link
Contributor

Thanks for reporting this

@motdde
Copy link

motdde commented Aug 11, 2022

A potential fix will be across Estuary and Estuary-www

  • On Estuary, there should be a way in GORM to catch scan errors. It has something to do with converting Null to int64. Hence, handling the exception and returning an empty JSON response.
// handler.go line 3767
if err := s.DB.Table("objects").Select("SUM(size)").Find(&stats.TotalBytesUploaded.Int64).Error; err != nil {
	return nil, err
}
  • on Estuary-www
    The ideal fix will be to have a default view when empty or handle timeout when there is no response.

What I have is an empty response for /public/stats. An authorization header isn't required since it's a public route.

curl -X GET http://localhost:3004/public/stats 
curl: (52) Empty reply from server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants