abmaonline/aemfed

Error when starting up aemfed

jdavenport-vervio opened this issue · 1 comments

Hello, I'm getting this error when I start up aemfed on my project. If I make a change it will just crash and won't update on my AEM instance.

16:15$ npx aemfed -t "<http://admin:admin@localhost:4502>" -w "overlays/src/main/content/jcr_root/"
---------------------------------------
Working dirs: [
  'xxxx/overlays/src/main/content/jcr_root'
]
Targets: <http://admin:admin@localhost:4502>
Proxy port: 3000
Interval: 100
Exclude: 
---------------------------------------
Something missing or not working as expected, open an issue on GitHub: https://github.com/abmaonline/aemfed/issues
---------------------------------------
Scanning: xxxx/overlays/src/main/content/jcr_root ...
Awaiting changes ...
---------------------------------------
[localhost:4502>] [ERROR] Something went wrong: RequestError: Error: Invalid URI "%3Chttp://admin:admin@localhost:4502%3E/system/console/bundles/org.apache.sling.tracer.json"
    at new RequestError (/home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/request-promise-core/lib/errors.js:14:15)
    at Request.plumbing.callback (/home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/request-promise-core/lib/plumbing.js:87:29)
    at Request.RP$callback [as _callback] (/home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/request-promise-core/lib/plumbing.js:46:31)
    at self.callback (/home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/request/request.js:185:22)
    at Request.emit (node:events:527:28)
    at Request.init (/home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/request/request.js:273:17)
    at Request.RP$initInterceptor [as init] (/home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/request-promise-core/configure/request2.js:45:29)
    ... 2 lines matching cause stack trace ...
    at setSlingTracerBundleInfo (/home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/aemfed/lib/bs-wrapper.js:372:44) {
  cause: Error: Invalid URI "%3Chttp://admin:admin@localhost:4502%3E/system/console/bundles/org.apache.sling.tracer.json"
      at Request.init (/home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/request/request.js:273:31)
      at Request.RP$initInterceptor [as init] (/home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/request-promise-core/configure/request2.js:45:29)
      at new Request (/home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/request/request.js:127:8)
      at Object.request [as default] (/home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/request/index.js:53:10)
      at setSlingTracerBundleInfo (/home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/aemfed/lib/bs-wrapper.js:372:44)
      at /home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/aemfed/lib/bs-wrapper.js:447:28
      at Array.forEach (<anonymous>)
      at Object.create (/home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/aemfed/lib/bs-wrapper.js:445:11)
      at Object.init (/home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/aemfed/lib/index.js:130:15)
      at Object.<anonymous> (/home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/aemfed/bin/aemfed.js:3:8),
  error: Error: Invalid URI "%3Chttp://admin:admin@localhost:4502%3E/system/console/bundles/org.apache.sling.tracer.json"
      at Request.init (/home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/request/request.js:273:31)
      at Request.RP$initInterceptor [as init] (/home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/request-promise-core/configure/request2.js:45:29)
      at new Request (/home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/request/request.js:127:8)
      at Object.request [as default] (/home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/request/index.js:53:10)
      at setSlingTracerBundleInfo (/home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/aemfed/lib/bs-wrapper.js:372:44)
      at /home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/aemfed/lib/bs-wrapper.js:447:28
      at Array.forEach (<anonymous>)
      at Object.create (/home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/aemfed/lib/bs-wrapper.js:445:11)
      at Object.init (/home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/aemfed/lib/index.js:130:15)
      at Object.<anonymous> (/home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/aemfed/bin/aemfed.js:3:8),
  options: {
    json: true,
    uri: '<http://admin:admin@localhost:4502>/system/console/bundles/org.apache.sling.tracer.json',
    callback: [Function: RP$callback],
    transform: undefined,
    simple: true,
    resolveWithFullResponse: false,
    transform2xxOnly: false
  },
  response: undefined
}
Get state for all instances: 13 ms

Init rejected: RequestError: Error: Invalid URI "%3Chttp://admin:admin@localhost:4502%3E/libs/granite/ui/content/dumplibs.html"
Read file tree: 11 ms

When making a crash I get this crash error:

ADD jcr_root/apps/cq/core/content/nav
node:buffer:323
  throw new ERR_INVALID_ARG_TYPE(
  ^

TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received null
    at new NodeError (node:internal/errors:372:5)
    at Function.from (node:buffer:323:9)
    at Sender.sendFormToTarget (/home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/aemsync/src/sender.js:28:25)
    at Sender.send (/home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/aemsync/src/sender.js:22:12)
    at /home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/aemsync/src/pipeline.js:93:21
    at WriteStream.<anonymous> (/home/jdavenport/.npm/_npx/a01ebbdf20dbeebb/node_modules/aemsync/src/zip.js:100:7)
    at WriteStream.emit (node:events:527:28)
    at emitCloseNT (node:internal/streams/destroy:145:10)
    at processTicksAndRejections (node:internal/process/task_queues:82:21) {
  code: 'ERR_INVALID_ARG_TYPE'
}

Node.js v17.7.1

I am using Node.js v17.7.1.

Thanks, Jack

The issue was the angle brackets in the URL in my command. Please disregard.