CLI Import error

Hey all. I'm trying to do a batch import via CLI on a fresh 1.80 install and I'm getting the below error message. Any idea how to resolve? I completed a CLI import 48 hrs ago on 1.79 just fine.
9 Replies
Sergeant Harrelson
Sergeant HarrelsonOP•2y ago
Error asset: {
file: '/import/iCloud Photos Part 12 of 24/Photos/IMG_1973.MOV',
reason: Error: error request aborted
at createError (/usr/src/app/node_modules/axios/lib/core/createError.js:16:15)
at IncomingMessage.handlerStreamAborted (/usr/src/app/node_modules/axios/lib/adapters/http.js:301:18)
at IncomingMessage.emit (node:events:527:28)
at IncomingMessage._destroy (node:_http_incoming:179:10)
at _destroy (node:internal/streams/destroy:102:25)
at IncomingMessage.destroy (node:internal/streams/destroy:64:5)
at Socket.socketCloseListener (node:_http_client:414:11)
at Socket.emit (node:events:539:35)
at TCP.<anonymous> (node:net:709:12) {
config: {
transitional: [Object],
adapter: [Function: httpAdapter],
transformRequest: [Array],
transformResponse: [Array],
timeout: 0,
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: Infinity,
maxBodyLength: Infinity,
validateStatus: [Function: validateStatus],
headers: [Object],
method: 'post',
maxRedirects: 0,
url: 'http://192.168.6.18:2283/api/asset/upload',
data: [FormData]
},

Error asset: {
file: '/import/iCloud Photos Part 12 of 24/Photos/IMG_1973.MOV',
reason: Error: error request aborted
at createError (/usr/src/app/node_modules/axios/lib/core/createError.js:16:15)
at IncomingMessage.handlerStreamAborted (/usr/src/app/node_modules/axios/lib/adapters/http.js:301:18)
at IncomingMessage.emit (node:events:527:28)
at IncomingMessage._destroy (node:_http_incoming:179:10)
at _destroy (node:internal/streams/destroy:102:25)
at IncomingMessage.destroy (node:internal/streams/destroy:64:5)
at Socket.socketCloseListener (node:_http_client:414:11)
at Socket.emit (node:events:539:35)
at TCP.<anonymous> (node:net:709:12) {
config: {
transitional: [Object],
adapter: [Function: httpAdapter],
transformRequest: [Array],
transformResponse: [Array],
timeout: 0,
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: Infinity,
maxBodyLength: Infinity,
validateStatus: [Function: validateStatus],
headers: [Object],
method: 'post',
maxRedirects: 0,
url: 'http://192.168.6.18:2283/api/asset/upload',
data: [FormData]
},

code: 'ERR_REQUEST_ABORTED',
request: ClientRequest {
_events: [Object: null prototype],
_eventsCount: 3,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
destroyed: true,
_last: true,
chunkedEncoding: true,
shouldKeepAlive: false,
maxRequestsOnConnectionReached: false,
_defaultKeepAlive: true,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
_contentLength: null,
_hasBody: true,
_trailer: '',
finished: false,
_headerSent: true,
_closed: true,
socket: [Socket],
_header: 'POST /api/asset/upload HTTP/1.1\r\n' +
'Accept: application/json, text/plain, */*\r\n' +
'Content-Type: multipart/form-data; boundary=--------------------------769369786436795581757790\r\n' +
'x-api-key: MYAPIKEY\r\n' +
'User-Agent: axios/0.26.0\r\n' +
'Host: 192.168.6.18:2283\r\n' +
'Connection: close\r\n' +
'Transfer-Encoding: chunked\r\n' +
'\r\n',
_keepAliveTimeout: 0,
_onPendingData: [Function: nop],
agent: [Agent],
socketPath: undefined,
method: 'POST',
maxHeaderSize: undefined,
insecureHTTPParser: undefined,
path: '/api/asset/upload',
_ended: false,
res: [IncomingMessage],
aborted: false,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
reusedSocket: false,
host: '192.168.6.18',
protocol: 'http:',
[Symbol(kCapture)]: false,
[Symbol(kNeedDrain)]: false,
[Symbol(corked)]: 0,
[Symbol(kOutHeaders)]: [Object: null prototype]
},
response: undefined,
isAxiosError: true,
toJSON: [Function: toJSON]
},
response: undefined
}
code: 'ERR_REQUEST_ABORTED',
request: ClientRequest {
_events: [Object: null prototype],
_eventsCount: 3,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
destroyed: true,
_last: true,
chunkedEncoding: true,
shouldKeepAlive: false,
maxRequestsOnConnectionReached: false,
_defaultKeepAlive: true,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
_contentLength: null,
_hasBody: true,
_trailer: '',
finished: false,
_headerSent: true,
_closed: true,
socket: [Socket],
_header: 'POST /api/asset/upload HTTP/1.1\r\n' +
'Accept: application/json, text/plain, */*\r\n' +
'Content-Type: multipart/form-data; boundary=--------------------------769369786436795581757790\r\n' +
'x-api-key: MYAPIKEY\r\n' +
'User-Agent: axios/0.26.0\r\n' +
'Host: 192.168.6.18:2283\r\n' +
'Connection: close\r\n' +
'Transfer-Encoding: chunked\r\n' +
'\r\n',
_keepAliveTimeout: 0,
_onPendingData: [Function: nop],
agent: [Agent],
socketPath: undefined,
method: 'POST',
maxHeaderSize: undefined,
insecureHTTPParser: undefined,
path: '/api/asset/upload',
_ended: false,
res: [IncomingMessage],
aborted: false,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
reusedSocket: false,
host: '192.168.6.18',
protocol: 'http:',
[Symbol(kCapture)]: false,
[Symbol(kNeedDrain)]: false,
[Symbol(corked)]: 0,
[Symbol(kOutHeaders)]: [Object: null prototype]
},
response: undefined,
isAxiosError: true,
toJSON: [Function: toJSON]
},
response: undefined
}
Alex Tran
Alex Tran•2y ago
Hello, which command did you use? regardless you should use the new library feature instead, the read-only feature will be deprecated in the near future
Sergeant Harrelson
Sergeant HarrelsonOP•2y ago
Hey Alex, I used:
cd /DIRECTORY/WITH/IMAGES
docker run -it --rm -v "$(pwd):/import" ghcr.io/immich-app/immich-cli:latest upload --recursive --key HFEJ38DNSDUEG --server http://192.168.1.216:2283/api
cd /DIRECTORY/WITH/IMAGES
docker run -it --rm -v "$(pwd):/import" ghcr.io/immich-app/immich-cli:latest upload --recursive --key HFEJ38DNSDUEG --server http://192.168.1.216:2283/api
adapting the directory, key and IP Would it be better to use libraries instead of the bulk importing into Immich? I'm just learning about this feature now
Alex Tran
Alex Tran•2y ago
Ah you are using the upload feature, not really import
Sergeant Harrelson
Sergeant HarrelsonOP•2y ago
My apologies!
Alex Tran
Alex Tran•2y ago
let me checkout this bug
Sergeant Harrelson
Sergeant HarrelsonOP•2y ago
In the meantime, I've done a clean install and I'm trying this command instead
docker run --network immich_default -it --rm -v "$(pwd):/import" ghcr.io/immich-app/immich-cli:latest upload --recursive --key HFEJ38DNSDUEG --server http://immich-server:3001
docker run --network immich_default -it --rm -v "$(pwd):/import" ghcr.io/immich-app/immich-cli:latest upload --recursive --key HFEJ38DNSDUEG --server http://immich-server:3001
I'll report back if anything changes @Alex It seemed to have worked with the above command. However, I think the culprit is a custom docker network I created when I initially tried it. Using all the default settings and default network, it worked fine 🙂
Alex Tran
Alex Tran•2y ago
hmm interesting 🤔 thank you for reporting back
Sergeant Harrelson
Sergeant HarrelsonOP•2y ago
No probs

Did you find this page helpful?