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

Problem with collection Metor.users #13

Open
kjm opened this issue Feb 21, 2015 · 18 comments · Fixed by #14
Open

Problem with collection Metor.users #13

kjm opened this issue Feb 21, 2015 · 18 comments · Fixed by #14

Comments

@kjm
Copy link

kjm commented Feb 21, 2015

Hi,
It's good idea to have such functionality, thx.

There's a problem with collection served automatically - Meteor.users (by Accounts package).
After install mongo-collection-instances this one collection is no more instanceof Mongo.collection.
This causes that tests like below fails

if (!(options.collection instanceof Mongo.Collection)) {
throw new Error('Tabular.Table options must specify collection');
}
or
console.log(Meteor.users instanceof Mongo.Collection); ->> false
console.log( instanceof Mongo.Collection); ->> true

Any tips how to resolve this? :)

Best regards
Konrad

@dburles dburles self-assigned this Feb 21, 2015
@dburles
Copy link
Collaborator

dburles commented Feb 21, 2015

Thanks @kjm I believe @rclai is working on a fix for this, see here; reactioncommerce/meteor-security#8 (comment)

@dkoo761
Copy link

dkoo761 commented May 19, 2015

Hi @dburles @rclai I'm still have this issue on IE9 & IE10. Works fine on IE11, Chrome, Firefox, etc. Is anyone else experiencing the problem on IE9/10? It's preventing my production app from loading right now so pretty severe :(

@rclai
Copy link
Collaborator

rclai commented May 19, 2015

What is the error? Is it the same as above?

@dkoo761
Copy link

dkoo761 commented May 19, 2015

@rclai Yes, it's throwing the error here:

if (!(options.collection instanceof Mongo.Collection)) {
    throw new Error('Tabular.Table options must specify collection');
}

@rclai
Copy link
Collaborator

rclai commented May 19, 2015

Is Tabular.Table a third-party package? Which one is it?

@dkoo761
Copy link

dkoo761 commented May 19, 2015

Yes, it's a 3rd party package located here: https://github.com/aldeed/meteor-tabular

@rclai
Copy link
Collaborator

rclai commented May 19, 2015

What is your list of packages in the .versions file?

@dkoo761
Copy link

dkoo761 commented May 19, 2015

accounts-base@1.2.0
accounts-facebook@1.0.4
accounts-oauth@1.1.5
accounts-password@1.1.1
accounts-ui@1.1.5
accounts-ui-unstyled@1.1.7
aldeed:autoform@5.1.2
aldeed:autoform-bs-button-group-input@1.0.2
aldeed:collection2@2.3.3
aldeed:simple-schema@1.3.2
aldeed:tabular@1.2.0
autoupdate@1.2.1
base64@1.0.3
binary-heap@1.0.3
blaze@2.1.2
blaze-tools@1.0.3
boilerplate-generator@1.0.3
callback-hook@1.0.3
check@1.0.5
coffeescript@1.0.6
dburles:mongo-collection-instances@0.3.3
ddp@1.1.0
deps@1.0.7
ejson@1.0.6
email@1.0.6
facebook@1.2.0
fastclick@1.0.3
geojson-utils@1.0.3
goltfisch:braintree-client@0.1.0
goltfisch:braintree-server@0.1.0
handlebars@1.0.3
html-tools@1.0.4
htmljs@1.0.4
http@1.1.0
id-map@1.0.3
infinitedg:winston@0.7.3
iron:controller@1.0.7
iron:core@1.0.7
iron:dynamic-template@1.0.7
iron:layout@1.0.7
iron:location@1.0.7
iron:middleware-stack@1.0.7
iron:router@1.0.7
iron:url@1.0.7
jeremy:autoform-selectize@0.1.0
jeremy:selectize@0.12.1
joshowens:accounts-entry@1.0.3
joshowens:simple-form@0.2.2
jquery@1.11.3_2
json@1.0.3
lai:collection-extensions@0.1.3
launch-screen@1.0.2
less@1.0.14
livedata@1.0.13
localstorage@1.0.3
logging@1.0.7
meteor@1.1.6
meteor-platform@1.2.2
meteorhacks:async@1.0.0
minifiers@1.1.5
minimongo@1.0.8
mobile-status-bar@1.0.3
momentjs:moment@2.8.4
mongo@1.1.0
mrt:just-i18n@0.3.0
mrt:moment@2.8.1
mrt:moment-timezone@0.2.1
mrt:underscore-string-latest@2.3.3
natestrauser:font-awesome@4.3.0
npm-bcrypt@0.7.8_2
oauth@1.1.4
oauth2@1.1.3
observe-sequence@1.0.6
ordered-dict@1.0.3
peerlibrary:aws-sdk@2.1.17_1
peerlibrary:blocking@0.5.2
percolate:synced-cron@1.2.0
percolatestudio:percolatestudio-migrations@0.7.2
random@1.0.3
reactive-dict@1.1.0
reactive-var@1.0.5
reload@1.1.3
retry@1.0.3
routepolicy@1.0.5
schnie:uploader@2.0.3
service-configuration@1.0.4
session@1.1.0
sha@1.0.3
softwarerero:accounts-t9n@1.0.9
spacebars@1.0.6
spacebars-compiler@1.0.6
srp@1.0.3
standard-app-packages@1.0.5
templating@1.1.1
timmyg13:mandrill@0.0.6
tmeasday:publish-counts@0.3.9
tracker@1.0.7
ui@1.0.6
underscore@1.0.3
url@1.0.4
webapp@1.2.0
webapp-hashing@1.0.3

@dkoo761
Copy link

dkoo761 commented May 19, 2015

But I can reproduce it on a vanilla installation of Meteor with only the following in .meteor/packages:

dburles:mongo-collection-instances
meteor-platform

@dkoo761
Copy link

dkoo761 commented May 19, 2015

In the above vanilla installation:

if (Meteor.isClient) {
    console.log(Meteor.users instanceof Mongo.Collection); // <----- false for IE 9/10, true for IE 11
}

@rclai
Copy link
Collaborator

rclai commented May 20, 2015

Ah okay that's good. I can check that out. I'll keep you posted.

@rclai
Copy link
Collaborator

rclai commented May 20, 2015

@dkoo761 in your app, can you git clone to your local packages folder the ie9-fix branch of collection-extensions and see if it fixes your problem.

@rclai
Copy link
Collaborator

rclai commented May 20, 2015

Wait, hold your horses, I messed up something.

@rclai
Copy link
Collaborator

rclai commented May 20, 2015

@dkoo761 okay, try it now.

@dkoo761
Copy link

dkoo761 commented May 22, 2015

@rclai sorry for the delayed reply, I implemented a workaround then got busy with some other stuff.

It appears that this actually made it worse. The server won't even start up now as I'm getting the error:

"Error: Tabular.Table options must specify collection" for the Meteor.users collection.

I git cloned as you asked and named the directory collection-extensions-ie9-fix under /packages. I didn't alter my .packages or .versions file. Do I need to?

@dkoo761
Copy link

dkoo761 commented May 22, 2015

If I comment out your new CollectionExtensions._reassignCollectionPrototype and replace it with the previous commit's version then the app at least starts up again so it does look like something specific to this last commit.

Perhaps this polyfill will help? https://gist.github.com/WebReflection/5593554

@rclai
Copy link
Collaborator

rclai commented May 22, 2015

Yeah, I figured it didn't work. I think I tried that polyfill too, but I'm not sure, if you just locally change it to use the polyfill would it work?

@dkoo761
Copy link

dkoo761 commented Jun 3, 2015

I tried using the polyfill locally and that fixed the startup error but no still no luck with IE9/10 as the polyfill function returns before it does anything useful.

@dburles dburles reopened this Jun 4, 2015
@dburles dburles removed their assignment Mar 2, 2017
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.

4 participants