codesandbox / codesandbox/codesandbox-client

Versions in same sandbox differently for different people

Open
#5,913 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
13.6k
Forks
2.4k
Avg merge
6d 19h
Merged PRs (30d)
2

Description

🐛 bug report

Preflight Checklist

  • I have read the [Contributing Guidelines][contributing] for this project.
  • I agree to follow the [Code of Conduct][code_of_conduct] that this project
    adheres to.
  • I have searched the issue tracker for an issue that matches the one I want
    to file, without success.

Description of the problem

When dependencies have a version as a tag (like next) we expect that everyone will resolve to the same version, but because we cache the result of resolving the absolute version for the tag, people have sometimes run in the issue that one browser resolves a different version than the other browser. We should probably remove that caching so that everyone will always resolve the same absolute version for a tag.

How has this issue affected you? What are you trying to accomplish?

I've heard reports where people were debugging for hours ("It works on my machine!"), and finally found out that they resolved different versions. That's very frustrating, so I'd say that we should fix this soon.

To Reproduce
  1. Open a sandbox with react@next, find the request that resolves next to an absolute version
  2. Make sure that we don't cache that, either by changing our service worker settings in webpack.prod.js, or by changing the server logic so that we send no-cache headers.

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 by reproducing the react@next resolution request and inspect webpack.prod.js along with the server logic that handles the request. Check how the absolute version is cached and whether cache headers are involved. Done means different browsers resolve the tag to the same absolute version.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, webpack
Domain
backend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.