cloudflare / cloudflare/worker-template-mysql

Error occuring: Uncaught ReferenceError: FinalizationRegistry is not defined

Open
#9 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
60
Forks
14
PR merge metrics
No merged PRs in 30d

Description

Hi

After resolving [this issue](https://github.com/cloudflare/worker-template-mysql/issues/4) I ran into the next one. My barebones worker throws the exception:

```
⛅️ wrangler 2.10.0
--------------------
Your worker has access to the following bindings:
- Vars:
⬣ Listening at http://0.0.0.0:8787
- http://127.0.0.1:8787
- http://192.168.43.230:8787
Total Upload: 223.96 KiB / gzip: 62.20 KiB
✘ [ERROR] Error on remote worker: ParseError: A request to the Cloudflare API (/accounts/e18730c578d8a62bbaf31c7a65b3344f/workers/scripts/script-name/edge-preview) failed.

at throwFetchError
(/Users/.../node_modules/wrangler/wrangler-dist/cli.js:123634:17)
at fetchResult
(/Users/.../node_modules/wrangler/wrangler-dist/cli.js:123603:5)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async createPreviewToken
(/Users/.../node_modules/wrangler/wrangler-dist/cli.js:125631:29)
at async createWorkerPreview
(/Users/.../node_modules/wrangler/wrangler-dist/cli.js:125651:17)
at async start
(/Users/.../node_modules/wrangler/wrangler-dist/cli.js:128131:34)
{
text: 'A request to the Cloudflare API
(/accounts/e18730c578d8a62bbaf31c7a65b3344f/workers/scripts/script-name/edge-preview)
failed.',
notes: [
{
text: 'Uncaught ReferenceError: FinalizationRegistry is not defined\n' +
' at index.js:342:28\n' +
' [code: 10021]'
}
],
location: undefined,
kind: 'error',
code: 10021
}

╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ [b] open a browser, [d] open Devtools, [l] turn on local mode, [c] clear console, [x] to exit │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

```

It seems to relate to [this issue](https://github.com/cloudflare/workers-sdk/issues/2258) which basically says "not supported".

So can I conclude that this package here doesn't work and it is not possible to connect to MySQL from a Cloudflare Worker?

Edit: To clarify, it seems that this error is originating from the wasm of this package.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.