Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When I use seneca-entity in a service the service crashes #47

Open
danielang opened this issue Jun 28, 2017 · 0 comments
Open

When I use seneca-entity in a service the service crashes #47

danielang opened this issue Jun 28, 2017 · 0 comments

Comments

@danielang
Copy link

The error occurse in line 232 seneca-mem-store\mem-store.js.

Here is the stacktrace:

Seneca Fatal Error
==================

Message: seneca: Action name:mem-store,plugin:define,role:seneca,seq:3,tag:undefined failed: Cannot read property 'init' of undefined.

Code: act_execute

Details: { message: 'Cannot read property \'init\' of undefined',
  pattern: 'name:mem-store,plugin:define,role:seneca,seq:3,tag:undefined',
  fn: [Function: plugin_definition],
  cb: [Function: noop],
  instance: 'Seneca/8sn5crtedhv7/1498644551958/1896/3.3.0/depot',
  'orig$': 
   TypeError: Cannot read property 'init' of undefined
       at Seneca.mem-store (D:\DanielL\Documents\Repositories\pa2\source\node_modules\seneca-mem-store\mem-store.js:232:26)
       at define_plugin (D:\DanielL\Documents\Repositories\pa2\source\node_modules\seneca\lib\plugins.js:316:26)
       at Seneca.plugin_definition (D:\DanielL\Documents\Repositories\pa2\source\node_modules\seneca\lib\plugins.js:90:16)
       at execute_action (D:\DanielL\Documents\Repositories\pa2\source\node_modules\seneca\seneca.js:1077:20)
       at Object.act_fn [as fn] (D:\DanielL\Documents\Repositories\pa2\source\node_modules\seneca\seneca.js:1027:11)
       at processor (D:\DanielL\Documents\Repositories\pa2\source\node_modules\gate-executor\gate-executor.js:136:14)
       at Immediate.<anonymous> (D:\DanielL\Documents\Repositories\pa2\source\node_modules\gate-executor\gate-executor.js:240:7)
       at runCallback (timers.js:672:20)
       at tryOnImmediate (timers.js:645:5)
       at processImmediate [as _immediateCallback] (timers.js:617:5),
  'message$': 'Cannot read property \'init\' of undefined',
  plugin: {} }

Stack: 
    at Seneca.mem-store (D:\DanielL\Documents\Repositories\pa2\source\node_modules\seneca-mem-store\mem-store.js:232:26)
    at define_plugin (D:\DanielL\Documents\Repositories\pa2\source\node_modules\seneca\lib\plugins.js:316:26)
    at Seneca.plugin_definition (D:\DanielL\Documents\Repositories\pa2\source\node_modules\seneca\lib\plugins.js:90:16)
    at execute_action (D:\DanielL\Documents\Repositories\pa2\source\node_modules\seneca\seneca.js:1077:20)
    at Object.act_fn [as fn] (D:\DanielL\Documents\Repositories\pa2\source\node_modules\seneca\seneca.js:1027:11)
    at processor (D:\DanielL\Documents\Repositories\pa2\source\node_modules\gate-executor\gate-executor.js:136:14)
    at Immediate.<anonymous> (D:\DanielL\Documents\Repositories\pa2\source\node_modules\gate-executor\gate-executor.js:240:7)
    at runCallback (timers.js:672:20)
    at tryOnImmediate (timers.js:645:5)
    at processImmediate [as _immediateCallback] (timers.js:617:5)

Instance: Seneca/8sn5crtedhv7/1498644551958/1896/3.3.0/depot
  ALL ERRORS FATAL: action called with argument fatal$:true (probably a plugin init error, or using a plugin seneca instance)
    at Seneca.handle_result (D:\DanielL\Documents\Repositories\pa2\source\node_modules\seneca\seneca.js:1120:27)

When: 2017-06-28T10:09:12.469Z

Log: {kind:null,plugin:seneca,tag:3.3.0,id:8sn5crtedhv7/1498644551958/1896/3.3.0/depot,code:act_execute,notice:senec

Node:
  { http_parser: '2.7.0', node: '6.10.3', v8: '5.1.281.101', uv: '1.9.1', zlib: '1.2.11', ares: '1.10.1-DEV', icu: '58.2', modules: '48', openssl: '1.0.2k' },
  { debug: false, uv: true, ipv6: true, tls_npn: true, tls_alpn: true, tls_sni: true, tls_ocsp: true, tls: true },
  [ 'Binding contextify', 'Binding natives', 'NativeModule events', 'NativeModule util', 'Binding uv', 'NativeModule buffer', 'Binding buffer', 'Binding util', 'NativeModule internal/util', 'NativeModule timers', 'Binding timer_wrap', 'NativeModule internal/linkedlist', 'NativeModule assert', 'NativeModule internal/process', 'Binding config', 'NativeModule internal/process/warning', 'NativeModule internal/process/next_tick', 'NativeModule internal/process/promises', 'NativeModule internal/process/stdio', 'Binding constants', 'NativeModule path', 'NativeModule module', 'NativeModule internal/module', 'NativeModule vm', 'NativeModule fs', 'Binding fs', 'NativeModule stream', 'NativeModule internal/streams/legacy', 'NativeModule _stream_readable', 'NativeModule internal/streams/BufferList', 'NativeModule _stream_writable', 'NativeModule _stream_duplex', 'NativeModule _stream_transform', 'NativeModule _stream_passthrough', 'Binding fs_event_wrap', 'NativeModule crypto', 'Binding crypto', 'NativeModule internal/streams/lazy_transform', 'NativeModule string_decoder', 'NativeModule net', 'NativeModule internal/net', 'Binding cares_wrap', 'Binding tty_wrap', 'Binding tcp_wrap', 'Binding pipe_wrap', 'Binding stream_wrap', 'NativeModule http', 'NativeModule _http_incoming', 'NativeModule _http_common', 'Binding http_parser', 'NativeModule internal/freelist', 'NativeModule _http_outgoing', 'NativeModule _http_server', 'NativeModule _http_agent', 'NativeModule _http_client', 'NativeModule url', 'Binding icu', 'NativeModule querystring', 'NativeModule https', 'NativeModule tls', 'NativeModule _tls_common', 'NativeModule _tls_wrap', 'NativeModule _stream_wrap', 'Binding js_stream', 'Binding tls_wrap', 'NativeModule _tls_legacy', 'NativeModule os', 'Binding os', 'NativeModule zlib', 'Binding zlib', 'NativeModule dns', 'NativeModule tty', 'NativeModule dgram', 'Binding udp_wrap', 'NativeModule console', 'NativeModule cluster', 'NativeModule child_process', 'Binding spawn_sync', 'NativeModule internal/child_process', 'Binding process_wrap', 'NativeModule internal/socket_list', 'NativeModule internal/cluster' ]

Process: 
  pid=1896, arch=x64, platform=win32,
  path=C:\Program Files\nodejs\node.exe,
  argv=[ 'C:\\Program Files\\nodejs\\node.exe',  'D:\\DanielL\\Documents\\Repositories\\pa2\\source\\services\\depot\\depot-service.js' ],
  env={ ALLUSERSPROFILE: 'C:\\ProgramData',  ANDROID_HOME: 'D:\\ProgramFiles\\Android\\SDK',  ANDROID_SDK_ROOT: 'D:\\ProgramFiles\\Android\\SDK',  APPDATA: 'C:\\Users\\DanielL\\AppData\\Roaming',  BASES: '127.0.0.1:1337,127.0.0.1:1338',  CommonProgramFiles: 'C:\\Program Files\\Common Files',  'CommonProgramFiles(x86)': 'C:\\Program Files (x86)\\Common Files',  CommonProgramW6432: 'C:\\Program Files\\Common Files',  COMPUTERNAME: 'P-5502',  ComSpec: 'C:\\WINDOWS\\system32\\cmd.exe',  C_EM64T_REDIST11: 'C:\\Program Files (x86)\\Common Files\\Intel\\Shared Files\\cpp\\',  DEBUG_COLORS: 'true',  DEBUG_FD: '1',  ELECTRON_NO_ATTACH_CONSOLE: 'true',  FORCE_COLOR: 'true',  FPS_BROWSER_APP_PROFILE_STRING: 'Internet Explorer',  FPS_BROWSER_USER_PROFILE_STRING: 'Default',  GYP_MSVS_VERSION: '2015',  HOMEDRIVE: 'C:',  HOMEPATH: '\\Users\\DanielL',  HOST: '127.0.0.1',  JAVA_HOME: 'C:\\Program Files\\Java\\jdk1.8.0_101',  LOCALAPPDATA: 'C:\\Users\\DanielL\\AppData\\Local',  LOGONSERVER: '\\\\HB-SUPPORT02',  MOCHA_COLORS: '1',  NUMBER_OF_PROCESSORS: '8',  OneDrive: 'D:\\Users\\DanielL\\OneDrive - Ortec B.V',  OS: 'Windows_NT',  Path: 'C:\\Users\\DanielL\\.windows-build-tools\\python27\\;C:\\Users\\DanielL\\.windows-build-tools\\python27\\Scripts;C:\\Program Files\\Docker\\Docker\\Resources\\bin;C:\\Program Files (x86)\\Common Files\\Intel\\Shared Files\\cpp\\bin\\Intel64;C:\\ProgramData\\Oracle\\Java\\javapath;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\MySQL\\MySQL Fabric 1.5 & MySQL Utilities 1.5\\;C:\\Program Files (x86)\\MySQL\\MySQL Fabric 1.5 & MySQL Utilities 1.5\\Doctrine extensions for PHP\\;C:\\Users\\DanielL\\AppData\\Roaming\\wamp\\3-0-6\\bin\\php\\php5.6.25;C:\\ProgramData\\ComposerSetup\\bin;C:\\Program Files (x86)\\Brackets\\command;C:\\Program Files\\Microsoft SQL Server\\130\\Tools\\Binn\\;C:\\Program Files (x86)\\Vagrant\\bin;C:\\Program Files (x86)\\Skype\\Phone\\;D:\\Program Files (x86)\\LyX\\Perl\\bin;C:\\Program Files\\nodejs\\;C:\\Program Files\\Git\\cmd;C:\\Users\\DanielL\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\DanielL\\AppData\\Local\\.meteor\\;C:\\Program Files\\Java\\jdk1.8.0_101\\bin;D:\\Users\\DanielL\\Documents\\PATH\\vertx\\bin;D:\\Users\\DanielL\\Documents\\PATH\\apache-maven-3.3.9\\bin;C:\\Users\\DanielL\\AppData\\Roaming\\Composer\\vendor\\bin;D:\\Users\\DanielL\\Documents\\Repositories\\rp\\bin;C:\\Program Files\\MongoDB\\Server\\3.4\\bin;C:\\Program Files (x86)\\Graphviz2.38\\bin;D:\\ProgramFiles\\Android\\SDK\\platform-tools;D:\\ProgramFiles\\Android\\SDK\\tools;D:\\Users\\DanielL\\Documents\\PATH\\openssl;D:\\Program Files\\texlive\\bin\\win32;C:\\Users\\DanielL\\AppData\\Roaming\\npm;C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\bin;',  PATHEXT: '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC',  PORT: '0',  PROCESSOR_ARCHITECTURE: 'AMD64',  PROCESSOR_IDENTIFIER: 'Intel64 Family 6 Model 58 Stepping 9, GenuineIntel',  PROCESSOR_LEVEL: '6',  PROCESSOR_REVISION: '3a09',  ProgramData: 'C:\\ProgramData',  ProgramFiles: 'C:\\Program Files',  'ProgramFiles(x86)': 'C:\\Program Files (x86)',  ProgramW6432: 'C:\\Program Files',  PSModulePath: 'C:\\Program Files\\WindowsPowerShell\\Modules;C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\Modules',  PUBLIC: 'C:\\Users\\Public',  SESSIONNAME: 'Console',  SILENT: 'true',  SystemDrive: 'C:',  SystemRoot: 'C:\\WINDOWS',  TAG: 'depot',  TEMP: 'C:\\Users\\DanielL\\AppData\\Local\\Temp',  TMP: 'C:\\Users\\DanielL\\AppData\\Local\\Temp',  UATDATA: 'C:\\WINDOWS\\CCM\\UATData\\D9F8C395-CAB8-491d-B8AC-179A1FE1BE77',  USERDNSDOMAIN: 'ORTEC.INTRANET',  USERDOMAIN: 'ORTECADS',  USERDOMAIN_ROAMINGPROFILE: 'ORTECADS',  USERNAME: 'DanielL',  USERPROFILE: 'C:\\Users\\DanielL',  VBOX_MSI_INSTALL_PATH: 'C:\\Program Files\\Oracle\\VirtualBox\\',  VS110COMNTOOLS: 'C:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\Common7\\Tools\\',  VS120COMNTOOLS: 'C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\Common7\\Tools\\',  VS140COMNTOOLS: 'D:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\Tools\\',  windir: 'C:\\WINDOWS' }




SENECA TERMINATED at 2017-06-28T10:09:13.433Z. See above for error report.

My packages form package.json:

"dependencies": {
    "chairo": "^3.0.0",
    "hapi": "^16.4.3",
    "inert": "^4.2.0",
    "rif": "^0.3.0",
    "seneca": "^3.3.0",
    "seneca-balance-client": "^0.6.1",
    "seneca-basic": "^0.5.1",
    "seneca-entity": "^2.0.2",
    "seneca-mesh": "^0.10.0",
    "wo": "^0.8.0"
}

Service init:

server.seneca
    .use('basic')
    .use('entity')
    .use('depot')
    .use('mesh',{
        host: host,
        bases: BASES,
        sneeze: {
            silent: JSON.parse(SILENT),
            swim: {
                interval: 1111
            },
        }
    });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant