motiondivision / motiondivision/motion

[BUG] Animations do not work with electron when webSecurity is disabled

Open
#2,261 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
33.7k
Forks
1.4k
Avg merge
1d 10h
Merged PRs (30d)
14

Description

1. Read the FAQs 👇

2. Describe the bug

Disabling webSecurity makes Framer Motion / Motion One animations really slow in production and makes them start about 400ms late.

I'm not sure if this is due to Framer Motion / Motion or Electron

3. IMPORTANT: Provide a CodeSandbox reproduction of the bug

A CodeSandbox minimal reproduction will allow us to quickly follow the reproduction steps. Without one, this bug report won't be accepted.

4. Steps to reproduce

Steps to reproduce the behavior:

  1. Go to https://github.com/codingedgar/framer-motion-bug clone and npm run start
  2. Click on the button
  3. Play disabling the webSecurity
  4. See error

5. Expected behavior

disabling webSecurity even tho not recommend should not affect Framer Motion

https://github.com/framer/motion/assets/10213241/97aaa460-7c9b-4914-8e58-ed5d30f03efa

6. Video or screenshots

If applicable, add a video or screenshots to help explain the bug.

7. Environment details

macOS: 12.0.1 (latest)
Electron: 25.3.2 (latest, happens at least from 23)
framer-motion: 10.14.0 (latest, happens at least from 10.12)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked reproduction repository and run npm run start, then compare the animation behavior with Electron's webSecurity enabled and disabled. Investigate whether the regression belongs in Motion or Electron; done means identifying a reproducible cause and a verified fix or documented upstream limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
electron, react, typescript
Domain
desktop, frontend, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.