r2-public-worker icon indicating copy to clipboard operation
r2-public-worker copied to clipboard

TypeError when navigating to URL

Open GarlandM opened this issue 2 years ago • 1 comments

 "outcome": "exception",
  "scriptName": "r2-public-worker",
  "exceptions": [
    {
      "name": "TypeError",
      "message": "Cannot read properties of undefined (reading 'get')",
      "timestamp": 1655249268624
    }

Uploaded a test file (CSS), Navigated to my worker URL, Presented with an error,

GarlandM avatar Jun 14 '22 23:06 GarlandM

Hey, could you double check the following

  • Your account is entitled to use R2. (ie, are you able to access it in the dashboard)
  • Did you try renaming the bucket mappings in the wrangler.toml? The code depends on the bucket having the name PUBLIC for its binding.
    • https://github.com/cmackenzie1/r2-public-worker/blob/main/src/index.ts#L18
    • https://github.com/cmackenzie1/r2-public-worker/blob/main/wrangler.toml#L6-L7

cmackenzie1 avatar Jun 15 '22 00:06 cmackenzie1