Skip to content

2.0.2 come across breakchange #2963

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

Closed
1 task done
ngot opened this issue Jun 5, 2017 · 8 comments · Fixed by #2969
Closed
1 task done

2.0.2 come across breakchange #2963

ngot opened this issue Jun 5, 2017 · 8 comments · Fixed by #2969
Milestone

Comments

@ngot
Copy link

ngot commented Jun 5, 2017

Note: for support questions, please use one of these channels: stackoverflow or slack

You want to:

  • report a bug

Current behaviour

/root/projects/agent-server/node_modules/[email protected]@egg/lib/application.js:38
      throw e;
      ^

TypeError: Cannot convert undefined or null to object
    at Namespace.use (/root/projects/agent-server/node_modules/[email protected]@socket.io/lib/namespace.js:103:21)
    at initNsp (/root/projects/agent-server/node_modules/[email protected]@egg-socket.io/lib/io.js:80:9)
    at module.exports.app (/root/projects/agent-server/node_modules/[email protected]@egg-socket.io/lib/io.js:55:5)
    at AppWorkerLoader.loadFile (/root/projects/agent-server/node_modules/[email protected]@egg-core/lib/loader/egg_loader.js:270:34)
    at getLoadUnits.forEach.unit (/root/projects/agent-server/node_modules/[email protected]@egg-core/lib/loader/mixin/custom.js:25:29)
    at Array.forEach (native)
    at AppWorkerLoader.loadCustomApp (/root/projects/agent-server/node_modules/[email protected]@egg-core/lib/loader/mixin/custom.js:25:8)
    at AppWorkerLoader.load (/root/projects/agent-server/node_modules/[email protected]@egg/lib/loader/app_worker_loader.js:33:10)
    at new Application (/root/projects/agent-server/node_modules/[email protected]@egg/lib/application.js:34:19)
    at Object.<anonymous> (/root/projects/agent-server/node_modules/[email protected]@egg-cluster/lib/app_worker.js:12:13)

Steps to reproduce (if the current behaviour is a bug)

https://github.com/eggjs/egg-socket.io/tree/master/example run this demo

Note: the best way to get a quick answer is to provide a failing test case, by forking the following fiddle for example.

Expected behaviour

no error shows

Setup

  • OS: osx
  • browser:
  • socket.io version: 2.0.2

Other information (e.g. stacktraces, related issues, suggestions how to fix)

I have check this commit :
2b21690

if I delete this code .It will run ok.

delete this.server.eio.initialPacket;

It can't work with this commit, because: this.server.eio is undefined!

So, what should i do with this issue?

@samypr100
Copy link

samypr100 commented Jun 5, 2017

I'm getting the exactly the same issue 👍
When I install 2.0.2:

TypeError: Cannot convert undefined or null to object
    at Namespace.use (/path_to_project/node_modules/socket.io/lib/namespace.js:103:21)
    at Server.(anonymous function) [as use] (/path_to_project/node_modules/socket.io/lib/index.js:443:29)

When I install 2.0.1, everything works as usual.

@ngot
Copy link
Author

ngot commented Jun 6, 2017

anyone solve this? or i just lock the version?

@samypr100
Copy link

I locked the version to 2.0.1 for now until this is fixed. I hope this gets someone's attention soon.

@darrachequesne
Copy link
Member

Thanks, I could reproduce the issue, I'll try to fix it.

@ngot
Copy link
Author

ngot commented Jun 8, 2017

@darrachequesne What is the plan to fix this. Still broken.

@atian25
Copy link

atian25 commented Jun 12, 2017

any progress ?

@liutian
Copy link

liutian commented Jun 12, 2017

I'm getting the exactly the same issue

@darrachequesne
Copy link
Member

Fix released in 2.0.3.

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

Successfully merging a pull request may close this issue.

5 participants