Skip to main content
Solved

Cannot read properties of undefined (reading 'write')

  • July 23, 2026
  • 4 replies
  • 51 views

Sythe

I’m using the official Figma browser plugin which works great. But when I try to screenshot our local dev environment, I get this error.

It’s probably something in our local environment, but how can I debug this? When I deploy my local environment to production, it works flawless. 

error message

Would love to hear if other people have the same issue and if anybody knows a solution. ​

Best answer by Sythe

I fixed it by changing .test to .localhost ;) 

4 replies

Jaycee Lewis
Figmate

Hey hey ​@Sythe 👋 Thanks for the great debugging question. I wonder if this a secure-context issue rather than anything wrong with your local build.

Quick way to confirm:

  • open DevTools on the failing tab
  • run this in the console 👇
window.isSecureContext
  • If it returns false, that's a useful clue

Question – How are you serving your local environment? If it's http:// on something other than localhost, a few options:

  • Access it via http://localhost or http://127.0.0.1 (both count as secure even over http)
  • Serve local dev over HTTPS (mkcert makes this painless)

If you're already on localhost and still hitting this, let me know we'll dig in. – Jaycee


Sythe
  • Author
  • New Member
  • July 27, 2026

Ah that helps. It’s a local domain (for example test-docker.test:[portnumber]). We serve it over http. 


Sythe
  • Author
  • New Member
  • Answer
  • July 27, 2026

I fixed it by changing .test to .localhost ;) 


Jaycee Lewis
Figmate

Amazing! Thanks for letting us know 🙌 — Jaycee