rvmey / TRIGGERcmd-Agent

Electron / Node.js based agent to run commands on computers via TRIGGERcmd.com
http://www.triggercmd.com
23 stars 9 forks source link

404 error on manjaro #5

Open fennectech opened 3 years ago

fennectech commented 3 years ago
[fennectech@jasper ~]$  node ./TRIGGERcmd-Agent/src/agent.js  --console
Run installdaemon.sh to install the triggercmdagent daemon so it runs during boot
Daemon install: false
Logging in with saved token.
Checking if the 5faf36798293770019881294 computer exists.
(node:122716) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:122716) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
This computer exists in your account.
Tokenfile: /home/fennectech/.TRIGGERcmdData/token.tkn
ComputerIDfile: /home/fennectech/.TRIGGERcmdData/computerid.cfg
Logging in with saved token to run foreground tasks.
Write backup completed.
 ====================================
 The socket was unable to connect.
 The server may be offline, or the
 socket may have failed authorization
 based on its origin or other factors.
 You may want to check the values of
 `sails.config.sockets.onlyAllowOrigins`
 or (more rarely) `sails.config.sockets.beforeConnect`
 in your app.
 More info: https://sailsjs.com/config/sockets
 For help: https://sailsjs.com/support

 Technical details:
 Error: websocket error
    at WS.onError (/home/fennectech/node_modules/engine.io-client/lib/transport.js:28:17)
    at WebSocket.ws.onerror (/home/fennectech/node_modules/engine.io-client/lib/transports/websocket.js:118:12)
    at WebSocket.onError (/home/fennectech/node_modules/ws/lib/event-target.js:128:16)
    at WebSocket.emit (node:events:327:20)
    at abortHandshake (/home/fennectech/node_modules/ws/lib/websocket.js:697:15)
    at ClientRequest.<anonymous> (/home/fennectech/node_modules/ws/lib/websocket.js:579:7)
    at ClientRequest.emit (node:events:327:20)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:652:27)
    at HTTPParser.parserOnHeadersComplete (node:_http_common:126:17)
    at TLSSocket.socketOnData (node:_http_client:518:22) {
  type: 'TransportError',
  description: ErrorEvent {
    target: WebSocket {
      _events: [Object: null prototype],
      _eventsCount: 4,
      _maxListeners: undefined,
      readyState: 2,
      protocol: '',
      _binaryType: 'nodebuffer',
      _closeFrameReceived: false,
      _closeFrameSent: false,
      _closeMessage: '',
      _closeTimer: null,
      _closeCode: 1006,
      _extensions: {},
      _receiver: null,
      _sender: null,
      _socket: null,
      _bufferedAmount: 0,
      _isServer: false,
      _redirects: 0,
      url: 'wss://www.triggercmd.com/engine.io/?EIO=4&transport=websocket',
      _req: [ClientRequest],
      [Symbol(kCapture)]: false
    },
    type: 'error',
    message: 'Unexpected server response: 404',
    error: Error: Unexpected server response: 404
        at ClientRequest.<anonymous> (/home/fennectech/node_modules/ws/lib/websocket.js:579:7)
        at ClientRequest.emit (node:events:327:20)
        at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:652:27)
        at HTTPParser.parserOnHeadersComplete (node:_http_common:126:17)
        at TLSSocket.socketOnData (node:_http_client:518:22)
        at TLSSocket.emit (node:events:327:20)
        at addChunk (node:internal/streams/readable:304:12)
        at readableAddChunk (node:internal/streams/readable:279:9)
        at TLSSocket.Readable.push (node:internal/streams/readable:218:10)
        at TLSWrap.onStreamRead (node:internal/stream_base_commons:192:23)
  }
}
 ====================================
Initiated command removals
Initiated command adds

Heres the results of my run Always 404

What are the things needed for npm install?

fennectech commented 3 years ago

regedit and node-windows cause problems with standard npm install with node-linux and removal of regedit it seems to be processing.

fennectech commented 3 years ago

after sorting that ive got this, Im still unable to find my triggers on the site. If I can get this working ill gladly subscribe when funding allows

[fennectech@jasper ~]$  node ./TRIGGERcmd-Agent/src/agent.js  --console
Run installdaemon.sh to install the triggercmdagent daemon so it runs during boot
Daemon install: false
Logging in with saved token.
Checking if the 5faf36798293770019881294 computer exists.
(node:124011) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:124011) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
This computer exists in your account.
Tokenfile: /home/fennectech/.TRIGGERcmdData/token.tkn
ComputerIDfile: /home/fennectech/.TRIGGERcmdData/computerid.cfg
Logging in with saved token to run foreground tasks.
Write backup completed.

  |>    Now connected to https://www.triggercmd.com.
\___/   For help, see: http://bit.ly/2q0QDpf
        (using sails.io.js node SDK @v1.2.1)
         Connected at: Fri Nov 13 2020 19:59:56 GMT-0600 (Central Standard Time)

{ message: 'Subscribed to 5faf36798293770019881294!' }
{ message: 'Subscribed to 5faf36798293770019881294!' }
Initiated command removals
Initiated command adds
rvmey commented 3 years ago

Hello @fennectech , it looks like you're running the agent in foreground mode but you don't have any foreground commands in your ~/.TRIGGERcmdData/commands.json file. You could switch them to ground = foreground, or install the background service.

We should continue this on the forum at: https://www.triggercmd.com/forum

mayroncachina commented 3 years ago

@fennectech see the link https://www.triggercmd.com/forum/topic/557/trigger-cmd-on-arch-linux/19, i hope help you...