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

Failed to Deploy Contract in Playground #768

Open
truemogician opened this issue Feb 17, 2024 · 2 comments
Open

Failed to Deploy Contract in Playground #768

truemogician opened this issue Feb 17, 2024 · 2 comments

Comments

@truemogician
Copy link

truemogician commented Feb 17, 2024

Describe the bug
When I'm trying to deploy contracts in a playground project, an error pops up saying "Oops! Something went wrong. If you'd like, please report the Bug. Thank you!". I checked the console and the GraphQL request, there's no additional useful information. I suppose the problem originates from the backend of the playground.

To Reproduce

  1. Open this project
  2. Navigate to Contract 1 and deploy it to account 0x05
  3. Navigate to Contract 2 and try to deploy it to account 0x06, the error should then appear

Screenshot
Screenshot

Environment:

  • OS: Windows 11 Enterprise 23H2
  • Browser: Microsoft Edge 121.0.2277.128 (Also tested on Mozilla Firefox 122.0.1)

Additional context
Here's the HTTP response from the server regarding the deployment request:

{
    "errors": [
        {
            "message": "something went wrong, we are looking into the issue",
            "path": [
                "createContractDeployment"
            ],
            "extensions": {
                "code": "INTERNAL_SERVER_ERROR"
            }
        }
    ],
    "data": null,
    "extensions": {
        "code": "INTERNAL_SERVER_ERROR"
    }
}
@truemogician
Copy link
Author

I’ve pinpointed the root cause of the problem by testing the project in a local emulator. The FlowToken.cdc contract, being a core component, is already deployed to all users. Attempting to re-deploy it results in a conflict because the path /storage/flowTokenVault already contains an object.

However, there remains an issue with the playground: it fails to effectively communicate error messages to users. When contract deployment or transaction execution encounters failure, providing clear error messages is crucial. This helps users better understand the problem and facilitates troubleshooting.

@bthaile
Copy link
Contributor

bthaile commented Mar 28, 2024

Thanks for reporting the issue. We'll be updating the backend to support Cadence 1.0 development. We'll have a newer version of the emulator that has core contracts already deployed. We plan on exposing these to the user so dev is more straight forward. We'll make sure to pass the errors to the UI so they are more clear.

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

No branches or pull requests

2 participants