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

By tapping on "refresh score" the user's passport score is changed to 0 on stg #1472

Closed
maryjaf opened this issue Apr 11, 2024 · 16 comments
Closed
Assignees
Labels
bug Something isn't working p0 Regression Test

Comments

@maryjaf
Copy link
Collaborator

maryjaf commented Apr 11, 2024

By tapping on "refresh score" button, the showing score in my account is changed to 0, but my real score isn't zero on gitcoin passport site

image image

curl 'https://impact-graph.serve.giveth.io/graphql'
-H 'accept: /'
-H 'accept-language: en'
-H 'authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwdWJsaWNBZGRyZXNzIjoiMHhENWRiM0Y4QjBhMjM2MTc2NTg3NDYwZEM4NUYwZkM1NzA1RDc4NDc3IiwiZXhwaXJhdGlvbkRhdGUiOiIyMDI0LTA0LTI2VDA3OjM5OjQ2LjkwN1oiLCJqdGkiOiIxNzExNTI1MTg2OTA0LTI3OGM2MjZjNjMiLCJpYXQiOjE3MTE1MjUxODYsImV4cCI6MTcxNDExNzE4NX0.OBJWdWK7rCbcgs8xXny-eLWWwWQrQzTyMfAvdmjC_Mk'
-H 'authversion: 2'
-H 'content-type: application/json'
-H 'origin: https://staging.giveth.io'
-H 'referer: https://staging.giveth.io/'
-H 'sec-ch-ua: "Google Chrome";v="123", "Not:A-Brand";v="8", "Chromium";v="123"'
-H 'sec-ch-ua-mobile: ?0'
-H 'sec-ch-ua-platform: "macOS"'
-H 'sec-fetch-dest: empty'
-H 'sec-fetch-mode: cors'
-H 'sec-fetch-site: same-site'
-H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36'
--data-raw $'{"variables":{"address":"0xd5db3f8b0a236176587460dc85f0fc5705d78477"},"query":"query ($address: String\u0021) {\n refreshUserScores(address: $address) {\n id\n firstName\n lastName\n name\n email\n avatar\n walletAddress\n url\n location\n boostedProjectsCount\n likedProjectsCount\n donationsCount\n projectsCount\n passportScore\n passportStamps\n }\n}"}'

cc: @jainkrati

@maryjaf maryjaf added bug Something isn't working Regression Test labels Apr 11, 2024
@maryjaf
Copy link
Collaborator Author

maryjaf commented Apr 11, 2024

Could you please assign this issue to a developer? @jainkrati

@CarlosQ96
Copy link
Collaborator

@maryjaf does the issue occur always? I tried to reproduce it code wise locally fetching data. But im getting everything correctly.

@maryjaf
Copy link
Collaborator Author

maryjaf commented Apr 16, 2024

@maryjaf does the issue occur always? I tried to reproduce it code wise locally fetching data. But im getting everything correctly.

I've tested with 2 users on stg and this bug happens
0xcd192b61a8Dd586A97592555c1f5709e032F2505
0xD5db3F8B0a236176587460dC85F0fC5705D78477

Screen.Recording.2024-04-16.at.1.12.22.PM.mov

@MohammadPCh
Copy link
Collaborator

@maryjaf It seems the problem is on BE side because it returns zero.

@maryjaf
Copy link
Collaborator Author

maryjaf commented Apr 18, 2024

Yeah and it was assigned to @CarlosQ96

@CarlosQ96
Copy link
Collaborator

@maryjaf lets test it tomorrow in a meeting. My testing didnt lead to the right bug. So something else must be setting it to zero.

@maryjaf
Copy link
Collaborator Author

maryjaf commented Apr 22, 2024

@maryjaf lets test it tomorrow in a meeting. My testing didnt lead to the right bug. So something else must be setting it to zero.

Sure,
It happened also for @RamRamez

@maryjaf
Copy link
Collaborator Author

maryjaf commented Apr 22, 2024

Did you check the above curl that I shared in description ? @CarlosQ96
In the response of this request passportScore" is shown 0
but based on below pic this score doesn't 0 in gitcoin passport

curl --location 'https://impact-graph.serve.giveth.io/graphql'
--header 'accept-language: en'
--header 'authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwdWJsaWNBZGRyZXNzIjoiMHhENWRiM0Y4QjBhMjM2MTc2NTg3NDYwZEM4NUYwZkM1NzA1RDc4NDc3IiwiZXhwaXJhdGlvbkRhdGUiOiIyMDI0LTA0LTI2VDA3OjM5OjQ2LjkwN1oiLCJqdGkiOiIxNzExNTI1MTg2OTA0LTI3OGM2MjZjNjMiLCJpYXQiOjE3MTE1MjUxODYsImV4cCI6MTcxNDExNzE4NX0.OBJWdWK7rCbcgs8xXny-eLWWwWQrQzTyMfAvdmjC_Mk'
--header 'authversion: 2'
--header 'content-type: application/json'
--header 'origin: https://staging.giveth.io'
--header 'referer: https://staging.giveth.io/'
--header 'sec-ch-ua: "Google Chrome";v="123", "Not:A-Brand";v="8", "Chromium";v="123"'
--header 'sec-ch-ua-mobile: ?0'
--header 'sec-ch-ua-platform: "macOS"'
--header 'sec-fetch-dest: empty'
--header 'sec-fetch-mode: cors'
--header 'sec-fetch-site: same-site'
--data '{"query":"query ($address: String!) {\n refreshUserScores(address: $address) {\n id\n firstName\n lastName\n name\n email\n avatar\n walletAddress\n url\n location\n boostedProjectsCount\n likedProjectsCount\n donationsCount\n projectsCount\n passportScore\n passportStamps\n }\n}","variables":{"address":"0xd5db3f8b0a236176587460dc85f0fc5705d78477"}}'

image
image

@maryjaf
Copy link
Collaborator Author

maryjaf commented Apr 22, 2024

It happens on prod also @CarlosQ96 @jainkrati
and should be check with high priority

Screen.Recording.2024-04-22.at.7.15.33.PM.mov

@CarlosQ96
Copy link
Collaborator

From my testings.

My original score was 10, now it's 0.
I updated some stamps and im back to 2.6 and it's updated, when clicking the button.

Seems Gitcoin expired all scores by default and most people went back to 0. @laurenluz @jainkrati in that case I can't do anything about it.

People must go inside their profile in gitcoin and get more stamps to increase their score. There seems to be an expiration, but it's hard to tell which, documentation say it may be 3 months. But in https://www.scorer.gitcoin.co/#/dashboard/scorer
Im unable to configure such setting.

@maryjaf

@CarlosQ96
Copy link
Collaborator

@CarlosQ96
Copy link
Collaborator

Refreshing scores
The score displayed in the Passport app is refreshed automatically, whenever the user makes any change to their Passport. However, API users may find the scores returned by the API sometimes differs from the score displayed in the app. If this happens, refresh the Passport score by making a POST request to submit-passport.

POST /registry/submit-passport

So ill separate it into two actions. REFRESH then FETCH

@maryjaf
Copy link
Collaborator Author

maryjaf commented Apr 23, 2024

I've tested on prod today, and the problem related to showing 0 for score has been resolved
but there is a difference between score in response of graphql and score in gitcoin passport dashboard, take a look on below video
dapp score: 1.030878
gitcoin dashboard:0.53
@CarlosQ96

Screen.Recording.2024-04-23.at.11.30.02.AM.mov

@maryjaf
Copy link
Collaborator Author

maryjaf commented Apr 28, 2024

There is a problem On stg for user with passport score 0 @CarlosQ96
The passport score of this user 0xf577Ae8b97d839B9c0522A620299DC08792c738c is 0 on gitcoin passport dashboard

but on stg, in the response of "query UserByAddress", passport score is shown null: "passportScore": null,
and it makes in front, loading icon is shown, pic 1
and on production, in the response of "query UserByAddress", passport score is shown 0: "passportScore": 0,pic 2

STG
image.png


PROD
image.png

@mohammadranjbarz
Copy link
Collaborator

@maryjaf We have two users with this wallet address (one of them are lowercase and the other one is not) so it makes this problem, your data is old and now we just save walletAddresses ad lowercase and it's unique so it would not happen for other addresses, now if you want I can change the wallet address of one of your users to another thing if you want to.
So I think it's not a blocker for this release.
@maryjaf @jainkrati WDYT?

@maryjaf
Copy link
Collaborator Author

maryjaf commented Apr 29, 2024

@maryjaf We have two users with this wallet address (one of them are lowercase and the other one is not) so it makes this problem, your data is old and now we just save walletAddresses ad lowercase and it's unique so it would not happen for other addresses, now if you want I can change the wallet address of one of your users to another thing if you want to. So I think it's not a blocker for this release. @maryjaf @jainkrati WDYT?

Thanks @mohammadranjbarz I've checked by another user with score 0 and this problem doesn't happen
I also think this isn't a blocker for release

@maryjaf maryjaf closed this as completed Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working p0 Regression Test
Projects
None yet
Development

No branches or pull requests

4 participants