Skip to content
New issue

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

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

Already on GitHub? # to your account

Useless debug key set in local storage #2610

Closed
rugk opened this issue Jul 10, 2016 · 7 comments
Closed

Useless debug key set in local storage #2610

rugk opened this issue Jul 10, 2016 · 7 comments
Assignees

Comments

@rugk
Copy link

rugk commented Jul 10, 2016

Socket.io seems to set this key, always when it is used:

debug = undefined

Socket.io v1.4.5

Discovered in Etherpad, see ether/etherpad-lite#2985 (comment)

@rugk rugk changed the title Useless key set in local storage Useless debug key set in local storage Jul 10, 2016
@3rd-Eden
Copy link
Contributor

@MasterJames
Copy link

Maybe it's possible to put key deletion when undefined where you need ?
if (export.storage.debug === undefined) delete export.storage.debug;
Or better skip setting if undefined? I'm not entirely sure what the problem is though.

@rugk
Copy link
Author

rugk commented Jul 12, 2016

The problem is just that this is a useless key and the guys from Etherpad said it was Socket.io's fault.

@rugk
Copy link
Author

rugk commented Jul 31, 2016

See ether/etherpad-lite#2985 (comment):

We don't reference the module "debug". It's a dependency of socket.io

So can you remove this debug module?
Why is a module called "debug" used in production versions?

@darrachequesne
Copy link
Member

That issue was closed automatically. Please check if your issue is fixed with the latest release, and reopen if needed (with a fiddle reproducing the issue if possible).

@rugk
Copy link
Author

rugk commented Jan 12, 2017

Please reopen (one cannot do it by themselves when the author closes the issue) the issue as this debug module is still a dependency and you still gave no explanation for what this is used.

@darrachequesne
Copy link
Member

Please see https://socket.io/docs/logging-and-debugging/.

If you're using webpack, you could use something like strip-loader to remove those lines from your bundle (see example)

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

No branches or pull requests

4 participants