Skip to content

Latest version breaks library #250

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
mikemissing opened this issue May 4, 2020 · 15 comments
Closed

Latest version breaks library #250

mikemissing opened this issue May 4, 2020 · 15 comments

Comments

@mikemissing
Copy link

Describe the bug
When using the latest version I get the following error:
TypeError: o.sockets.subscribe is not a function

This is caused when I try to run this.sockets.subscribe('name', ...)

Expected behavior
The app is supposed to access the sockets via this.sockets. as it did in previous version

Desktop (please complete the following information):

  • OS: Linux
  • Browser Chrome, Firefox

Additional context
Reverting to previous version 3.0.7 solved the issue.

I could not pinpoint the issue in source code due to ... minimization?

@koptelovav
Copy link

Thank you very match! You saved my day!

@huangxuewu
Copy link

i spend like 2 days to figure it out what went wrong in my latest project which create 2 days ago. all the code is the same but last project just won't work.

@kovinet
Copy link

kovinet commented May 5, 2020

Since last version component methods in sockets: don't get triggered anymore. I don't get any error, but sample methods (connect, customEmit) from example below never get triggered:

    sockets: {
        connect: function () {
            console.log('socket connected')
        },
        customEmit: function (data) {
            console.log('this method was fired by the socket server. eg: io.emit("customEmit", data)')
        }
    },

I think it is related to original issue reported ... ?
When I downgraded to 3.0.7 is started working again.

@gtsigner
Copy link

gtsigner commented May 6, 2020

please fix it , same bug

@dapaojiang
Copy link

When I replace this.sockets.subscribe by this.sockets.listener.subscribe and the error disappear.

@maximkolc
Copy link

i lost all day.............. please, fix, ver 3.0.8 not work correctly

@gtsigner
Copy link

gtsigner commented May 7, 2020

this lib not support ack callback?

@lieqiang
Copy link

lieqiang commented May 7, 2020

please fix it , same bug

@goliafrs
Copy link

goliafrs commented May 8, 2020

Until the bug is fixed, everyone who has a similar problem and don't wants to change own code - can install the version 3.0.5.

npm i [email protected] - in dependencies

And lock version in packege.json: "vue-socket.io": "3.0.5"

I have the same problem but this version is not broken yet.
And I don’t understand why to make such changes in the patch version.
It's breaking changes. They should be at least in a minor, and preferably a major version with explanations.

Problem started from this changes.

@taokanghua
Copy link

very very thank you!!!!!!!

@Antoxa1081
Copy link

Antoxa1081 commented May 16, 2020

I am trying to use workaround this.sockets.io instead this.sockets, but its fail too.

@hidde-jan
Copy link

Version 3.0.9 is still broken for me, needed to revert to 3.0.7 to get it working again.

@sayhicoelho
Copy link

Latest version 3.0.9 with same bug here. I'll try @goliafrs workaround.

@dgiangrave
Copy link

@goliafrs is correct in the location, it originates from commit 8988085 "Handle more than one namespace". The changes to the mixin file do not properly add the event listeners for all configurations of the plugin, as well as it contains a number of inconsistencies with its documentation.

I had submitted a PR, #242, in March, both adding namespacing for Vuex modules as well as reverting this specific commit. For any still facing issues, I echo the suggestion to revert to v3.0.7 until the issue is addressed.

@1e4
Copy link

1e4 commented May 30, 2020

Just want to add on that I just installed the latest version 3.0.9 and it's broken, reverting to 3.0.7 did work. Thank you

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.