Warning
Archived - please use the new CLI instead
CLI utilities to help with some operations with the Immich app
You can find instructions for using the CLI in the official Immich documentation.
CLI utilities for Immich to help with upload images and videos from a location on a desktop machine or a server to the Immich's server
License: MIT License
Warning
Archived - please use the new CLI instead
CLI utilities to help with some operations with the Immich app
You can find instructions for using the CLI in the official Immich documentation.
after an error
/bin/sh: line 1: hostname: command not found
it starts upload
[1] Pinging server...
Server status: OK
[2] Logging in...
Login status: OK
You are logged in as [email protected]
[3] Checking directory...
Directory status: OK
[4] Indexing files...
Indexing file: OK
Found 150 assets in specified directory
[5] Gathering device's asset info from server...
A total of 150 assets will be uploaded to the server
Do you want to start upload now? (y/n) y
Start uploading...
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 0% | ETA: 0s | 0/150```
throws some errors
Error uploading asset Error: No duration found!
but the percentage increasess
unfortunately it stops in the middle of "uploading" with
████████████████████░░░░░░░░░░░░░░░░░░░░ 49% | ETA: 102s | 74/150
Error uploading asset Error: Request failed with status code 504
cpu load was constantly at 98-100% during the proccess
i would be happy to provide any source of logs etc
eta is not acurate : it was more like 10 minutes
also count (75/150) is not acurate 125 photos actually imported
It would be nice if there was an option, for example --delete
that would delete all uploaded files locally.
So you have a better overview.
Hi! When I use this tool to upload a folder with a lot of videos (~2-4GB each), the node process will start hogging memory and be killed by the OOM killer after some time. I'm unfortunately not sure what is causing this, maybe you know more.
Hello, can someone tell me what is causing this error? I have been uploading photos without any problem and since the last update it gives me this error in all files:
file: '/import/CAM00395.jpg',
reason: Error: Request failed with status code 400
at createError (/usr/src/app/node_modules/axios/lib/core/createError.js:16:15)
at settle (/usr/src/app/node_modules/axios/lib/core/settle.js:17:12)
at IncomingMessage.handleStreamEnd (/usr/src/app/node_modules/axios/lib/adapters/http.js:322:11)
at IncomingMessage.emit (node:events:539:35)
at endReadableNT (node:internal/streams/readable:1345:12) at processTicksAndRejections (node:internal/process/task_queues:83:21) { config: [Object],
request: [ClientRequest],
response: [Object],
isAxiosError: true,
toJSON: [Function: toJSON]
},
response: { statusCode: 400, message: [Array], error: 'Bad Request' } # #
Thanks !!
Suppose I don't have a GPU on my server and want to move a big library of photos to immich.
To encode and tag all images will take a lot of time, with the server at 100% cpu.
Suppose I have a somewhat powerful PC with a GPU on my computer, what I would like is to have an option to allow computing most of the stuff locally before upload.
This would split the computational needs in a big bulk upload.
This would also allow users with a "gaming" pc to easily move all their photos to immich.
Also related to: immich-app/immich#2368
How would one upload to an oauth account? Is it even supported?
while uploading several folder got errors because of gif files present in some of the folders.
Album was not completely populated, so re-run the immich cli without the gif it has uploaded the missing pictures but not updated the album with the one already uploaded.
Can a check be implemented in order that if a picture is already uploaded but not in a album will be put in the album?
additionally can you just skip not supported formats?
trying to upload the attached image (and other got this error)
please make ti possibile to set for picture without specific exif info or date the picture take as date the creation date of the file
},
{
file: '/import/2004 Smau ILP/20041107_150558.jpg',
reason: RangeError: Invalid time value
at Date.toISOString (<anonymous>)
at /usr/src/app/bin/index.js:271:55
at Generator.next (<anonymous>)
at fulfilled (/usr/src/app/bin/index.js:29:58),
response: undefined
},
{
file: '/import/2004 Smau ILP/20041107_150620.jpg',
reason: RangeError: Invalid time value
at Date.toISOString (<anonymous>)
at /usr/src/app/bin/index.js:271:55
at Generator.next (<anonymous>)
at fulfilled (/usr/src/app/bin/index.js:29:58),
response: undefined
},
{
file: '/import/2004 Smau ILP/20041107_150632.jpg',
reason: RangeError: Invalid time value
at Date.toISOString (<anonymous>)
at /usr/src/app/bin/index.js:271:55
at Generator.next (<anonymous>)
at fulfilled (/usr/src/app/bin/index.js:29:58),
response: undefined
},
{
file: '/import/2004 Smau ILP/20041107_150634.jpg',
reason: RangeError: Invalid time value
at Date.toISOString (<anonymous>)
at /usr/src/app/bin/index.js:271:55
at Generator.next (<anonymous>)
at fulfilled (/usr/src/app/bin/index.js:29:58),
response: undefined
},
{
file: '/import/2014/04/20200913_194348.jpg',
reason: [Error: Unknown file format],
response: undefined
}
]
I've exported my photos for Google Photos using Google Takeout, in Google Photos I had photos in multiple albums, something which Immich also supports. However, the CLI tool doesn't move the photos into all of the albums, it's currently only moving it into one (I think the last one it was seen in? Or the first?).
Given folder structure:
Takeout/
- Album 1/
- - Photo 1.jpg
- - Photo 2.jpg
- Album 2/
- - Photo 1.jpg
Note: Photo 1.jpg in both Album 1 and Album 2 are identical
Using the following command to import:
immich upload --email <email> --password <password> --server http://<server>/api -d Takeout/ --album
The result is:
Album 1
- Photo 2
Album 2
- Photo 1
The expected result:
Album 1
- Photo 1
- Photo 2
Album 2
- Photo 1
Side note: It would be great if it would put the photos in the correct album(s) without having to re-upload all of them.
Is it possible to upload file and overwrite if they already exist in the server?
Start uploading...
████████████████████░░░░░░░░░░░░░░░░░░░░ 50% | ETA: 236s | 2/4
Failed to upload 2 files [
{
file: '/import/Camera/IMG_123.jpg',
reason: TypeError: Cannot read properties of undefined (reading 'getUint16')
at Object.getUint16 (/usr/src/app/node_modules/exifr/dist/full.umd.js:1:4382)
at ce.setup (/usr/src/app/node_modules/exifr/dist/full.umd.js:1:12190)
at ce.parse (/usr/src/app/node_modules/exifr/dist/full.umd.js:1:12428)
at Object.fe [as parse] (/usr/src/app/node_modules/exifr/dist/full.umd.js:1:13335),
response: undefined
},
{
file: '/import/Camera/IMG_456.jpg',
reason: TypeError: Cannot read properties of undefined (reading 'getUint16')
at Object.getUint16 (/usr/src/app/node_modules/exifr/dist/full.umd.js:1:4382)
at ce.setup (/usr/src/app/node_modules/exifr/dist/full.umd.js:1:12190)
at ce.parse (/usr/src/app/node_modules/exifr/dist/full.umd.js:1:12428)
at Object.fe [as parse] (/usr/src/app/node_modules/exifr/dist/full.umd.js:1:13335),
response: undefined
}
]
When I try to upload CR2 Photos I get Bad request 400 error after uploading..
CR2 is a format from DSLR I guess.. We need to first convert it into JPG or something so that the engine can process it further...
I know this may seem kind of niche but I wanted to share my experience anyway. I have the server up and running and everything is working fine. I also have the app on my iPhone, which automatically uploads my images.
I have been using the cli docker image to upload my large back log of images from previous years. In doing so I noticed that all images that were downloaded using the signal app then transfered to the server wont upload. They all say unknown file format in the error log. The odd thing about this is, the iPhone app will upload them just fine. It shows the date they were taken and the the display properly as jpg images.
I don't know what could be the cause of this right now but I thought I would share. I am testing multiple picture management services at the same time so I also use PhotoSync on the iPhone to transfer them to my server as well as upload inside the Immich app.
I found when using CLI to upload large video files it fails. Tried a few video files with 700mb, 1gb.
{
file: '/import/2017-12-20 14.09.19.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: [Object],
code: 'ERR_REQUEST_ABORTED',
request: [ClientRequest],
response: undefined,
isAxiosError: true,
toJSON: [Function: toJSON]
},
response: undefined
}
no problem uploading same large files through web interface
Server version: v1.50.1
CLI version: latest (using docker)
I upload a large MP4 file (~4GB) and it fails with the following error:
Upload Progress | ████████████████████████████████████████ | 100% || 1/1 || Current file [/import/GH010391.MP4]
Failed to upload 1 files [
{
file: '/import/GH010391.MP4',
reason: Error: Request failed with status code 413
at createError (/usr/src/app/node_modules/axios/lib/core/createError.js:16:15)
at settle (/usr/src/app/node_modules/axios/lib/core/settle.js:17:12)
at IncomingMessage.handleStreamEnd (/usr/src/app/node_modules/axios/lib/adapters/http.js:322:11)
at IncomingMessage.emit (node:events:539:35)
at endReadableNT (node:internal/streams/readable:1345:12)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
config: [Object],
request: [ClientRequest],
response: [Object],
isAxiosError: true,
toJSON: [Function: toJSON]
},
response: '<html>\r\n' +
'<head><title>413 Request Entity Too Large</title></head>\r\n' +
'<body>\r\n' +
'<center><h1>413 Request Entity Too Large</h1></center>\r\n' +
'<hr><center>openresty</center>\r\n' +
'</body>\r\n' +
'</html>\r\n'
}
]
If I try with a smaller file, it works. Any ide on why this happens?
Thanks!
here is the error i got:
[1] Pinging server...
Server status: OK
[2] Logging in...
Login status: OK
You are logged in as [email protected]
[3] Checking directory...
Directory status: OK
[4] Indexing files...
Indexing file: OK
Found 92 assets in specified directory
[5] Gathering device's asset info from server...
A total of 1 assets will be uploaded to the server
Start uploading...
████████████████████████████████████████ 100% | ETA: 0s | 1/1
Creating albums...
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 0% | ETA: 0s | 0/1Error adding asset to album Error: Requ0
at createError (/usr/src/app/node_modules/axios/lib/core/createError.js:16:15)
at settle (/usr/src/app/node_modules/axios/lib/core/settle.js:17:12)
at IncomingMessage.handleStreamEnd (/usr/src/app/node_modules/axios/lib/adapters/http.js:322:11)
at IncomingMessage.emit (node:events:539:35)
at endReadableNT (node:internal/streams/readable:1345:12)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
config: {
transitional: {
silentJSONParsing: true,
forcedJSONParsing: true,
clarifyTimeoutError: false
},
adapter: [Function: httpAdapter],
transformRequest: [ [Function: transformRequest] ],
transformResponse: [ [Function: transformResponse] ],
timeout: 0,
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
maxBodyLength: -1,
validateStatus: [Function: validateStatus],
headers: {
Accept: 'application/json, text/plain, */*',
'Content-Type': 'application/json',
Authorization: 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxNmU0NmMyNi1lNmQ4L,
'User-Agent': 'axios/0.26.0',
'Content-Length': 53
},
method: 'put',
url: 'http://192.168.1.112:2283/api/album/b29aae9a-4abc-4289-af8b-e2721abbd053/assets',
data: '{"assetIds":["cedba368-fd1a-4b3f-8644-b78c8ddb3320"]}'
},
request: <ref *1> ClientRequest {
_events: [Object: null prototype] {
abort: [Function (anonymous)],
aborted: [Function (anonymous)],
connect: [Function (anonymous)],
error: [Function (anonymous)],
socket: [Function (anonymous)],
timeout: [Function (anonymous)],
prefinish: [Function: requestOnPrefinish]
},
_eventsCount: 7,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
destroyed: false,
_last: true,
chunkedEncoding: false,
shouldKeepAlive: false,
maxRequestsOnConnectionReached: false,
_defaultKeepAlive: true,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
_contentLength: null,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
_closed: false,
socket: Socket {
connecting: false,
_hadError: false,
_parent: null,
_host: null,
_readableState: [ReadableState],
_events: [Object: null prototype],
_eventsCount: 7,
_maxListeners: undefined,
_writableState: [WritableState],
allowHalfOpen: false,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: null,
_server: null,
parser: null,
_httpMessage: [Circular *1],
[Symbol(async_id_symbol)]: 298,
[Symbol(kHandle)]: [TCP],
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBuffer)]: null,
[Symbol(kBufferCb)]: null,
[Symbol(kBufferGen)]: null,
[Symbol(kCapture)]: false,
[Symbol(kSetNoDelay)]: false,
[Symbol(kSetKeepAlive)]: true,
[Symbol(kSetKeepAliveInitialDelay)]: 60,
[Symbol(kBytesRead)]: 0,
[Symbol(kBytesWritten)]: 0,
[Symbol(RequestTimeout)]: undefined
},
_header: 'PUT /api/album/b29aae9a-4abc-4289-af8b-e2721abbd053/assets HTTP/1.1\r\n' +
'Accept: application/json, text/plain, */*\r\n' +
'Content-Type: application/json\r\n' +
'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxNmU0NmMyNi1lNmQ4L+
'User-Agent: axios/0.26.0\r\n' +
'Content-Length: 53\r\n' +
'Host: 192.168.1.112:2283\r\n' +
'Connection: close\r\n' +
'\r\n',
_keepAliveTimeout: 0,
_onPendingData: [Function: nop],
agent: Agent {
_events: [Object: null prototype],
_eventsCount: 2,
_maxListeners: undefined,
defaultPort: 80,
protocol: 'http:',
options: [Object: null prototype],
requests: [Object: null prototype] {},
sockets: [Object: null prototype],
freeSockets: [Object: null prototype] {},
keepAliveMsecs: 1000,
keepAlive: false,
maxSockets: Infinity,
maxFreeSockets: 256,
scheduling: 'lifo',
maxTotalSockets: Infinity,
totalSocketCount: 1,
[Symbol(kCapture)]: false
},
socketPath: undefined,
method: 'PUT',
maxHeaderSize: undefined,
insecureHTTPParser: undefined,
path: '/api/album/b29aae9a-4abc-4289-af8b-e2721abbd053/assets',
_ended: true,
res: IncomingMessage {
_readableState: [ReadableState],
_events: [Object: null prototype],
_eventsCount: 4,
_maxListeners: undefined,
socket: [Socket],
httpVersionMajor: 1,
httpVersionMinor: 1,
httpVersion: '1.1',
complete: true,
rawHeaders: [Array],
rawTrailers: [],
aborted: false,
upgrade: false,
url: '',
method: null,
statusCode: 500,
statusMessage: 'Internal Server Error',
client: [Socket],
_consuming: false,
_dumped: false,
req: [Circular *1],
responseUrl: 'http://192.168.1.112:2283/api/album/b29aae9a-4abc-4289-af8b-e2721abbd053/assets,
redirects: [],
[Symbol(kCapture)]: false,
[Symbol(kHeaders)]: [Object],
[Symbol(kHeadersCount)]: 14,
[Symbol(kTrailers)]: null,
[Symbol(kTrailersCount)]: 0,
[Symbol(RequestTimeout)]: undefined
},
aborted: false,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
reusedSocket: false,
host: '192.168.1.112',
protocol: 'http:',
_redirectable: Writable {
_writableState: [WritableState],
_events: [Object: null prototype],
_eventsCount: 3,
_maxListeners: undefined,
_options: [Object],
_ended: true,
_ending: true,
_redirectCount: 0,
_redirects: [],
_requestBodyLength: 53,
_requestBodyBuffers: [],
_onNativeResponse: [Function (anonymous)],
_currentRequest: [Circular *1],
_currentUrl: 'http://192.168.1.112:2283/api/album/b29aae9a-4abc-4289-af8b-e2721abbd053/assets,
[Symbol(kCapture)]: false
},
[Symbol(kCapture)]: false,
[Symbol(kNeedDrain)]: false,
[Symbol(corked)]: 0,
[Symbol(kOutHeaders)]: [Object: null prototype] {
accept: [Array],
'content-type': [Array],
authorization: [Array],
'user-agent': [Array],
'content-length': [Array],
host: [Array]
}
},
response: {
status: 500,
statusText: 'Internal Server Error',
headers: {
server: 'nginx/1.23.1',
date: 'Mon, 26 Sep 2022 08:41:01 GMT',
'content-type': 'application/json; charset=utf-8',
'content-length': '52',
connection: 'close',
'x-powered-by': 'Express',
etag: 'W/"34-rlKccw1E+/fV8niQk4oFitDfPro"'
},
config: {
transitional: [Object],
adapter: [Function: httpAdapter],
transformRequest: [Array],
transformResponse: [Array],
timeout: 0,
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
maxBodyLength: -1,
validateStatus: [Function: validateStatus],
headers: [Object],
method: 'put',
url: 'http://192.168.1.112:2283/api/album/b29aae9a-4abc-4289-af8b-e2721abbd053/assets',
data: '{"assetIds":["cedba368-fd1a-4b3f-8644-b78c8ddb3320"]}'
},
request: <ref *1> ClientRequest {
_events: [Object: null prototype],
_eventsCount: 7,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
destroyed: false,
_last: true,
chunkedEncoding: false,
shouldKeepAlive: false,
maxRequestsOnConnectionReached: false,
_defaultKeepAlive: true,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
_contentLength: null,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
_closed: false,
socket: [Socket],
_header: 'PUT /api/album/b29aae9a-4abc-4289-af8b-e2721abbd053/assets HTTP/1.1\r\n' +
'Accept: application/json, text/plain, */*\r\n' +
'Content-Type: application/json\r\n' +
'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxNmU0NmMyNi1lNmQ+
'User-Agent: axios/0.26.0\r\n' +
'Content-Length: 53\r\n' +
'Host: 192.168.1.112:2283\r\n' +
'Connection: close\r\n' +
'\r\n',
_keepAliveTimeout: 0,
_onPendingData: [Function: nop],
agent: [Agent],
socketPath: undefined,
method: 'PUT',
maxHeaderSize: undefined,
insecureHTTPParser: undefined,
path: '/api/album/b29aae9a-4abc-4289-af8b-e2721abbd053/assets',
_ended: true,
res: [IncomingMessage],
aborted: false,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
reusedSocket: false,
host: '192.168.1.112',
protocol: 'http:',
_redirectable: [Writable],
[Symbol(kCapture)]: false,
[Symbol(kNeedDrain)]: false,
[Symbol(corked)]: 0,
[Symbol(kOutHeaders)]: [Object: null prototype]
},
data: { statusCode: 500, message: 'Internal server error' }
},
isAxiosError: true,
toJSON: [Function: toJSON]
}
████████████████████████████████████████ 100% | ETA: 0s | 1/1
Failed to upload 0 files []
The ffmpeg conversion kept failing as temp file could not be created.
Line 188 of index.js needs addition of trailing slash.
I added " + '/'" to my local copy and that works fine.
This is probably because the output library we're using sends a carriage return instead of a newline, or something like that. We should have a flag to change that behaviour.
Similar to photoprism, I'd love to be able to drop uploads in a specific watched folder. I'm running immich in a container on one of my servers, and I get images from all sorts of devices that don't necessarily run immich. I can then have a script that pushes these images from other servers to a folder that immich watches for upload.
Server
Hi,
I have Immich installed in Unraid via the Docker Compose Manager plugin and I'm now trying to use the CLI tools to import a few thousand photos inside 1 folder (I named it "files") and scattered among half a dozen subfolders (with different names).
I opened the console inside the Immich Server container (/usr/src/app) and installed from the NPM repository. I then updated to version 8.19.3 as suggested and ran the upload command.
Pinging the server went OK, Logging in went OK, but when checking the directory, I got this error:
Error navigating to directory - check directory path
I tried using multiple paths and copying the folder I wanted to upload to multiple locations, but I think I'm missing something here.
I first tried using unraid's folder path, of course that didnt't work. I then copied the "files" folder into the Upload Location folder and set the directory for upload as upload/files. Didn't work. Then I set the directory for upload as /usr/src/app/upload/files - didn't work.
Tried a number of things, details of which I can't remeber by now, but at this point I'm out of ideas. Any tips?
Thanks.
When trying to bulk upload some photos I'm getting some that won't go up. A mix of .gif
.webp
.jpg
. All with error
[Error: Unknown file format]
Which seems odd because other images of that filetype uploaded fine.
The images themselves open fine on my PC.
If you need access to one of the files then I can provide them.
Hey I have searched through the issues and haven't found anything regarding the issue I am having. I am using CLI to upload my pictures folder by folder after standing up a new container. Some pictures fail continually but are not corrupted when checking them locally. This is the output:
{
file: '/import/2019/Elias_birth/20190919_091331.jpg',
reason: Error: getaddrinfo EAI_AGAIN my.domain.com
at GetAdrInfoReqWrap.onlookup [as oncomplete] (node:dns:71:26) {
errno: -3001,
code: 'EAI_AGAIN',
syscall: 'getaddrinfo',
hostname: 'my.domain.com',
config: [Object],
request: [ClientRequest],
response: undefined,
isAxioError: true,
toJSON: [Function: toJSON]
},
response: undefined
}
To clarify, at the time of writing this bug report I was in a tmux session and couldnt for the life of me figure out how to copy text so I rewrote it for the issue.
This has happened to me in the past as well on a previous install. The first time I installed was using the recommended install, this time I am using Immich AIO.
For example, I will try to upload a specific folder like 2019/Elias_birth and it discovered 967 assets to upload and 4 failed. If I try to run it again it will try to reimport all 967 again with the same 4 failing. I can confirm that the remaining 963 did indeed upload even though it is trying to upload them again.
Please let me know if there is anything more I can do to help. This is happening across many folders in my backlog of 15 years of photos.
*Edit
I was initially running the command in the parent folder of 2019. I tried running it again with explicitly 2019/foldername and it completed without errors. I am trying to run it again with just the parent folder of 2019 to see if it throws errors again, will update when done.
Does the docker cli command run recursively inside a directory and sub directories? It will fail if I try to pass something like 2019/
I'm trying to specify 8 threads using the --threads option or -t, neither work and I get the following error.
Error: ENOENT: no such file or directory, access '8'
When using the recursive option, It will upload hidden folders as well.
Tried to upload about 7000 files, received about 30 errors.
Several .jpgs and .mp4 files failed to upload, the only thing in common on them was that all have whitespace and " " in the filename.
Can anyone reproduce this ?
reason: Error: Request failed with status code 500
at createError (/usr/local/lib/node_modules/immich/node_modules/axios/lib/core/createError.js:16:15)
at settle (/usr/local/lib/node_modules/immich/node_modules/axios/lib/core/settle.js:17:12)
at IncomingMessage.handleStreamEnd (/usr/local/lib/node_modules/immich/node_modules/axios/lib/adapters/http.js:322:11)
at IncomingMessage.emit (node:events:525:35)
at endReadableNT (node:internal/streams/readable:1358:12)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
config: [Object],
request: [ClientRequest],
response: [Object],
isAxiosError: true,
toJSON: [Function: toJSON]
I am using the cli with docker run -it --rm -v $(pwd):/import ghcr.io/immich-app/immich-cli:latest upload --email $USERNAME --password $PASSWORD --server https://.../api -d /import
. When I am trying to abort an upload, ctrl-c is not recognised.
When running the same CLI tool instance for exactly 2 hours (by uploading many files), the nginx proxy will forcefully terminate the connection. I guess there is some kind of internal auto-kill. Maybe the socket should be reconnected after a while to prevent this from happening.
Failed to upload 16 files [
{
file: '/mnt/m/images/missing/VID_20180321_110337.mp4',
reason: Error: Request failed with status code 504
at createError (/root/.local/share/npm-global/lib/node_modules/immich/node_modules/axios/lib/core/createError.js:16:15)
at settle (/root/.local/share/npm-global/lib/node_modules/immich/node_modules/axios/lib/core/settle.js:17:12)
at IncomingMessage.handleStreamEnd (/root/.local/share/npm-global/lib/node_modules/immich/node_modules/axios/lib/adapters/http.js:322:11)
at IncomingMessage.emit (node:events:525:35)
at endReadableNT (node:internal/streams/readable:1359:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
config: [Object],
request: [ClientRequest],
response: [Object],
isAxiosError: true,
toJSON: [Function: toJSON]
},
response: '<html>\r\n' +
'<head><title>504 Gateway Time-out</title></head>\r\n' +
'<body>\r\n' +
'<center><h1>504 Gateway Time-out</h1></center>\r\n' +
'<hr><center>nginx</center>\r\n' +
'</body>\r\n' +
'</html>\r\n'
},
# <-- [...] and 15 more
Hello,
I am trying to upload a directory with the immich CLI, but the CLI does not scan the directory correctly.
My directory has 7 files, but the tool calculates that it has to upload 28 files instead. On the server, I see that it uploaded each file four times with different prefixes:
Can somebody find the issue?
immich upload --email xxx --password xxx --server http://xxx:2283/api -al 'xxx' -d 'xxx'
[1] Pinging server...
Server status: OK
[2] Logging in...
Login status: OK
You are logged in as xxx
[3] Checking directory...
Directory status: OK
[4] Indexing files...
Indexing file: OK
Found 28 assets in specified directory
[5] Gathering device's asset info from server...
A total of 28 assets will be uploaded to the server
Do you want to start upload now? (y/n) y
Start uploading...
Upload Progress | ████████████████████████████████████████ | 100% || 28/28 || Current file [/data/photos/xxx]
Creating albums...
Failed to upload 0 files []
Would be great when using the CLI Tool, include some option to address the bulk upload to a specific Album (or create on the fly)..
Server
OS: Archlinux
Background information:
android-file-transfer
immich upload --key <apikey> --server http://192.168.2.x:2283/api --recursive Internal\ shared\ storage/
Result:
Server status: OK
Checking credentials...
Login status: OK
Successful authentication for user [email protected]
Indexing local assets...
node:fs:1619
handleErrorFromBinding(ctx);
^
Error: ENOENT: no such file or directory, stat '/home/dominik/Internal shared storage/Movie
https://user-images.githubusercontent.com/13904508/236698282-310b3c95-eefc-470c-840b-eb5a458119a9.mp4
s/Don_t need to work at McDonald_s if you invest in #DigiByte ������.mp4'
at Object.statSync (node:fs:1619:3)
at /usr/lib/node_modules/immich/bin/index.js:176:37
at Generator.next (<anonymous>)
at fulfilled (/usr/lib/node_modules/immich/bin/index.js:29:58)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
errno: -2,
syscall: 'stat',
code: 'ENOENT',
path: '/home/dominik/Internal shared storage/Movies/Don_t need to work at McDonald_s if you invest in #DigiByte ������.mp4'
}
Node.js v19.9.0
You also see the � that indicates corrupted characters. I have noto-fonts-emoji installed and emojis are normally completely visible on my system.
Interestingly those files also have that corrupted character when viewed through ls.
The file obviously has bad encoding in the filename that apparently no font can solve. the entire noto-fonts suite does not have a suitable font for this so does ttf-droid.
Maybe the program should add an option to just skip and log the broken files it found?
This would be far better than it just crashing.
This is what the filename should look like originally.
When adding multiple albums with some duplicate images it misses the files which are already on the server. this also wont add them to the album. a mechanism is needed to identify whats already on the server and also add it to the album
I updated to latest version, I get these error:
maltekiefer@MBP-von-Malte ~> yarn global add immich --force
yarn global v1.22.19
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
[4/4] 🔨 Rebuilding all packages...
success Installed "[email protected]" with binaries:
- immich
✨ Done in 3.20s.
maltekiefer@MBP-von-Malte ~> immich upload --email xxx --password xxx --server https://xxxxx/api -d /Users/xxx/Export/ --yes
file:///Users/xxxxx/.config/yarn/global/node_modules/immich/bin/index.js:13
import pjson from "../package.json" assert { type: "json" };
^^^^^^
SyntaxError: Unexpected identifier
at Loader.moduleStrategy (internal/modules/esm/translators.js:145:18)
at async link (internal/modules/esm/module_job.js:67:21)
I'm using the CLI to import video files to Immich, but I've noticed that if the file > 2 GB approx, the upload fails intermittently. Upon retrying multiple times, it may or may not go through.
$ docker run -it --rm -v "/mediafolder:/import" ghcr.io/immich-app/immich-cli:latest upload --key ABCDE123456 --server http://192.168.1.55:2283/api --yes --recursive --delete /import/videos
Checking connectivity with Immich instance...
Server status: OK
Checking credentials...
Login status: OK
Successful authentication for user [email protected]
Indexing local assets...
Indexing complete, found 144 local assets
Comparing local assets with those on the Immich instance...
A total of 144 assets will be uploaded to the server
Start uploading...
Upload Progress | ████████████████████████████████████████ | 100% || 144/144 || Current file [/import/videos/folder1/folder2/bigVideo.mp4]
Failed to upload 2 files [
{
file: '/import/videos/folder1/folder2/bigVideo.mp4',
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: [Object],
code: 'ERR_REQUEST_ABORTED',
request: [ClientRequest],
response: undefined,
isAxiosError: true,
toJSON: [Function: toJSON]
},
response: undefined
},
{
file: "/import/videos/folder1/folder2/bigVideo2.mp4",
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: [Object],
code: 'ERR_REQUEST_ABORTED',
request: [ClientRequest],
response: undefined,
isAxiosError: true,
toJSON: [Function: toJSON]
},
response: undefined
}
]
I'm not uploading via a reverse proxy. I've directly specified the server URL above. I've also tried uploading without running the CLI in docker, i.e., I installed immich-cli
via npm
. I see the same error.
I've noticed that if I reboot the machine running immich and retry, 2-3 GB uploads are more likely to succeed, though anything larger still fails with the same error as above.
anyway i could get logs for immich-cli ?
i uploaded a local folder with photos from 11/2017 and they are improperly shown as 01/2022 in the feed
photo metadata in the app shows correct data
thanks
I ran the CLI with this string:
sudo docker run --network immich_default -it --rm -v "$(pwd):/import" ghcr.io/immich-app/immich-cli:latest upload --delete --key <api-key> --server http://immich-server:3001
As far as I can tell, it worked incredibly well! The very last output it gave before it finished was: Failed to upload 0 files []
The weird part is that there were still 2 files remaining in the folder when I did ls
: an .svg photo and a .mkv video. In my case this is actually super inconsequential as they happen to be unimportant, but I just thought it was odd that the CLI would say it didn't fail to upload any files when there were 2 left in the directory after the fact. I'm guessing those formats aren't supported or something and so the CLI didn't even try to upload them and therefore it technically didn't fail top upload them... because it never tried.. but it'd be nice to print out a notice to warn the user that those files didn't make it to the server.
I am trying to do bulk upload using the CLI after upgrading to 1.43.0 but I am getting the error message "Error logging in - check api key". This was working in 1.42.65.0_dev. I have tried using a new key but even that does not help.
Hi
I am going to try bulk upload, i know previously it was email and password but now it uses api key, but iam not sure how to find it.
I tried going to admin user section but i dont see api key section.
here is the command i am using.
node bin/index.js upload --key (unknown)--server http://x.x.x.x:2283/api -d C:/Users/HOME/Videos/BULK/
CLI will not import RAF files.
Its a known issue
Seeking to get it fixed as i have a huge library of RAF that would be impractical to upload via webui
I have a folder with quite a lot Fotos and videos.
When I upload them through cli I receive a message, that all files where uploaded fine. After waiting for the jobs to be done I try the same folder again. From 6150 Assets the cli tools wants to reupload 798 assets again. After a successfull second run I startet the cli tool again. Now the cli Tools wants to reupload 762 assets again.
I'd expect, the cli tools just uploads everything on first try.
Hello there,
I just wasted 30 minutes on trying to figure out - how do i tell this thing to go in each of my google takeout folders and execute this command. I felt really close to a solution - where I accidently ran the command from the main folder - and voila - it is already recursing through the folders in the folder you start.
Please mention it somewhere in the documentation - and for peeps who do not like to have it suck up all images, maybe an option to not do it.
It would be really cool if I could give it a zip/tgz from google takeout and it would recreate the structure from google photots
Hello,
Trying to upload my exisint gimage.
Login OK but upload not working ...
I am running tools on window.
PS C:\Users\arnua> immich upload --email [email protected] --password ssss --server 192.168.1.18 --port 3000 -d D:\Photos
[1] Pinging server...
Server status: OK
[2] Logging in...
Login status: OK
You are logged in as [email protected]
[3] Checking directory...
Directory status: OK
[4] Indexing files...
Indexing file: OK
Found 209 assets in specified directory
[5] Gathering device's asset info from server...
A total of 209 assets will be uploaded to the server
Do you want to start upload now? (y/n) y
Start uploading...
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 0% | ETA: 0s | 0/209
Error uploading asset Error: Request failed with status code 400
Error uploading asset Error: No duration found!
Error uploading asset Error: No duration found!
Error uploading asset Error: Request failed with status code 400
Error uploading asset Error: Request failed with status code 400
I uploaded a few old photographs using this cli application.
The photos appears to upload successively, but do not appear in the mobile app at all.
test
Hello, I'm trying to run this utility on Rpi4 with ubuntu server 22.04.5. When installing immich I get a lot of dependency warnings "SKIPPING OPTIONAL DEPENDENCIES" and then when I run the command I get:
Error: Cannot find module 'fs/promises' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15) at Function.Module._load (internal/modules/cjs/loader.js:562:25) at Module.require (internal/modules/cjs/loader.js:692:17) at require (internal/modules/cjs/helpers.js:25:18) at Object.<anonymous> (/usr/local/lib/node_modules/immich/bin/index.js:48:20) at Module._compile (internal/modules/cjs/loader.js:778:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3)
I'm guessing this is a dependency issue and if I tried to run on amd64 it would run fine?
I'm uploading about 400 assets using the docker method and keep running into this error:
Error uploading asset [/import/20220815_065326_9A9FEC1A.mov]: Error: Request failed with status code 504
This happens for quite a few items. If I run it again, the errored assets seems to be less and less.
At the point now where I run the job and it tells me there are two assets to upload, and it seems to do so without error, however whenever I run the job, it says the same thing over and over.
As Immich supports NEF files, but right now there's no bulk upload...
I bulk exported from the Apple photos app "as originals" and then used the CLI to upload into my Immich Admin account. Alot of the images ended up with the wrong date and lots of photos are out of order.
I made another account and tested bulk backing up from the mobile app. It was much slower (wifi, downloading from iCloud, etc.) but everything uploaded correctly and is all organized appropriately with the right dates (I did have a bug where a few dozen photos were missing after the backup was complete but a reinstall of the app caught those and everything is great now. I can open an issue for that in another repo if desired).
Is there a way to bulk remove the photos that I added to the admin account? I can't "select all" or "shift click" in Immich to bulk delete. As expected, deleting from the file system just results in missing files but all the DB entries and thumbnails are still there (so I restored the files as to not cause issues). Are there a couple of commands I could use in one of the containers to drop all assets from a user and then manually delete all files? Or is there another already built way to do this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.