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

Sails socket publish not added to the store after upgrade from 0.0.13 to 0.0.17 #32

Open
toovy opened this issue Oct 28, 2015 · 1 comment

Comments

@toovy
Copy link

toovy commented Oct 28, 2015

Hi huafu,

I'm having and issue after my upgrade to ember 2.1, ember-data 2.1 and ember-data-sails 0.0.16/0.0.17. I'm using the SailsSocketAdapter and the ActiveModelSerializer. The sails backend has not changed (0.11.0). Any help is appreciated.

All standard requests are working as expected. Issues arise when a socket push message comes in. In my case for "comments".

When client A creates a comment, client B gets the websocket frame, but the comment is obviously not parsed as expected. With [email protected] and an old [email protected] the record was parsed and created, everything went fine (UI is updated, notification is created). In 0.0.16/0.0.17 with [email protected] not. Using the ember inspector I can see that the new model is not created.

Here the frame that comes from sails:

42["comment",{"verb":"created","data":{"comment":"test","idx_start":null,"idx_end":null,"selected_content":null,"anchor_id":"e8d51873-5732-4d3f-a91b-959dd483ba7c","page_id":22,"created_by":1,"id":80,"createdAt":"2015-10-28T09:33:10.000Z","updatedAt":"2015-10-28T09:33:10.000Z"},"id":80}]

In the receiving client I can see that the above frame is received. I can see that there are no errors on the console. I can see that there are no promises at all (i.e. no failing promises).

I've tried 0.0.13 - 0.0.15, but they won't work due to the ember-data changes from typeKey to modelName. 0.0.16 an 0.0.17 share the described behavior.

Am I missing something or might this be a bug?

Thanks, BR, toovy

@toovy
Copy link
Author

toovy commented Nov 16, 2015

@huafu do you have an idea?

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

No branches or pull requests

1 participant