Assertion Failed: When calling `warn` you must provide an `options` hash as the third parameter. `options` should include an `id` property."


#1

Hi , Am using ember-models-table addon for displaying table data. Using a routeName parameter in the controller for specific column. So when i click the same , it throws me the following error “Assertion Failed: When calling warn you must provide an options hash as the third parameter. options should include an id property.” "

what could it be?


#2

Someone is calling Ember.warn with incorrect arguments (as described in the message you pasted in the title). You should use the stacktrace information from the error to isolate who the offending party is, and report an issue on that addon.


#3

I just came across this same error. While using a {{link-to}} helper. The id I was passing to the helper was undefined so the error appeared:

Error: Assertion Failed: When calling warn you must provide an options hash as the third parameter. options should include an id property.

I realised that this had nothing to do with my helper so I added a breakpoint and saw that the error was being raise in the warn method here:

And warn was being called by:

So it looks like the problem is in my glimmer version which doesn’t seem to have the 3rd parameter. In my debug console it looks like:

if ((0, _emberMetal.get)(this, ‘loading’)) {

(true && (0, _emberDebug.warn)('This link-to is in an inactive loading state because at least one of its parameters presently has a null/undefined value, or the provided route name is invalid.', false));

return false;

}

Update: This is fixed in ember 3.1.2 and above!


#4

Hi bitbrit,

Thanks for your reply. I upgraded to ember 3.1.2 . The error is gone .

But i get the warning stated ’ This link-to is in an inactive loading state because at least one of its parameters presently has a null/undefined value, or the provided route name is invalid.

and am using the addon (ember-models-table) from where i need to route.

columns:[   
        {
          "propertyName": "firstName",
          "title":"First Name",
          "routeName":"profile"
}, 

id is passed by default that’s what the addon says.

Any help?


#5

Hi , the warning is due to the second parameter which is passed as undefined . And Currently I dont know how to make it as a valid one , as the ember models table takes the id by default.

Update: The problem is the addon expects id and we send _id. After changing _id to id it worked.