-
Notifications
You must be signed in to change notification settings - Fork 22
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
Editing community leads to a 400 error message #491
Comments
Picking this up |
I've been unable to reproduce this in the devhub-test group via Google Chrome or Brave. Is this Safari? I've been able to :
Will attempt on Safari now. Then, can I have admin access to attempt to configure the Hacks group? Edit: Updates also work on Safari. Not sure what the issue is. Can I have admin access to attempt to configure the Hacks group? |
Hi @elliotBraem – yes was using Safari. Gave you admin access. |
Hi @elliotBraem I just reproduced this in Chrome too with a different account. |
I've been able to reproduce and only for this community: DevHub Hacks devhub-issue.movThere is something wrong with the request to wallet.near.org. It worked when I logged in via Here wallet and completed the transaction that way. NEAR Wallet is being depreciated, but this may be something to keep an eye on. I've changed tag to hackbox. Now, doing more changes to the community breaks in both the NEAR Wallet and through Here wallet. |
Hi @elliotBraem – I saw you tagged me here. Was it just an FYI, or did you need any input? By the way, I continue running into additional issues. For example, trying to remove moderators from a specific community page (e.g. Zero Knowledge) leads to the same error message. |
Hi @elliotBraem – just wanted to follow up here. |
@frol @petersalomonsen @ailisp @itexpert120 @Megha-Dev-19 I'd like to bother you all for some thoughts & feedback on this specific issue :) It seems that there is something wrong with the request that gets sent to the wallets when editing specific communities. If you look at the video above: the community data looks normal and good JSON, but when we submit, it says malformed. The contract is not panicking, the request is malformed before the wallet can present the transaction. It's especially interesting because I have been able to approve one these "malformed" transactions with different wallets -- I approved the first one with Here wallet, but then it broke after. It currently seems specific to the DevHub Hacks community, but @ori-near reports others may be impacted too. Why might this happen?
During the revamp, we migrated the communities from the old structure to the new structure w/ Addons where Ori and Maxwell used this Community Migration Button that I had made, and this may be relevant, but I'm not sure how. It did not modify the existing data, it only created add-ons from it -- nor have I experienced any issues updating the addons directly, even in the DevHub Hacks community. How can we fix this? We have some pieces of the community struct that are no longer used due to the Addons, could we fix this by cleaning up the struct and migrating? Or is the corruption deeper than that?
From the above, we can remove "github", "board", "wiki1", "wiki2", "features" because of Addons-- and I also think it'd be cleaner if we reflected the social contract metadata standard more:
Anyone have thoughts/feedback on why this issue is arising and solutions moving forward? |
@elliotBraem I've seen earlier when working on my music tools. If trying to confirm a large transaction through the wallet, it will fail, since it's too large for the URL redirect to the wallet. Could it be the same? In the music tool the solution was to not sign the transaction through the wallet, but use a local function access key, which is what I'm working on, and which works right here NearSocial/VM#156 Can you try the same from the preview environment here? https://psalomobos.near.page/devhub.near/widget/app Make sure to have saved a function access key before attempting the transaction above, so that it does not go via the wallet for confirmation @elliotBraem @ori-near |
Yes the reasoning seems the same -- we update the entire community at a time (including all of the addons and their data) -- this is a pretty big payload. And yes! Creating a local function access key to sign the transactions in your preview environment worked excellently! However, although this works and we could wait for the access key change to get in, I think there are some contract changes we should do to fix this, too: We need the payload in these function calls to be smaller. When updating a community, rather than pass the entire community at a time, we can split this into update_community_metadata, update_community_admins, and use the existing set_addons function. I have created two stories on the contract repo to suggest this: Community Metadata #75 and Addon Cleanup #74. This will involve changes to the front end as well. |
This is blocked until #137 is resolved or the contract changes are implemented. Until then, any interactions that typically encounter this issue can be resolved using : |
I will pick up the necessary contract changes now. |
@ori-near This is a bug of wallet.near.org as they don't allow big transaction to be signed. Use any other wallet to workaround it. Since wallet.near.org is getting deprecated soon, I suggest we close this issue and just ask users to use a different wallet. I reviewed the current implementation, and there is no simple way to avoid this behavior. We already update the data in chunks, but Wiki pages require you to set quite a sizable chunk of data on chain. |
It seems that we still can hit the URL limit even with MNW. We need to cut the community updates in pieces and it will be partially done as part of #540 (comment). This problem is only hit with quite beefy communities. We may need to consider how to store the Wiki content separately from the add-on configuration, so it does not blow up the transaction size when completely not necessary. |
Doesn't the content on the wiki itself reach the limit? If we treat the wiki differently from the other addons, it implies that community addon builders are limited in what they can build. Transferring it to a different structure would just shift the problem; So to keep the wiki as an addon, I think the only solution is to divide the parameters into multiple parts and make multiple update calls if the content is above a certain size. @frol @elliotBraem let me know what you think |
@Tguntenaar I don't suggest to treat Wiki addon any differently, but implement it in a different way, so instead of inlining the content as a parameter, inline a reference to the content, e.g. use SocialDB key path as a parameter instead of markdown text. |
Thanks for the feedback, so we will have to wait for 540 first. |
This is still waiting on #488 |
Since VM PR has been merged to develop branch, we are only waiting for the VM to be updated and gateways to follow. Then this issue should be resolved. |
@ori-near I can't reproduce the problem, editing devhub hacks community work for me. From the conversation above, it is a near wallet error which is now replaced by mynearwallet. @frol mentioned "we still can hit the URL limit even with MNW", but I don't see it happens when editing this community, and this community's wiki. Thanks to @elliotBraem and @Tguntenaar 's work the wiki has been made as addon, so more wikis won't make this a problem as well. We can close this issue. |
Problem
Trying to edit various aspects of the community leads to a 400 error message.
Repro Steps
Desired Behavior
User is able to submit the changes without getting an error message.
The text was updated successfully, but these errors were encountered: