Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug?]: Shrelock Playground gets stuck at "checking the repo" state with errors in Console #4760

Closed
1 task
trivikr opened this issue Aug 16, 2022 · 8 comments · Fixed by #4854
Closed
1 task
Labels
bug Something isn't working playground This issue is about the sherlock playground. reproducible This issue can be successfully reproduced upholded Real issues without formal reproduction

Comments

@trivikr
Copy link
Contributor

trivikr commented Aug 16, 2022

Self-service

  • I'd be willing to implement a fix

Describe the bug

Shrelock Playground gets stuck at "checking the repo" state with errors in Console

To reproduce

Visit Sherlock Playground at https://viko0.sse.codesandbox.io/
Notice that several fetch and 404 errors are thrown when page loads.

Add an example code for repro, and press run:

await packageJsonAndInstall({
  "name": "test-yarn-version",
  "packageManager": "[email protected]"
});

await expect(yarn(`--version`)).resolves.toBe("1.12.19");

Notice that CORS error is thrown in Console:

Access to fetch at 'https://viko0.sse.codesandbox.io/api/check-repo' from origin 'https://yarnpkg.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Screenshot Sherlock-playground-CORS-error

Environment

  System:
    OS: macOS 12.1
    CPU: (8) arm64 Apple M1 Pro
  Browsers:
    Brave Browser: 104.1.42.88
    Safari: 15.2

Additional context

No response

@yarnbot

This comment has been minimized.

@yarnbot yarnbot added the stale Issues that didn't get attention label Sep 15, 2022
@trivikr

This comment was marked as resolved.

@RDIL RDIL added upholded Real issues without formal reproduction and removed stale Issues that didn't get attention labels Sep 15, 2022
@yarnbot yarnbot added the reproducible This issue can be successfully reproduced label Sep 15, 2022
@yarnbot
Copy link
Collaborator

yarnbot commented Sep 15, 2022

This issue reproduces on master:

Error: expect(received).resolves.toBe(expected) // Object.is equality

Expected: "1.12.19"
Received: "4.0.0-rc.18.dev
"
    at Object.toBe (/github/workspace/.yarn/cache/expect-npm-24.8.0-8c7640c562-44ff9ab1e7.zip/node_modules/expect/build/index.js:202:20)
    at module.exports (evalmachine.<anonymous>:7:42)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async /github/workspace/.yarn/cache/@arcanis-sherlock-npm-2.0.3-558f52b79f-286d94b96d.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:57:13
    at async executeInTempDirectory (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-2.0.3-558f52b79f-286d94b96d.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:18:16)
    at async executeRepro (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-2.0.3-558f52b79f-286d94b96d.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:25:12)
    at async ExecCommand.execute (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-2.0.3-558f52b79f-286d94b96d.zip/node_modules/@arcanis/sherlock/lib/commands/exec.js:26:38)
    at async ExecCommand.validateAndExecute (/github/workspace/.yarn/cache/clipanion-npm-2.0.0-rc.16-b9444aaf89-4061026d74.zip/node_modules/clipanion/lib/advanced/Command.js:161:26)
    at async Cli.run (/github/workspace/.yarn/cache/clipanion-npm-2.0.0-rc.16-b9444aaf89-4061026d74.zip/node_modules/clipanion/lib/advanced/Cli.js:74:24)
    at async Cli.runExit (/github/workspace/.yarn/cache/clipanion-npm-2.0.0-rc.16-b9444aaf89-4061026d74.zip/node_modules/clipanion/lib/advanced/Cli.js:83:28)

@trivikr
Copy link
Contributor Author

trivikr commented Sep 16, 2022

Sherlock Playground now has more issues.

It times out in most cases.

Screenshot sherlock-playground-timeout

Other times, it returns 502 Bad Gateway error

Screenshot sherlock-playground-502-bad-gateway

In some cases when it loads, it returns ENOSPC: no space left on device error

Screenshot sherlock-playground-no-space-left-on-device

@RDIL
Copy link
Member

RDIL commented Sep 16, 2022

We're aware and trying to resolve the matter. We think the issue might be on the CodeSandbox side of things, so we're in contact with the folks who run it. Sorry about the issue in the meantime.

@paul-soporan
Copy link
Member

paul-soporan commented Sep 16, 2022

The Bad Gateway due to ENOSPC is because the Next cache doesn't get cleared when the server restarts. I need to look into making server restarts clear it, but for now I cleared it manually It's actually due to the fact that the cloned repo doesn't get pruned, it takes up a lot more space than the Next cache.

I haven't looked into fixing the original CORS error yet.

@paul-soporan paul-soporan added the playground This issue is about the sherlock playground. label Sep 16, 2022
@trivikr
Copy link
Contributor Author

trivikr commented Sep 16, 2022

Verified that no CORS errors are thrown in Console on Sherlock Playground.

@trivikr
Copy link
Contributor Author

trivikr commented Sep 16, 2022

The CORS errors are now thrown during "running the repro" state.

I've created a new bug report at #4855

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working playground This issue is about the sherlock playground. reproducible This issue can be successfully reproduced upholded Real issues without formal reproduction
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants