Skip to content

Does not work on cloudflare pages #27

@buhodev

Description

@buhodev

Describe the bug
Everything works on local but doesn't work on cloudflare pages

To Reproduce
Steps to reproduce the behavior:

  1. Clone https://github.com/buhodev/melt-ui-starter/
  2. Deploy on cloudflare (e.g. [my-new-project].pages.dev)
  3. Go to [my-new-project].pages.dev/en/og
  4. See error 500 Internal error.

To see the logs on cloudflare dashboard:

  1. Go to cloudflare dashboard
  2. Click on Workers & Pages on the left sidebar

image

  1. Click on View details on the bottom right of your project card

image

  1. Click on Functions tab and scroll down
  2. Click on Begin logs stream button and wait until the Websocket connection is established.

image

  1. Go to [my-new-project].pages.dev/en/og again to trigger the function.
  2. Click on the last GET log

image

  1. See the error trace:
{
  "outcome": "ok",
  "scriptName": "pages-worker--1264517-production",
  "diagnosticsChannelEvents": [],
  "exceptions": [],
  "logs": [
    {
      "message": [
        "CompileError: WebAssembly.instantiate(): Wasm code generation disallowed by embedder"
      ],
      "level": "log",
      "timestamp": 1690291911201
    },
    {
      "message": [
        "Error: WASM has not been initialized. Call `initialize` function."
      ],
      "level": "error",
      "timestamp": 1690291911201
    }
  ],
  ...
}

Expected behavior
The /og route should generate the image

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser: Chrome

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions