ubiquity / ubiquibot

Putting the 'A' in 'DAO'
https://github.com/marketplace/ubiquibot
MIT License
16 stars 59 forks source link

/start no wallet error #924

Closed 0x4007 closed 3 months ago

0x4007 commented 3 months ago

I assume the bot failed to assign the contributor because they never set a wallet. This is urgent to throw this error for new would be contributors.

Check if they don't have a wallet registered. Warn them with an instruction that they need to set their wallet first. Explain how to set it in the warning.

Looks like new members are unable to register, including @EresDev

This is a showstopper as payment permits can not be generated without a registered wallet address.

Diagnose and fix the root issue. Will set a time estimate after a diagnosis is provided here.

Examples

https://github.com/ubiquity/devpool-directory-bounties/issues/24#issuecomment-2021521363

/start

Originally posted by @okhot in https://github.com/ubiquity/devpool-directory-bounties/issues/20#issuecomment-2018292322

Keyrxng commented 3 months ago

/start have it by eod

ubiquibot[bot] commented 3 months ago

DeadlineMon, Mar 25, 6:29 PM UTC
Registered Wallet 0xAe5D1F192013db889b1e2115A370aB133f359765
Tips:
Keyrxng commented 3 months ago

@pavlovcik @rndquu

Is the bot running in prod right now running from ubiquibot/development? That's where I'm checked-out from

I don't believe it was because the contributor hadn't yet set a wallet up because the dialogue below would render regardless of wallet address

image

0x4007 commented 3 months ago

That's a good observation.

It would be best if you can test for this somehow with a new profile though.

The only other hypothesis I have is something to do with the profile parser. In the past like a long time ago, I remember when a brand new (empty) GitHub profile would try and start, the bot would crash expecting some different type of schema for the profile.

Perhaps that is related, maybe you can make the profile parser more lenient or something. It probably is caused by the JSON validator.

I removed the time estimate to allow you the chance to diagnose first

Keyrxng commented 3 months ago

I'll see if I can try reproduce. I appreciate the help and time

rndquu commented 3 months ago

Is the bot running in prod right now running from ubiquibot/development?

As far as I remember the prod is running on either https://github.com/pavlovcik/ubiquibot/tree/refactor/move-to-delegated-compute either https://github.com/ubiquity/ubiquibot/tree/refactor/move-to-delegated-compute

@gentlementlegen might know better

gentlementlegen commented 3 months ago

Last time I checked it was https://github.com/pavlovcik/ubiquibot/tree/refactor/move-to-delegated-compute and I still do believe it is the case.

0x4007 commented 3 months ago

Just checked Netlify. It says https://github.com/pavlovcik/ubiquibot/commits/refactor/move-to-delegated-compute/ @head

EresDev commented 3 months ago

I'll see if I can try reproduce. I appreciate the help and time

I think I have a lead on this issue but I can't confirm because the branch move-to-delegated-compute on the deploy doesn't have updated schemas. That is why I don't have a fully working local instance. I will need time to get there. But if anyone else has it then here is a tip.

The problem appears to be with int4 datatype used in database. Especially in locations.issue_id column. But it can be with other int4 types columns too, but it is a good start.

For my example case issue_id: 2210087643

you see issue id above, and the range for int4 is -2147483648 to +2147483647 and issue_id above is out of range.

Try this fix:

change the datatype of locations.issue_id to int8

You may get some more out of range ids and probably will have to change all or most int4 to int8.

And why a clear error wasn't given by the bot that is another problem to solve if we want to continue using the the bot.

Plus, some more ids of github like comment_id are catching up too, in my example case, comment_id: 2022299611

gentlementlegen commented 3 months ago

@EresDev If you need to use locally the latest schema of the DB I had made a dump of it in one PR that is not merged here https://github.com/ubiquity/ubiquibot/pull/923https://github.com/ubiquity/ubiquibot/pull/923 This one is the latest schema of the current database. After your comment I can update these columns as well.

EresDev commented 3 months ago

After your comment I can update these columns as well.

yes please go ahead and update these columns.

EresDev commented 3 months ago

/wallet 0xE7a9fdf596D869AF34a130fa9607178B2B9800D9

ubiquibot[bot] commented 3 months ago
! action has an uncaught error
gentlementlegen commented 3 months ago

@EresDev I changed all these int4 to int8, so the table looks like this

create table "public"."locations" (
    "id" integer not null default nextval('location_id_seq1'::regclass),
    "node_id" character varying(255),
    "node_type" character varying(255),
    "updated" timestamp with time zone,
    "created" timestamp with time zone not null default now(),
    "node_url" text,
    "user_id" bigint,
    "repository_id" bigint,
    "organization_id" bigint,
    "comment_id" bigint,
    "issue_id" bigint
);

I do no know if that fixes the issue but it is live now, if you can please try it out. After your wallet query the error is very vague and doesn't give any info

{
  "error": {},
  "caller": "renderCatchAll",
  "revision": null,
  "handlerType": {
    "type": "main",
    "actions": [
      null
    ]
  },
  "activeHandler": "commentCreated"
}
0x4007 commented 3 months ago

/wallet pavlovcik.eth

ubiquibot[bot] commented 3 months ago
- Resolving address from ENS name failed
0x4007 commented 3 months ago

