简体   繁体   中英

Error invoking Method 'headersToken' after installing adding MessageFormat to Meteor app

After installing MessageFormat with meteor add gadicohen:messageformat I get this error in the browser console:

Error invoking Method 'headersToken': Internal server error [500]

the full error log in the Terminal:

=> App running at: http://localhost:3000/
I20160104-14:23:58.795(1)? Exception while invoking method 'headersToken' Error: Did not check() all arguments during call to 'headersToken'
I20160104-14:23:58.797(1)?     at [object Object]._.extend.throwUnlessAllArgumentsHaveBeenChecked (packages/check/match.js:411:1)
I20160104-14:23:58.797(1)?     at Object.Match._failIfArgumentsAreNotAllChecked (packages/check/match.js:106:1)
I20160104-14:23:58.797(1)?     at maybeAuditArgumentChecks (livedata_server.js:1695:18)
I20160104-14:23:58.797(1)?     at livedata_server.js:708:19
I20160104-14:23:58.797(1)?     at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
I20160104-14:23:58.797(1)?     at livedata_server.js:706:40
I20160104-14:23:58.798(1)?     at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
I20160104-14:23:58.798(1)?     at livedata_server.js:704:46
I20160104-14:23:58.798(1)?     at tryCallTwo (/Users/psychomachine/.meteor/packages/promise/.0.5.1.8idxpg++os+web.browser+web.cordova/npm/node_modules/meteor-promise/node_modules/promise/lib/core.js:45:5)
I20160104-14:23:58.798(1)?     at doResolve (/Users/psychomachine/.meteor/packages/promise/.0.5.1.8idxpg++os+web.browser+web.cordova/npm/node_modules/meteor-promise/node_modules/promise/lib/core.js:171:13)

I am new to Meteor, and so far things have been pretty smooth, but with this error I am not sure how to proceed. I'd prefer to use MessageFormat and not some other i18 package, because of the GUI for translations that comes with MessageFormat.

Any tips will be greatly appreciated.

All best, Tench

i am far from an expert... but right off the bat - first line of the error - check()... that is informative.

Something is being pushed to the headersToken method and it is attempting to write something to a collection - but it is not first "check"-ing those parameters before writing.

If you turned off check, this would pass. I ran into something similar while trying to use ServerSessions and ended up needing to create my own package that included check on the write.

https://github.com/tewksbum/meteor-server-session

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM