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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Console log persists even after switching sandbox. #2626

Closed
niyabits opened this issue Oct 3, 2019 · 7 comments
Closed

Console log persists even after switching sandbox. #2626

niyabits opened this issue Oct 3, 2019 · 7 comments

Comments

@niyabits
Copy link
Contributor

niyabits commented Oct 3, 2019

馃悰 bug report

Description of the problem

  • Created a new sandbox in a folder.
  • The previous sandbox console logged some stuff.
  • As soon as I begin writing in the new sandbox's js file the console logged stuff of the previous sandbox appears.
  • It goes away as soon as I reload the browser in the sandbox
  • It reappears as soon as I type something and the JS file is unsaved.

This is happening with Vanilla JS sandbox for me I haven't tried out other sandboxed templates.

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

It confuses me a lot.

Link to sandbox: link (optional)

Previous sandbox

The sandbox I'm currently working with.

Your Environment

Software Name/Version
小odesandbox
Browser - Firefox 69.0.1 (64 Bit)
Operating System - Windows 10

Here's a screenshot.
I would like to work on the issue, also I'm new here, this is my first time contributing to something technical. Thank You for looking into this.
image

@CompuIves
Copy link
Member

Hey @yashguptaz! This is a good report, we would absolutely appreciate your help! We normally clear the console with this code: dispatch({ type: 'clear-console' });. We could add this code here I think: https://github.com/CompuIves/codesandbox-client/blob/d15f9e7c51f159ab429002a577cbfd3de43f27a7/packages/common/src/components/Preview/index.tsx#L240-L263 to fix it.

@niyabits
Copy link
Contributor Author

niyabits commented Oct 4, 2019

I have set up my project locally, I have made the required changes but I cannot test them.
I don't know why this is happening.

image

Can you tell me how can I log in to codesandbox using GitHub?
I want to test this thing with folders but I'm unable to create folders because I cannot log in.

image

I have added dispatch({ type: 'clear-console' }); just after the resetState() function at line 244.
I hope it should be good.
I haven't run any tests yet, I will update you once I try out my changes and will test this thing after that.

@niyabits
Copy link
Contributor Author

niyabits commented Oct 5, 2019

I am having some issues with Yarn test
@Saeris @CompuIves Can you help me with that?

TptI9162 png medium

@jyash97
Copy link
Contributor

jyash97 commented Oct 5, 2019

Hey @yashguptaz
For testing login features you can do the following:

You can log in on https://codesandbox.io/ and copy the contents of the jwt local storage key over to your development environment on http://localhost:3000/.

Read the last paragraph here for more details.

@niyabits
Copy link
Contributor Author

niyabits commented Oct 6, 2019

@CompuIves I cannot replicate the bug now, was there a patch that fixed that?
I find it strange. If there was a PR that fixed it I'm closing this issue and my PR.

@arthurdenner
Copy link
Contributor

arthurdenner commented Nov 15, 2019

@yashguptaz, I believe that your PR fixed it. Can you close the issue, please?

@niyabits
Copy link
Contributor Author

Closing it right now :)
Will be looking forward to more contributions from my side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants