NEAR-DevHub / neardevhub-bos

DevHub Portal Product UI (Hosted BOS) – Includes other instances (e.g. Infrastructure, Events)
https://neardevhub.org
MIT License
24 stars 23 forks source link

"Smart contract panicked" error message when creating a sponsorship post #86

Closed ori-near closed 1 year ago

ori-near commented 1 year ago

Describe the bug When I try to create a sponsorship post using the neardevgov.near account, I get an error message which prevents me from successfully publishing the post.

To Reproduce Steps to reproduce the behavior:

  1. Log into the Gigs Board as neardevgov.near
  2. Click Create Sponsorship
  3. Fill out the form using this data:
    
    Labels:
    zero knowledge, funding, funding-processing

Title: Sponsor ZPK/Web3 Hackathon Pillar Level – Berkley

Amount: 40000

Tokens: USD

Supervisor: nearmax.near

Description: The Developer DAO has agreed to support the ZPK / Web 3 Hackathon event as a Pillar sponsor. This event helps advance the Zero Knowledge technology and community.

About Event

Website: https://zk-hacking.org/

Description: The ZKP / Web3 Hackathon, hosted by Berkeley RDI and in partnership with ZKP MOOC, aims to bring together all students, researchers, and practitioners to build and showcase their innovative work in ZKP. It is open to the public. The hackathon has 4 general tracks, including zkBridge, ZKP blockchain/web 3 applications, ZPK circuits, and ZKP benchmarking. Each track has a set of designated tasks with corresponding prizes.

Duration: March 3, 2023 – May 2, 2023

Location: Both virtually and in person at UC Berkeley

Sponsorship Details

  1. See error message

    :warning: {"index":0,"kind":{"ExecutionError":"Smart contract panicked: panicked at 'Metadata not found for Account(\n \"neardevgov.near\",\n)', src/access_control/members.rs:136:36"}}

Expected behavior Once I click submit, I should see the sponsored post appear on the feed without an error message.

Screenshots Screenshot 2023-04-07 at 4 02 14 PM

https://user-images.githubusercontent.com/110252255/230691206-d14142e9-2a70-44fb-a9fe-a76e9d2f37ac.mp4

Desktop (please complete the following information):

ailisp commented 1 year ago

This one is actually the same issue as #10 . Because neardevgov.near is not an admin it doesn't have permission to use funding labels. There should be a better error message or best fix #10 - when don't have permission not allow using the label before submission

ori-near commented 1 year ago

Hi @ailisp - thanks for clarifying the issue. I can confirm that I was able to successfully complete the post when I excluded the label. We can narrow the scope for this ticket with an enhanced temporary error message solution. I will add more details to #10 and prioritize it. Thanks.

ailisp commented 1 year ago

Blocked by near/devgigsboard#18 since cannot update production contract without it

ailisp commented 1 year ago

This is fixed in https://github.com/near/devgigsboard/pull/16 but it wasn't deployed to production. Now it's been deployed to production as near/devgigsboard#18 merged. Now appropriate error message is given:

image