Skip to content
This repository was archived by the owner on Mar 22, 2022. It is now read-only.

Crash after upgrade to feathersjs v3 #642

Closed
InnerPeace080 opened this issue Mar 5, 2018 · 2 comments
Closed

Crash after upgrade to feathersjs v3 #642

InnerPeace080 opened this issue Mar 5, 2018 · 2 comments

Comments

@InnerPeace080
Copy link

InnerPeace080 commented Mar 5, 2018

Steps to reproduce

before i upgrade my server to feathersjs v3 everything run normal
but after that in a hook function

before: {
all: [
(hook)=>{
console.log('1')
},
authenticate('jwt'),
(hook)=>{
console.log('2') // not reach here when i call find methode
}
],
find: [],

i am not miss 'find' method when i describe custorm service class, every seem like normal when i remove "authenticate('jwt')" hook

Error info in console

info: error: relations-getchilds - Method: find: undefined
smarthome-relations-service | error: , , provider=rest, host=192.168.0.58:3028, user-agent=okhttp/3.6.0, accept=application/json, text/plain, /, accept-encoding=gzip, authorization=eyJhbGciOiJIUzI1NiIsInR5cCI6ImFjY2VzcyIsInR5cGUiOiJhY2Nlc3MifQ.eyJ1c2VySWQiOiI1YTM3M2ZiZmJmOTIxZDAwMDhlYjEzMzIiLCJ1c2VybmFtZSI6ImFkbWluIiwicm9sZXMiOlsidXNlciJdLCJ0eXBlIjoidXNlciIsImlhdCI6MTUyMDI0ODk1NiwiZXhwIjoxNTIyODQwOTU2LCJhdWQiOiJodHRwczovL3lvdXJkb21haW4uY29tIiwiaXNzIjoiZmVhdGhlcnMiLCJzdWIiOiJhbm9ueW1vdXMiLCJqdGkiOiJhMDQ2YmRjZi0xMzViLTQwNGItYWQwZC1iYmM3NTMxNzBiNTcifQ.Qf6YFAPhTy9brQcsHVMJBVvbmCbbTxWjF3I2jQRsyX8, x-forwarded-for=192.168.0.30, x-forwarded-host=192.168.0.58:3028, x-forwarded-proto=http, x-forwarded-server=a3151b6f6eac, type=before, name=relations-getchilds, default=50, max=100, find=function () {
smarthome-relations-service | var tmp = this._super;
smarthome-relations-service |
smarthome-relations-service | // Add a new ._super() method that is the same method
smarthome-relations-service | // but either pointing to the prototype method
smarthome-relations-service | // or to the overwritten method
smarthome-relations-service | this._super = (typeof old === 'function') ? old : _super[name];
smarthome-relations-service |
smarthome-relations-service | // The method only need to be bound temporarily, so we
smarthome-relations-service | // remove it when we're done executing
smarthome-relations-service | var ret = fn.apply(this, arguments);
smarthome-relations-service | this._super = tmp;
smarthome-relations-service |
smarthome-relations-service | return ret;
smarthome-relations-service | }, get=function () {
smarthome-relations-service | var tmp = this._super;
smarthome-relations-service |
smarthome-relations-service | // Add a new ._super() method that is the same method
smarthome-relations-service | // but either pointing to the prototype method
smarthome-relations-service | // or to the overwritten method
smarthome-relations-service | this._super = (typeof old === 'function') ? old : _super[name];
smarthome-relations-service |
smarthome-relations-service | // The method only need to be bound temporarily, so we
smarthome-relations-service | // remove it when we're done executing
smarthome-relations-service | var ret = fn.apply(this, arguments);
smarthome-relations-service | this._super = tmp;
smarthome-relations-service |
smarthome-relations-service | return ret;
smarthome-relations-service | }, create=function () {
smarthome-relations-service | var tmp = this._super;
smarthome-relations-service |
smarthome-relations-service | // Add a new ._super() method that is the same method
smarthome-relations-service | // but either pointing to the prototype method
smarthome-relations-service | // or to the overwritten method
smarthome-relations-service | this._super = (typeof old === 'function') ? old : _super[name];
smarthome-relations-service |
smarthome-relations-service | // The method only need to be bound temporarily, so we
smarthome-relations-service | // remove it when we're done executing
smarthome-relations-service | var ret = fn.apply(this, arguments);
smarthome-relations-service | this._super = tmp;
smarthome-relations-service |
smarthome-relations-service | return ret;
smarthome-relations-service | }, update=function () {
smarthome-relations-service | var tmp = this._super;
smarthome-relations-service |
smarthome-relations-service | // Add a new ._super() method that is the same method
smarthome-relations-service | // but either pointing to the prototype method
smarthome-relations-service | // or to the overwritten method
smarthome-relations-service | this._super = (typeof old === 'function') ? old : _super[name];
smarthome-relations-service |
smarthome-relations-service | // The method only need to be bound temporarily, so we
smarthome-relations-service | // remove it when we're done executing
smarthome-relations-service | var ret = fn.apply(this, arguments);
smarthome-relations-service | this._super = tmp;
smarthome-relations-service |
smarthome-relations-service | return ret;
smarthome-relations-service | }, patch=function () {
smarthome-relations-service | var tmp = this._super;
smarthome-traefik-server | time="2018-03-05T18:22:37+07:00" level=debug msg="Round trip: http://128.18.0.7:3030, code: 500, duration: 55.314563ms"
smarthome-relations-service |
smarthome-relations-service | // Add a new ._super() method that is the same method
smarthome-relations-service | // but either pointing to the prototype method
smarthome-relations-service | // or to the overwritten method
smarthome-relations-service | this._super = (typeof old === 'function') ? old : _super[name];
smarthome-relations-service |
smarthome-relations-service | // The method only need to be bound temporarily, so we
smarthome-relations-service | // remove it when we're done executing
smarthome-relations-service | var ret = fn.apply(this, arguments);
smarthome-relations-service | this._super = tmp;
smarthome-relations-service |
smarthome-relations-service | return ret;
smarthome-relations-service | }, remove=function () {
smarthome-relations-service | var tmp = this._super;
smarthome-relations-service |
smarthome-relations-service | // Add a new ._super() method that is the same method
smarthome-relations-service | // but either pointing to the prototype method
smarthome-relations-service | // or to the overwritten method
smarthome-relations-service | this._super = (typeof old === 'function') ? old : _super[name];
smarthome-relations-service |
smarthome-relations-service | // The method only need to be bound temporarily, so we
smarthome-relations-service | // remove it when we're done executing
smarthome-relations-service | var ret = fn.apply(this, arguments);
smarthome-relations-service | this._super = tmp;
smarthome-relations-service |
smarthome-relations-service | return ret;
smarthome-relations-service | }, hooks=hooks(allHooks) {
smarthome-relations-service | each(allHooks, (obj, type) => {
smarthome-relations-service | if (!this.__hooks[type]) {
smarthome-relations-service | throw new Error('${type}' is not a valid hook type);
smarthome-relations-service | }
smarthome-relations-service |
smarthome-relations-service | const hooks = exports.convertHookData(obj);
smarthome-relations-service |
smarthome-relations-service | each(hooks, (value, method) => {
smarthome-relations-service | if (method !== 'all' && methods.indexOf(method) === -1) {
smarthome-relations-service | throw new Error('${method}' is not a valid hook method);
smarthome-relations-service | }
smarthome-relations-service | });
smarthome-relations-service |
smarthome-relations-service | methods.forEach(method => {
smarthome-relations-service | const myHooks = this.__hooks[type][method] ||
smarthome-relations-service | (this.__hooks[type][method] = []);
smarthome-relations-service |
smarthome-relations-service | if (hooks.all) {
smarthome-relations-service | myHooks.push.apply(myHooks, hooks.all);
smarthome-relations-service | }
smarthome-relations-service |
smarthome-relations-service | if (hooks[method]) {
smarthome-relations-service | myHooks.push.apply(myHooks, hooks[method]);
smarthome-relations-service | }
smarthome-relations-service | });
smarthome-relations-service | });
smarthome-relations-service |
smarthome-relations-service | return this;
smarthome-relations-service | }, domain=undefined, created=function (data, hook) {
smarthome-relations-service | if (!hook) {
smarthome-relations-service | // Fake hook for custom events
smarthome-relations-service | hook = { path, service, app, result: data };
smarthome-relations-service | }
smarthome-relations-service |
smarthome-relations-service | debug('Publishing event', event, hook.path);
smarthome-relations-service |
smarthome-relations-service | const servicePublishers = service[PUBLISHERS];
smarthome-relations-service | const appPublishers = app[PUBLISHERS];
smarthome-relations-service | // This will return the first publisher list that is not empty
smarthome-relations-service | // In the following precedence
smarthome-relations-service | const callback = [
smarthome-relations-service | // 1. Service publisher for a specific event
smarthome-relations-service | get(servicePublishers, event),
smarthome-relations-service | // 2. Service publisher for all events
smarthome-relations-service | get(servicePublishers, ALL_EVENTS),
smarthome-relations-service | // 3. App publishers for a specific event
smarthome-relations-service | get(appPublishers, event),
smarthome-relations-service | // 4. App publishers for all events
smarthome-relations-service | get(appPublishers, ALL_EVENTS)
smarthome-relations-service | ].find(current => typeof current === 'function') || noop;
smarthome-relations-service |
smarthome-relations-service | Promise.resolve(callback(data, hook)).then(result => {
smarthome-relations-service | if (!result) {
smarthome-relations-service | return;
smarthome-relations-service | }
smarthome-relations-service |
smarthome-relations-service | const results = Array.isArray(result) ? compact(flattenDeep(result)) : [ result ];
smarthome-relations-service | const channel = new CombinedChannel(results);
smarthome-relations-service |
smarthome-relations-service | if (channel && channel.length > 0) {
smarthome-relations-service | app.emit('publish', event, channel, hook, data);
smarthome-relations-service | } else {
smarthome-relations-service | debug('No connections to publish to');
smarthome-relations-service | }
smarthome-relations-service | });
smarthome-relations-service | }, updated=function (data, hook) {
smarthome-relations-service | if (!hook) {
smarthome-relations-service | // Fake hook for custom events
smarthome-relations-service | hook = { path, service, app, result: data };
smarthome-relations-service | }
smarthome-relations-service |
smarthome-relations-service | debug('Publishing event', event, hook.path);
smarthome-relations-service |
smarthome-relations-service | const servicePublishers = service[PUBLISHERS];
smarthome-relations-service | const appPublishers = app[PUBLISHERS];
smarthome-relations-service | // This will return the first publisher list that is not empty
smarthome-relations-service | // In the following precedence
smarthome-relations-service | const callback = [
smarthome-relations-service | // 1. Service publisher for a specific event
smarthome-relations-service | get(servicePublishers, event),
smarthome-relations-service | // 2. Service publisher for all events
smarthome-relations-service | get(servicePublishers, ALL_EVENTS),
smarthome-relations-service | // 3. App publishers for a specific event
smarthome-relations-service | get(appPublishers, event),
smarthome-relations-service | // 4. App publishers for all events
smarthome-relations-service | get(appPublishers, ALL_EVENTS)
smarthome-relations-service | ].find(current => typeof current === 'function') || noop;
smarthome-relations-service |
smarthome-relations-service | Promise.resolve(callback(data, hook)).then(result => {
smarthome-relations-service | if (!result) {
smarthome-relations-service | return;
smarthome-relations-service | }
smarthome-relations-service |
smarthome-relations-service | const results = Array.isArray(result) ? compact(flattenDeep(result)) : [ result ];
smarthome-relations-service | const channel = new CombinedChannel(results);
smarthome-relations-service |
smarthome-relations-service | if (channel && channel.length > 0) {
smarthome-relations-service | app.emit('publish', event, channel, hook, data);
smarthome-relations-service | } else {
smarthome-relations-service | debug('No connections to publish to');
smarthome-relations-service | }
smarthome-relations-service | });
smarthome-relations-service | }, removed=function (data, hook) {
smarthome-relations-service | if (!hook) {
smarthome-relations-service | // Fake hook for custom events
smarthome-relations-service | hook = { path, service, app, result: data };
smarthome-relations-service | }
smarthome-relations-service |
smarthome-relations-service | debug('Publishing event', event, hook.path);
smarthome-relations-service |
smarthome-relations-service | const servicePublishers = service[PUBLISHERS];
smarthome-relations-service | const appPublishers = app[PUBLISHERS];
smarthome-relations-service | // This will return the first publisher list that is not empty
smarthome-relations-service | // In the following precedence
smarthome-relations-service | const callback = [
smarthome-relations-service | // 1. Service publisher for a specific event
smarthome-relations-service | get(servicePublishers, event),
smarthome-relations-service | // 2. Service publisher for all events
smarthome-relations-service | get(servicePublishers, ALL_EVENTS),
smarthome-relations-service | // 3. App publishers for a specific event
smarthome-relations-service | get(appPublishers, event),
smarthome-relations-service | // 4. App publishers for all events
smarthome-relations-service | get(appPublishers, ALL_EVENTS)
smarthome-relations-service | ].find(current => typeof current === 'function') || noop;
smarthome-relations-service |
smarthome-relations-service | Promise.resolve(callback(data, hook)).then(result => {
smarthome-relations-service | if (!result) {
smarthome-relations-service | return;
smarthome-relations-service | }
smarthome-relations-service |
smarthome-relations-service | const results = Array.isArray(result) ? compact(flattenDeep(result)) : [ result ];
smarthome-relations-service | const channel = new CombinedChannel(results);
smarthome-relations-service |
smarthome-relations-service | if (channel && channel.length > 0) {
smarthome-relations-service | app.emit('publish', event, channel, hook, data);
smarthome-relations-service | } else {
smarthome-relations-service | debug('No connections to publish to');
smarthome-relations-service | }
smarthome-relations-service | });
smarthome-relations-service | }, patched=function (data, hook) {
smarthome-relations-service | if (!hook) {
smarthome-relations-service | // Fake hook for custom events
smarthome-relations-service | hook = { path, service, app, result: data };
smarthome-relations-service | }
smarthome-relations-service |
smarthome-relations-service | debug('Publishing event', event, hook.path);
smarthome-relations-service |
smarthome-relations-service | const servicePublishers = service[PUBLISHERS];
smarthome-relations-service | const appPublishers = app[PUBLISHERS];
smarthome-relations-service | // This will return the first publisher list that is not empty
smarthome-relations-service | // In the following precedence
smarthome-relations-service | const callback = [
smarthome-relations-service | // 1. Service publisher for a specific event
smarthome-relations-service | get(servicePublishers, event),
smarthome-relations-service | // 2. Service publisher for all events
smarthome-relations-service | get(servicePublishers, ALL_EVENTS),
smarthome-relations-service | // 3. App publishers for a specific event
smarthome-relations-service | get(appPublishers, event),
smarthome-relations-service | // 4. App publishers for all events
smarthome-relations-service | get(appPublishers, ALL_EVENTS)
smarthome-relations-service | ].find(current => typeof current === 'function') || noop;
smarthome-relations-service |
smarthome-relations-service | Promise.resolve(callback(data, hook)).then(result => {
smarthome-relations-service | if (!result) {
smarthome-relations-service | return;
smarthome-relations-service | }
smarthome-relations-service |
smarthome-relations-service | const results = Array.isArray(result) ? compact(flattenDeep(result)) : [ result ];
smarthome-relations-service | const channel = new CombinedChannel(results);
smarthome-relations-service |
smarthome-relations-service | if (channel && channel.length > 0) {
smarthome-relations-service | app.emit('publish', event, channel, hook, data);
smarthome-relations-service | } else {
smarthome-relations-service | debug('No connections to publish to');
smarthome-relations-service | }
smarthome-relations-service | });
smarthome-relations-service | }, _maxListeners=undefined, setMaxListeners=function setMaxListeners(n) {
smarthome-relations-service | if (typeof n !== 'number' || n < 0 || isNaN(n)) {
smarthome-relations-service | const errors = lazyErrors();
smarthome-relations-service | throw new errors.TypeError('ERR_OUT_OF_RANGE', 'n');
smarthome-relations-service | }
smarthome-relations-service | this._maxListeners = n;
smarthome-relations-service | return this;
smarthome-relations-service | }, getMaxListeners=function getMaxListeners() {
smarthome-relations-service | return $getMaxListeners(this);
smarthome-relations-service | }, emit=function emit(type, ...args) {
smarthome-relations-service | let doError = (type === 'error');
smarthome-relations-service |
smarthome-relations-service | const events = this._events;
smarthome-relations-service | if (events !== undefined)
smarthome-relations-service | doError = (doError && events.error === undefined);
smarthome-relations-service | else if (!doError)
smarthome-relations-service | return false;
smarthome-relations-service |
smarthome-relations-service | const domain = this.domain;
smarthome-relations-service |
smarthome-relations-service | // If there is no 'error' event listener then throw.
smarthome-relations-service | if (doError) {
smarthome-relations-service | let er;
smarthome-relations-service | if (args.length > 0)
smarthome-relations-service | er = args[0];
smarthome-relations-service | if (domain !== null && domain !== undefined) {
smarthome-relations-service | if (!er) {
smarthome-relations-service | const errors = lazyErrors();
smarthome-relations-service | er = new errors.Error('ERR_UNHANDLED_ERROR');
smarthome-relations-service | }
smarthome-relations-service | if (typeof er === 'object' && er !== null) {
smarthome-relations-service | er.domainEmitter = this;
smarthome-relations-service | er.domain = domain;
smarthome-relations-service | er.domainThrown = false;
smarthome-relations-service | }
smarthome-relations-service | domain.emit('error', er);
smarthome-relations-service | } else if (er instanceof Error) {
smarthome-relations-service | throw er; // Unhandled 'error' event
smarthome-relations-service | } else {
smarthome-relations-service | // At least give some kind of context to the user
smarthome-relations-service | const errors = lazyErrors();
smarthome-relations-service | const err = new errors.Error('ERR_UNHANDLED_ERROR', er);
smarthome-relations-service | err.context = er;
smarthome-relations-service | throw err;
smarthome-relations-service | }
smarthome-relations-service | return false;
smarthome-relations-service | }
smarthome-relations-service |
smarthome-relations-service | const handler = events[type];
smarthome-relations-service |
smarthome-relations-service | if (handler === undefined)
smarthome-relations-service | return false;
smarthome-relations-service |
smarthome-relations-service | let needDomainExit = false;
smarthome-relations-service | if (domain !== null && domain !== undefined && this !== process) {
smarthome-relations-service | domain.enter();
smarthome-relations-service | needDomainExit = true;
smarthome-relations-service | }
smarthome-relations-service |
smarthome-relations-service | if (typeof handler === 'function') {
smarthome-relations-service | handler.apply(this, args);
smarthome-relations-service | } else {
smarthome-relations-service | const len = handler.length;
smarthome-relations-service | const listeners = arrayClone(handler, len);
smarthome-relations-service | for (var i = 0; i < len; ++i)
smarthome-relations-service | listeners[i].apply(this, args);
smarthome-relations-service | }
smarthome-relations-service |
smarthome-relations-service | if (needDomainExit)
smarthome-relations-service | domain.exit();
smarthome-relations-service |
smarthome-relations-service | return true;
smarthome-relations-service | }, addListener=function addListener(type, listener) {
smarthome-relations-service | return _addListener(this, type, listener, false);
smarthome-relations-service | }, on=function addListener(type, listener) {
smarthome-relations-service | return _addListener(this, type, listener, false);
smarthome-relations-service | }, prependListener=function prependListener(type, listener) {
smarthome-relations-service | return _addListener(this, type, listener, true);
smarthome-relations-service | }, once=function once(type, listener) {
smarthome-relations-service | if (typeof listener !== 'function') {
smarthome-relations-service | const errors = lazyErrors();
smarthome-relations-service | throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'listener', 'Function');
smarthome-relations-service | }
smarthome-relations-service | this.on(type, _onceWrap(this, type, listener));
smarthome-relations-service | return this;
smarthome-relations-service | }, prependOnceListener=function prependOnceListener(type, listener) {
smarthome-relations-service | if (typeof listener !== 'function') {
smarthome-relations-service | const errors = lazyErrors();
smarthome-relations-service | throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'listener',
smarthome-relations-service | 'Function');
smarthome-relations-service | }
smarthome-relations-service | this.prependListener(type, _onceWrap(this, type, listener));
smarthome-relations-service | return this;
smarthome-relations-service | }, removeListener=function removeListener(type, listener) {
smarthome-relations-service | var list, events, position, i, originalListener;
smarthome-relations-service |
smarthome-relations-service | if (typeof listener !== 'function') {
smarthome-relations-service | const errors = lazyErrors();
smarthome-relations-service | throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'listener',
smarthome-relations-service | 'Function');
smarthome-relations-service | }
smarthome-relations-service |
smarthome-relations-service | events = this._events;
smarthome-relations-service | if (events === undefined)
smarthome-relations-service | return this;
smarthome-relations-service |
smarthome-relations-service | list = events[type];
smarthome-relations-service | if (list === undefined)
smarthome-relations-service | return this;
smarthome-relations-service |
smarthome-relations-service | if (list === listener || list.listener === listener) {
smarthome-relations-service | if (--this._eventsCount === 0)
smarthome-relations-service | this._events = Object.create(null);
smarthome-relations-service | else {
smarthome-relations-service | delete events[type];
smarthome-relations-service | if (events.removeListener)
smarthome-relations-service | this.emit('removeListener', type, list.listener || listener);
smarthome-relations-service | }
smarthome-relations-service | } else if (typeof list !== 'function') {
smarthome-relations-service | position = -1;
smarthome-relations-service |
smarthome-relations-service | for (i = list.length - 1; i >= 0; i--) {
smarthome-relations-service | if (list[i] === listener || list[i].listener === listener) {
smarthome-relations-service | originalListener = list[i].listener;
smarthome-relations-service | position = i;
smarthome-relations-service | break;
smarthome-relations-service | }
smarthome-relations-service | }
smarthome-relations-service |
smarthome-relations-service | if (position < 0)
smarthome-relations-service | return this;
smarthome-relations-service |
smarthome-relations-service | if (position === 0)
smarthome-relations-service | list.shift();
smarthome-relations-service | else {
smarthome-relations-service | if (spliceOne === undefined)
smarthome-relations-service | spliceOne = require('internal/util').spliceOne;
smarthome-relations-service | spliceOne(list, position);
smarthome-relations-service | }
smarthome-relations-service |
smarthome-relations-service | if (list.length === 1)
smarthome-relations-service | events[type] = list[0];
smarthome-relations-service |
smarthome-relations-service | if (events.removeListener !== undefined)
smarthome-relations-service | this.emit('removeListener', type, originalListener || listener);
smarthome-relations-service | }
smarthome-relations-service |
smarthome-relations-service | return this;
smarthome-relations-service | }, removeAllListeners=function removeAllListeners(type) {
smarthome-relations-service | var listeners, events, i;
smarthome-relations-service |
smarthome-relations-service | events = this._events;
smarthome-relations-service | if (events === undefined)
smarthome-relations-service | return this;
smarthome-relations-service |
smarthome-relations-service | // not listening for removeListener, no need to emit
smarthome-relations-service | if (events.removeListener === undefined) {
smarthome-relations-service | if (arguments.length === 0) {
smarthome-relations-service | this._events = Object.create(null);
smarthome-relations-service | this._eventsCount = 0;
smarthome-relations-service | } else if (events[type] !== undefined) {
smarthome-relations-service | if (--this._eventsCount === 0)
smarthome-relations-service | this._events = Object.create(null);
smarthome-relations-service | else
smarthome-relations-service | delete events[type];
smarthome-relations-service | }
smarthome-relations-service | return this;
smarthome-relations-service | }
smarthome-relations-service |
smarthome-relations-service | // emit removeListener for all listeners on all events
smarthome-relations-service | if (arguments.length === 0) {
smarthome-relations-service | var keys = Object.keys(events);
smarthome-relations-service | var key;
smarthome-relations-service | for (i = 0; i < keys.length; ++i) {
smarthome-relations-service | key = keys[i];
smarthome-relations-service | if (key === 'removeListener') continue;
smarthome-relations-service | this.removeAllListeners(key);
smarthome-relations-service | }
smarthome-relations-service | this.removeAllListeners('removeListener');
smarthome-relations-service | this._events = Object.create(null);
smarthome-relations-service | this._eventsCount = 0;
smarthome-relations-service | return this;
smarthome-relations-service | }
smarthome-relations-service |
smarthome-relations-service | listeners = events[type];
smarthome-relations-service |
smarthome-relations-service | if (typeof listeners === 'function') {
smarthome-relations-service | this.removeListener(type, listeners);
smarthome-relations-service | } else if (listeners !== undefined) {
smarthome-relations-service | // LIFO order
smarthome-relations-service | for (i = listeners.length - 1; i >= 0; i--) {
smarthome-relations-service | this.removeListener(type, listeners[i]);
smarthome-relations-service | }
smarthome-relations-service | }
smarthome-relations-service |
smarthome-relations-service | return this;
smarthome-relations-service | }, listeners=function listeners(type) {
smarthome-relations-service | const events = this._events;
smarthome-relations-service |
smarthome-relations-service | if (events === undefined)
smarthome-relations-service | return [];
smarthome-relations-service |
smarthome-relations-service | const evlistener = events[type];
smarthome-relations-service | if (evlistener === undefined)
smarthome-relations-service | return [];
smarthome-relations-service |
smarthome-relations-service | if (typeof evlistener === 'function')
smarthome-relations-service | return [evlistener.listener || evlistener];
smarthome-relations-service |
smarthome-relations-service | return unwrapListeners(evlistener);
smarthome-relations-service | }, listenerCount=function listenerCount(type) {
smarthome-relations-service | const events = this._events;
smarthome-relations-service |
smarthome-relations-service | if (events !== undefined) {
smarthome-relations-service | const evlistener = events[type];
smarthome-relations-service |
smarthome-relations-service | if (typeof evlistener === 'function') {
smarthome-relations-service | return 1;
smarthome-relations-service | } else if (evlistener !== undefined) {
smarthome-relations-service | return evlistener.length;
smarthome-relations-service | }
smarthome-relations-service | }
smarthome-relations-service |
smarthome-relations-service | return 0;
smarthome-relations-service | }, eventNames=function eventNames() {
smarthome-relations-service | return this._eventsCount > 0 ? Reflect.ownKeys(this._events) : [];
smarthome-relations-service | }, publish=publish(event, callback) {
smarthome-relations-service | debug('Registering publisher', event);
smarthome-relations-service |
smarthome-relations-service | if (!callback && typeof event === 'function') {
smarthome-relations-service | callback = event;
smarthome-relations-service | event = ALL_EVENTS;
smarthome-relations-service | }
smarthome-relations-service |
smarthome-relations-service | if (this._serviceEvents && event !== ALL_EVENTS && this._serviceEvents.indexOf(event) === -1) {
smarthome-relations-service | throw new Error('${event}' is not a valid service event);
smarthome-relations-service | }
smarthome-relations-service |
smarthome-relations-service | const publishers = this[PUBLISHERS];
smarthome-relations-service |
smarthome-relations-service | publishers[event] = callback;
smarthome-relations-service |
smarthome-relations-service | return this;
smarthome-relations-service | }, _eventsCount=4, app=function (req, res, next) {
smarthome-relations-service | app.handle(req, res, next);
smarthome-relations-service | }, _super=undefined, app=function (req, res, next) {
smarthome-relations-service | app.handle(req, res, next);
smarthome-relations-service | }, method=find, path=relations-getchilds,

System configuration

Module versions (especially the part that's not working):2.1.2

NodeJS version: 9.3.0

Operating System: docker node:9.3.0

Browser Version:

React Native Version:

Module Loader:

Please point to me where i miss when upgrade to feathersjs v3

Thank u verymuch

@daffl
Copy link
Member

daffl commented Mar 6, 2018

It is not easy to tell from the log what is happening. Can you share a minimal repository we can run to reproduce the issue?

@InnerPeace080
Copy link
Author

Thank u for your quick reply.

I found my problem. problem is i m not use a real database service for authenticate because i only want to extract info from jwt (not need to verify)

Thank u

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants