Skip to content

feat: errors for no existing world or failing permissions#1361

Open
alejandralevy wants to merge 4 commits intomainfrom
feat/deploy-error-handling
Open

feat: errors for no existing world or failing permissions#1361
alejandralevy wants to merge 4 commits intomainfrom
feat/deploy-error-handling

Conversation

@alejandralevy
Copy link
Copy Markdown
Contributor

@alejandralevy alejandralevy commented Mar 25, 2026

Improve error handling on deployments

  • Added per-parcel permission check after signing, with detailed error messages listing which parcels the wallet lacks access to
  • Added GET /api/world-parcel-permissions/:address endpoint for the linker-dapp to fetch parcel permissions after wallet connection

Related linker-dapp PR: decentraland/linker-dapp#49

Cases

World deploy with full permissions (non-multi-scene)

npm run deploy -- --target-content https://worlds-content-server.decentraland.zone

  • Linker-dapp should show all parcels as "Granted"
  • Deploy should succeed
Screenshot 2026-03-25 at 14 07 27

World deploy non-multi-scene without world-wide permission

npm run deploy -- --target-content https://worlds-content-server.decentraland.zone

  • Use a wallet that has per-parcel permissions but NOT world-wide permission
  • Linker-dapp should show "World-wide permission required" toast
  • "Sign & Deploy" button should be disabled
  • Even if parcels show "Granted", the deploy is blocked because non-multi-scene requires world-wide access
Screenshot 2026-03-25 at 14 47 55

World deploy with partial parcel permissions (multi-scene)

npm run deploy -- --target-content https://worlds-content-server.decentraland.zone --multi-scene

  • Use a wallet that only has permission for some parcels
  • Linker-dapp should show "Granted" / "Not granted" per parcel
  • "Sign & Deploy" button should be disabled
  • Toast: "Check World permissions"
Screenshot 2026-03-25 at 14 12 03

World deploy with NO permissions

npm run deploy -- --target-content https://worlds-content-server.decentraland.zone --multi-scene

  • Use a wallet that has no permission at all
  • All parcels should show "Not granted"
  • Button disabled
Screenshot 2026-03-25 at 13 55 38

World deploy non-multi-scene with existing scenes on other parcels

npm run deploy -- --target-content https://worlds-content-server.decentraland.zone

  • World should have other scenes already deployed
  • Terminal should warn about scenes that will be deleted and ask for confirmation
  • Screenshot the Continue? (y/N) prompt
Screenshot 2026-03-25 at 13 57 13

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 25, 2026

Test this pull request

  • The @dcl/sdk package can be tested in scenes by running

    npm install "https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/feat/deploy-error-handling/dcl-sdk-7.21.1-23554243317.commit-d15ac25.tgz"
  • The @dcl/js-runtime package can be tested in scenes by running

    npm install "https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/feat/deploy-error-handling/@dcl/js-runtime/dcl-js-runtime-7.21.1-23554243317.commit-d15ac25.tgz"
  • To test with npx init

    export SDK_COMMANDS="https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/feat/deploy-error-handling/dcl-sdk-commands-7.21.1-23554243317.commit-d15ac25.tgz"
    npx $SDK_COMMANDS init
  • The /changerealm command to test test in-world

    /changerealm https://sdk-team-cdn.decentraland.org/ipfs/feat/deploy-error-handling-e2e
    
  • You can preview this build entering:
    https://playground.decentraland.org/?sdk-branch=feat/deploy-error-handling

Comment on lines +362 to +367
export async function validateWorldExists(worldName: string, targetContent: string): Promise<boolean> {
const encodedName = encodeURIComponent(worldName)
const url = `${targetContent}/world/${encodedName}/about`
const response = await fetch(url)
return response.ok
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If an existing world has no scenes deployed, /about returns 404, this may break deployments to existing empty worlds 🙃

Image

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh nice catch roooo! so I guess we might not check that case

const permissions = await fetchWorldPermissions(worldName, targetContent)
const lowerAddress = address.toLowerCase()

logger.info(`[DEPLOY] Permissions response for "${worldName}": ${JSON.stringify(permissions)}`)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logs on this file are for debugging or should be kept?

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Mar 25, 2026

Deploying js-sdk-toolchain with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9ee2150
Status:🚫  Build failed.

View logs

@alejandralevy alejandralevy force-pushed the feat/deploy-error-handling branch from 016aa87 to 9ee2150 Compare March 31, 2026 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants