simulot / immich-go

An alternative to the immich-CLI command that doesn't depend on nodejs installation. It tries its best for importing google photos takeout archives.
GNU Affero General Public License v3.0
1.91k stars 55 forks source link

"ERROR: 308 Permanent Redirect" on GetAllAssets step #527

Closed ArnoBen closed 2 weeks ago

ArnoBen commented 3 weeks ago

Greetings,

I'm trying to upload a 27GB google photos takeout with the following command:

./immich-go \
    -server=myserver \
    -key=mykey \
    -api-trace \
    upload \
    -google-photos \
    -log-level=ERROR \
    ~/immich-go/takeout-*.zip

Unfortunately, this leads to the following error:

ERROR | GetAllAssets, POST, http://myserver/api/search/metadata, 308 Permanent Redirect

Here's the command output:

immich-go  0.22.1, commit 35982819550c81ab615424cc10dd710d455e9952, built at 2024-10-15T19:49:03Z
. _ _  _ _ . _|_     _  _ 
|| | || | ||(_| | ─ (_|(_)
            v 0.22.1 _)   

Input analysis:
---------------
scanned image file                      :    4758
scanned video file                      :     491
scanned sidecar file                    :    4893
discarded file                          :       3
unsupported file                        :       0
file duplicated in the input            :       0
associated metadata file                :       0
missing associated metadata file        :       0

Uploading:
----------
uploaded                                :       0
upload error                            :       0
file not selected                       :       0
server's asset upgraded with the input  :       0
server has same asset                   :       0
server has a better asset               :       0

Check the log file: ~/immich-go/logs.txt
Check the trace file:  ~/immich-go/logs.trace.log
GetAllAssets, POST, http://myserver/api/search/metadata, 308 Permanent Redirect

I'm running immich-go 0.22.1 on MacOS, and my server is running v1.119.1.

Any idea on how to solve this would be appreciated.

simulot commented 3 weeks ago

That what the server replies. I suspect a problem with the network configuration. Check the proxy settings. you can get a detailed log of server calls with the flag -api-trace

EDIT: what the api trace log shows?

ArnoBen commented 2 weeks ago

Turns out I simply needed to use https instead of http 🫠 Also I missed that immich provides an nginx config so that's a nice addition to my setup, merci @simulot pour le repo !

simulot commented 2 weeks ago

Merci, Maybe, I can do something with 308 code. I haven't check how Immich-go behave in that case