lvbreda / Meteor_angularjs

279 stars 42 forks source link

problems in example: adding a tag results in "uncaught Error"; cannot insert new todos or lists: access denied #17

Closed alex-okrushko closed 6 years ago

alex-okrushko commented 11 years ago

@lvbreda , When working with your "Todos" example I have a couple of problems: 1) When I add the "tag" or check the checkbox (todo is "completed") I get the error:

Uncaught Error: When replacing document, field name may not start with '$' modify.js:27
LocalCollection._modify modify.js:27
LocalCollection._modifyAndNotify minimongo.js:428
LocalCollection.update minimongo.js:394
self._manager.registerStore.update collection.js:88
store.(anonymous function) livedata_connection.js:377
(anonymous function) livedata_connection.js:856
_.each._.forEach underscore.js:79
(anonymous function) livedata_connection.js:855
_.each._.forEach underscore.js:87
_.extend._livedata_data livedata_connection.js:852
(anonymous function) livedata_connection.js:185
(anonymous function) stream_client.js:328
_.each._.forEach underscore.js:79
self.socket.onmessage stream_client.js:327
REventTarget.dispatchEvent sockjs-0.3.4.js:86
SockJS._dispatchMessage sockjs-0.3.4.js:1039
SockJS._didMessage sockjs-0.3.4.js:1097
poll.onmessage sockjs-0.3.4.js:2196
REventTarget.dispatchEvent sockjs-0.3.4.js:86
that.xo.onchunk sockjs-0.3.4.js:2356
EventEmitter.emit sockjs-0.3.4.js:150
that.xhr.onreadystatechange sockjs-0.3.4.js:807

As far as I understand it is mongoDB not liking it.

2) When I try to add a new "todo" or add to the "list" I get the error: insert failed: Access denied

Any ideas why all it this is happening? Is the example broken?

Is the meteor-angularjs bind broken?

I'm hoping I can use Angularjs with Meteor (instead of Handlebars) and I'm currently learning both of them. Glad that you've created this possibility, however now I'm concerned. Thanks

lvbreda commented 11 years ago

@alex-okrushko Hey, the bind is still working (using it myself on project as we speak). I also saw that error somewhere but I can't remember how I fixed it. Could you share your code that you change somewhere?

Also the example code is written to work with the with the insecure package shame because it was pre-5.0. So don't forget to add .allow to your serverside code or do meteor add insecure.

Hope to here back from you with the code.You can also always hit me up on g+ for a chat.

Lander Van Breda

alex-okrushko commented 11 years ago

@lvbreda, Thanks for the fast response.

I haven't changed any code whatsoever, I'm just trying to get the example working before I can dive any deeper. :)

As for insecure package: I couldn't find it in the list at todo\.meteor\packages. At pre-5.0 it was included automatically? (I know the authentication was added recently)

lvbreda commented 11 years ago

@alex-okrushko Indeed pre-5.0 there was no need for the insecure package because there was no authentication.

Getting back to your error I have found the error and will try to push a fix as fast as possible.

alex-okrushko commented 11 years ago

@lvbreda Great! Is it the Meteor_angularjs broken or example itself? You not having this issue makes me think that it's the example.

lvbreda commented 11 years ago

@alex-okrushko It is just something in the example, you can use meteor_angularjs as you like.

alex-okrushko commented 6 years ago

Irrelevant. Closing.