Skip to content

Deployment Fails with “TypeError: Failed to fetch” Due to CORS Policy #738

Description

@Mrutyunjay09

When attempting to publish my Preswald app, the deployment fails with the following error:

Deployment failed: TypeError: Failed to fetch

Upon inspecting the browser’s developer console, I observed the following CORS-related error:

Access to fetch at 'https://deployer.preswald.com/deploy' from origin 'https://preswald.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Steps to Reproduce:
1. Open the Preswald web editor.
2. Load a CSV dataset and configure the app (e.g., hello.py, preswald.toml).
3. Click on the “Publish” button.
4. Observe the deployment failure and the CORS error in the browser console.

Expected Behavior:

The app should deploy successfully without encountering CORS-related errors. 

Environment:
• OS: [e.g., Windows 10, macOS 12.5]
• Browser: [e.g., Chrome 114.0.5735.199]
• Preswald Version: [e.g., 0.1.0]

Additional Context:
• The issue seems to be related to a misconfiguration of CORS headers on the deployment server.
• Similar issues have been reported by other users, indicating a potential server-side problem.

References:
GitHub Issue #623
GitHub Issue #636

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions