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

Code not logging out/running in expected order #5908

Open
3 tasks done
markwillis opened this issue Jun 17, 2021 · 2 comments
Open
3 tasks done

Code not logging out/running in expected order #5908

markwillis opened this issue Jun 17, 2021 · 2 comments
Labels

Comments

@markwillis
Copy link

🐛 bug report

Preflight Checklist

  • I have read the Contributing Guidelines for this project.
  • I agree to follow the 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

Console logging order not logging as expected.
Each log shows the result of functions that haven't yet been called.
i.e logging order should be:

log1 = []
call function
log2 = [value]
call fucntion
log3 = [value, value]

Instead it's returning

log1 = [value, value]
call function
log2 = [value, value]
call function
log3 = [value, value]

To Reproduce

I've run this code in multiple IDE's and works as expected elsewhere.

const array = [];

const addValueToArray = (arr) => {
  return arr.push(Math.floor(Math.random() * 5));
};

console.log(array); // empty array
addValueToArray(array);
console.log(array); // array with 1 random value
addValueToArray(array);
console.log(array); // array with two random values

Codesandbox

CleanShot 2021-06-17 at 10 55 18@2x

Codepen

CleanShot 2021-06-17 at 10 55 38@2x

Link to sandbox: link

Your Environment

Note when I originally I was on older Chrome version and CodeSandbox required updating, which i have since done to check the issue still exists.

Software Name/Version
Сodesandbox Not sure where to find, but latest version as I just updated
Browser Chrome 91.0.4472.106
Operating System macOS 11.3
@FossPrime
Copy link

Another very strange issue... If you log out of one user from an SSE container and the terminal open, and log in as another user, the terminal will fail to function until you delete all storage/service workers/cookies for CSB. Very strange, this seems like a security issue, hopefully a low severity one.

@miriambudayr
Copy link

miriambudayr commented Apr 11, 2022

After some investigation, I found the bug, only to realize it was not in the codesandbox.io repo.

This is a known console-feed bug:

samdenty/console-feed#77

There is an open PR for the bug on the issue.

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

No branches or pull requests

4 participants