Motivated by finding a user created package which added a file
only on the client, in which there were calls to .allow. This way
they would get an error.
This reverts commit 7825ae7845.
test_bundler_npm.js (even after an obvious fix is applied to an unrelated
problem) fails a noticeable percentage of the time in the "bundle multiple apps
in parallel" test. It does not appear to fail on the node-0.10 branch, so will
apply this there instead.
Ha. Turns out that `.call(this)` is needed after all when a
CoffeeScript file is using "use strict".
(http://es5.github.io/#x15.3.4.4)
Thanks to pipedreambomb on stackoverflow for the bug report and to
user1737909 for the documentation reference.
There were more places where this change would be needed, and it was kinda ugly to try to share the code. Having absoluteUrl be where we are reachable is a requirement for testing OAuth flow anyway, having it required for automated testing isn't so bad.
This is typically only a problem when testing on local windows VMs. In this case, you can work around the issue by editing `C:\Windows\System32\drivers\etc\hosts` to include '10.0.2.2 localhost`.
(And yes, I know this code was my idea in the first place. I was wrong.)
- We now rethrow any errors, which means we get a proper stack trace,
rather than it seemingly coming from within a callback in the http package
- The error thrown contains the response body which typically contains
helpful information
- Capture stack traces on server (Meteor.Error objects are only created on the client, not thrown)
- Set a message
- Improve inheritence pattern
Before: (note that the stack trace shows the line in which Meteor.Error is defined, not where it got thrown)
===
- exception - message
Error
at app/packages/livedata/livedata_common.js:143:26
at /private/var/folders/tp/sc9b5w7n2qndz3chpmktwy_w0000gn/T/meteor-test-runikymph/.meteor/local/build/server/server.js:282:7
at Array.forEach (native)
at Function._.each._.forEach (/Users/avital/meteor/dev_bundle/lib/node_modules/underscore/underscore.js:79:11)
at run (/private/var/folders/tp/sc9b5w7n2qndz3chpmktwy_w0000gn/T/meteor-test-runikymph/.meteor/local/build/server/server.js:227:7)
After:
===
- exception - message User validation failed [403]
Error: User validation failed [403]
at app/packages/accounts-base/accounts_server.js:164:13
at Array.forEach (native)
at Function._.each._.forEach (app/packages/underscore/underscore.js:79:11)
at Object.Accounts.insertUserDoc (app/packages/accounts-base/accounts_server.js:162:5)
at Object.Accounts.updateOrCreateUserFromExternalService (app/packages/accounts-base/accounts_server.js:264:21)
at null.func (app/packages/accounts-base/accounts_tests.js:18:28)
at app/packages/tinytest/tinytest.js:299:16
at app/packages/meteor/timers.js:54:36
at _.extend.withValue (app/packages/meteor/dynamics_nodejs.js:31:17)
at f (app/packages/meteor/timers.js:12:51)