Help! My Collection don't return my expect value

Hi guys, I’m new on meteor and I need your help.

I have this js, where I define my collection and your methods.

import { Meteor } from ‘meteor/meteor’;
import { Mongo } from ‘meteor/mongo’;
import { check } from ‘meteor/check’;

export const Profiles = new Mongo.Collection(‘profiles’);

‘profiles.byNameAndTimes’: function (nameProfile, times) {
check(nameProfile, String);
check(times, Number);

var profiles = Profiles.find({name:nameProfile, times: { $eq: times }});
if(profiles.count() === 0){
  throw new Meteor.Error("profiles.byNameAndTimes", "Can't find any Profile for name "+nameProfile+" and times "+times+".");

return profiles; 


And I call this method like this:
import {Profiles} from ‘…/…/api/profiles/profiles.js’;‘profiles.byNameAndTimes’, profile, numberOfTimes, function (error, result) {
} else{

The problem is. I execute the same query on Command Line and I have the result I expected, but when I call from my client nothing happen, I just receive the Meteor.error because the find method cannot find any data.

I insert values on this collection on main.js inside a server’s folder on Meteor.startup.

Thx for everyone who tries help me.!

@thsrocha are you sure you imported your method so Meteor can know about it. Give this a read: it explains Methods & Errors quite easily.

Plus, In your method body

return profiles.fetch(); // not just profiles.