Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 19, 2025

The billing address replacement modal shows an infinite skeleton loader with 404 errors because it attempts to call sdk.forProject(page.params.region, page.params.project).locale in the organization billing context where these route parameters don't exist.

Before:

// replaceAddress.svelte - tries to use project context that doesn't exist
const locale = await sdk.forProject(page.params.region, page.params.project).locale.get();
const countryList = await sdk.forProject(page.params.region, page.params.project).locale.listCountries();
// Results in: x-appwrite-project: undefined → 404

After:

// replaceAddress.svelte - receives props from parent layout
export let locale: Models.Locale;
export let countryList: Models.CountryList;

// billingAddress.svelte - passes already-loaded data
<ReplaceAddress bind:show={showReplace} {locale} {countryList} />

Changes:

  • Pass locale and countryList as props to replaceAddress.svelte (already loaded via sdk.forConsole.locale in parent layout)
  • Remove API calls with undefined parameters from modal's onMount

Fixes https://linear.app/appwrite/issue/SUC-1786

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • o1.ingest.sentry.io
    • Triggering command: node (vitest) (dns block)
    • Triggering command: node build.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Issue Title: Replacing billing address shows skeleton loader forever
Issue Description: Reproduction Steps:

  1. Open a Pro or above org in the Console
  2. Go to the billing tab
  3. Scroll down to the Billing address section
  4. Click on the action menu on the right
  5. Click Replace

Expected Behavior:

The modal opens and allows me to replace the address

Actual Behavior:

Skeleton loader doesn't go away:

image.png

Browser console logs show:

GET https://cloud.appwrite.io/v1/locale 404 (Not Found)
Uncaught (in promise) AppwriteException: Project with the requested ID could not be found. Please check the value of the X-Appwrite-Project header to ensure the correct project ID is being used.
    at U.<anonymous> (sdk.js:896:23)
    at Generator.next (<anonymous>)
    at c (sdk.js:19:58)

Network logs show request has undefined for x-appwrite-project header:

fetch("https://cloud.appwrite.io/v1/locale", {
  "headers": {
    "baggage": "sentry-environment=production,sentry-release=7.4.22,sentry-public_key=c7ce178bdedd486480317b72f282fd39,sentry-trace_id=d8b2d31090754460a66a8f15335ffef5",
    "sec-ch-ua": "\"Chromium\";v=\"142\", \"Google Chrome\";v=\"142\", \"Not_A Brand\";v=\"99\"",
    "sec-ch-ua-mobile": "?0",
    "sec-ch-ua-platform": "\"macOS\"",
    "sentry-trace": "d8b2d31090754460a66a8f15335ffef5-a352bbe0d4d036e1",
    "x-appwrite-mode": "admin",
    "x-appwrite-project": "undefined",
    "x-appwrite-response-format": "1.8.0",
    "x-sdk-language": "web",
    "x-sdk-name": "Console",
    "x-sdk-platform": "console",
    "x-sdk-version": "1.10.0"
  },
  "referrer": "https://cloud.appwrite.io/console/organization-6393695249f8e5c2ff58/billing",
  "body": null,
  "method": "GET",
  "mode": "cors",
  "credentials": "omit"
});

Related:

Comment by User 5629b699-55d9-4178-8cfa-125a107a419d:
https://github.com/appwrite/console

Comment by User 82860cd8-c160-47d9-a9da-6fefd832081a:
📋 I wasn't able to determine which GitHub repository to work in.

I think it's one of these, but can you tell me which one is right?

Comment by User :
This thread is for an agent session with githubcopilot.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@appwrite
Copy link

appwrite bot commented Nov 19, 2025

Console (appwrite/console)

Project ID: 688b7bf400350cbd60e9

Sites (1)
Site Status Logs Preview QR
 console-stage
688b7cf6003b1842c9dc
Ready Ready View Logs Preview URL QR Code

Tip

Realtime gives you live updates for users, storage, functions, and databases

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 19, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

… of sdk.forProject

Co-authored-by: stnguyen90 <1477010+stnguyen90@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix billing address replacement showing skeleton loader forever Fix billing address replacement modal using undefined project context Nov 19, 2025
Copilot AI requested a review from stnguyen90 November 19, 2025 19:42
Copilot finished work on behalf of stnguyen90 November 19, 2025 19:42
@stnguyen90
Copy link
Contributor

Manual test:

Screen.Recording.2025-11-19.at.17.09.16.mov

@stnguyen90 stnguyen90 marked this pull request as ready for review November 20, 2025 01:11
@HarshMN2345 HarshMN2345 self-requested a review November 20, 2025 05:10
@stnguyen90 stnguyen90 merged commit 0cbd9ef into main Nov 20, 2025
6 checks passed
@stnguyen90 stnguyen90 deleted the copilot/fix-billing-address-loader branch November 20, 2025 05:18
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.

3 participants