/wallet 0x4007CE2083c7F3E18097aeB3A39bb8eC149a341d

ubiquibot[bot] commented 3 months ago
+ Successfully registered wallet address
0x4007 commented 3 months ago

@EresDev moment of truth, why don't you try?

EresDev commented 3 months ago

/wallet 0xE7a9fdf596D869AF34a130fa9607178B2B9800D9

ubiquibot[bot] commented 3 months ago
+ Successfully registered wallet address
EresDev commented 3 months ago

After your wallet query the error is very vague and doesn't give any info

I got a clear error message with my local instance somehow. Why many of the supabase logs are like this is also an issue. I have doubt that this just fixes wallet command and not /start. I am going to test it in some other issue and will report here.

These IDs should also be updated in other tables if we want to continue using the ubiquibot v1. But it is okay to ignore if v2 is coming soon.

EresDev commented 3 months ago

I have doubt that this just fixes wallet command and not /start.

/start command is also working fine. I have tested it on an old issue and a recent issue.

0x4007 commented 3 months ago

Alright well this was sort of a weird task to price but one idea is to split the reward

ubiquibot[bot] commented 3 months ago
# No linked pull requests to close
ubiquibot[bot] commented 3 months ago
+ Evaluating results. Please wait...
ubiquibot[bot] commented 3 months ago

[ 54.4 WXDAI ]

@pavlovcik
Contributions Overview
ViewContributionCountReward
IssueSpecification123.4
IssueComment431
Conversation Incentives
CommentFormattingRelevanceReward
I assume the bot failed to assign the contributor because they n...
23.4
h3:
  count: 1
  score: "1"
  words: 1
123.4
That's a good observation. It would be best if you can test fo...
210.45521
Just checked Netlify. It says https://github.com/pavlovcik/ubiqu...
4.4
code:
  count: 1
  score: "1"
  words: 1
0.564.4
@EresDev moment of truth, why don't you try?...
1.80.641.8
Alright well this was sort of a weird task to price but one idea...
3.80.63.8

[ 146.5 WXDAI ]

@gentlementlegen
Contributions Overview
ViewContributionCountReward
IssueTask0.5250
IssueComment30
IssueComment321.5
Conversation Incentives
CommentFormattingRelevanceReward
Last time I checked it was https://github.com/pavlovcik/ubiquibo...
-0.41-
@EresDev If you need to use locally the latest schema of the DB ...
-0.605-
@EresDev I changed all these int4 to int8, so the table looks li...
-
code:
  count: 2
  score: "0"
  words: 0
0.665-
Last time I checked it was https://github.com/pavlovcik/ubiquibo...
2.60.412.6
@EresDev If you need to use locally the latest schema of the DB ...
6.10.6056.1
@EresDev I changed all these int4 to int8, so the table looks li...
12.8
code:
  count: 2
  score: "2"
  words: 0
0.66512.8

[ 166.5 WXDAI ]

@EresDev
Contributions Overview
ViewContributionCountReward
IssueTask0.5250
IssueComment40
IssueComment441.5
Conversation Incentives
CommentFormattingRelevanceReward
> I'll see if I can try reproduce. I appreciate the help and tim...
-
code:
  count: 7
  score: "0"
  words: 8
0.58-
> After your comment I can update these columns as well. yes ...
-0.695-
> After your wallet query the error is very vague and doesn't gi...
-
code:
  count: 2
  score: "0"
  words: 2
0.64-
> I have doubt that this just fixes wallet command and not /star...
-
a:
  count: 2
  score: "0"
  words: 6
code:
  count: 1
  score: "0"
  words: 1
0.605-
> I'll see if I can try reproduce. I appreciate the help and tim...
26
code:
  count: 7
  score: "7"
  words: 8
0.5826
> After your comment I can update these columns as well. yes ...
0.80.6950.8
> After your wallet query the error is very vague and doesn't gi...
9.9
code:
  count: 2
  score: "2"
  words: 2
0.649.9
> I have doubt that this just fixes wallet command and not /star...
4.8
a:
  count: 2
  score: "2"
  words: 6
code:
  count: 1
  score: "1"
  words: 1
0.6054.8

[ 6.45 WXDAI ]

@Keyrxng
Contributions Overview
ViewContributionCountReward
IssueComment26.45
Conversation Incentives
CommentFormattingRelevanceReward
@pavlovcik @rndquu Is the bot running in prod right now runn...
5.05
code:
  count: 1
  score: "0.25"
  words: 2
0.235.05
I'll see if I can try reproduce. I appreciate the help and time ...
1.40.611.4

[ 4.8 WXDAI ]

@rndquu
Contributions Overview
ViewContributionCountReward
IssueComment14.8
Conversation Incentives
CommentFormattingRelevanceReward
> Is the bot running in prod right now running from `ubiquibot/d...
4.8
code:
  count: 1
  score: "1"
  words: 2
0.5754.8
0x4007 commented 3 months ago

I feel that it's really a coin toss to get claims to work on mobile. Anybody else having issues? We should really consider an end to end test with cypress etc because this is getting a bit annoying.

image

jordan-ae commented 3 months ago

@pavlovcik this happened to me a couple of times yesterday. I thought a service was down or something so I stopped trying. But e2e Cypress test would most definitely help catch such.