Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Got panic: time: missing Location in call to Time.In with release Windows_x86_64_0.3.1 #30

Closed
Deses opened this issue Oct 10, 2023 · 19 comments

Comments

@Deses
Copy link

Deses commented Oct 10, 2023

Got this error using this command:

immich-go -server=http://192.168.1.130:9210 -key=APIKEY -log-level=INFO upload -google-photos takeout-20230922T153302Z-001.zip 1> immich-go.log 2>&1

immich-go  0.3.1, commit 47283c359f32a4e52e95542382ceea2aa6eca494, built at 2023-10-10T15:23:30Z
Server status: OK
Connected, user: xxxxxxxx@gmail.com
Get server's assets. 0 received
Browsing google take out archive... Done.
0 media scanned, 0 uploaded.
Done.
panic: time: missing Location in call to Time.In

goroutine 9 [running]:
time.Time.In(...)
	/usr/local/go/src/time/time.go:1146
immich-go/assets/gp.googTimeObject.Time({0xc001765730?})
	/home/jfcassan/Dev/immich-go/assets/gp/json.go:65 +0x9b
immich-go/assets/gp.(*Takeout).copyGoogleMDToAsset(0xc00002a750?, 0xc0016f0000, 0x25?)
	/home/jfcassan/Dev/immich-go/assets/gp/googlephotos.go:207 +0xb1
immich-go/assets/gp.(*Takeout).checkJSONs(0xc00002a750, {0xc0016d45e6, 0x17}, {0xc0023fd510, 0x1, 0x0?})
	/home/jfcassan/Dev/immich-go/assets/gp/googlephotos.go:155 +0x1c5
immich-go/assets/gp.(*Takeout).Browse.func1()
	/home/jfcassan/Dev/immich-go/assets/gp/googlephotos.go:123 +0x231
created by immich-go/assets/gp.(*Takeout).Browse in goroutine 1
	/home/jfcassan/Dev/immich-go/assets/gp/googlephotos.go:109 +0xb6
@simulot
Copy link
Owner

simulot commented Oct 10, 2023

On a mac?
Have you a file named /etc/timezone on your system? What's its content?

@Deses
Copy link
Author

Deses commented Oct 10, 2023

On Windows. I said it on the title. 😝

@simulot
Copy link
Owner

simulot commented Oct 10, 2023

Sorry...
Give me some time to spin up a windows VM

@Turge08
Copy link

Turge08 commented Oct 10, 2023

Same here:

.\immich-go.exe -log-level=INFO -server=http://10.0.105.152:8080 -key=<APIKEY> upload -create-albums -google-photos takeout-*.zip
immich-go  0.3.2, commit 8d36fff067d39347be9e01706c4b4b78a36d8245, built at 2023-10-10T20:29:36Z
Server status: OK
Connected, user: xxxxxxxx@gmail.com
Get server's assets... 0 received
Browsing google take out archive...Done.
0 media scanned, 0 uploaded.
Done.
panic: time: missing Location in call to Time.In

goroutine 13 [running]:
time.Time.In(...)
        /usr/local/go/src/time/time.go:1146
immich-go/assets/gp.googTimeObject.Time({0xc0025f0980?})
        /home/jfcassan/Dev/immich-go/assets/gp/json.go:65 +0x9b
immich-go/assets/gp.(*Takeout).copyGoogleMDToAsset(0xc0001933e0?, 0xc0045680e0, 0x25?)
        /home/jfcassan/Dev/immich-go/assets/gp/googlephotos.go:207 +0xb1
immich-go/assets/gp.(*Takeout).checkJSONs(0xc0001933e0, {0xc0020931a6, 0xc}, {0xc002139010, 0x1, 0x0?})
        /home/jfcassan/Dev/immich-go/assets/gp/googlephotos.go:155 +0x1c5
immich-go/assets/gp.(*Takeout).Browse.func1()
        /home/jfcassan/Dev/immich-go/assets/gp/googlephotos.go:123 +0x231
created by immich-go/assets/gp.(*Takeout).Browse in goroutine 1
        /home/jfcassan/Dev/immich-go/assets/gp/googlephotos.go:109 +0xb6

EDIT: Works on my Unraid server which works out better since the upload is much quicker.

@Deses
Copy link
Author

Deses commented Oct 11, 2023

Yup, can confirm that 0.3.2 still doesn't work.

immich-go  0.3.2, commit 8d36fff067d39347be9e01706c4b4b78a36d8245, built at 2023-10-10T20:29:36Z
Server status: OK
Connected, user: xxxxx@gmail.com
Get server's assets... 0 received
Browsing google take out archive...Done.
panic: time: missing Location in call to Time.In

goroutine 51 [running]:
time.Time.In(...)
	/usr/local/go/src/time/time.go:1146
immich-go/assets/gp.googTimeObject.Time({0xc001f7d520?})
	/home/jfcassan/Dev/immich-go/assets/gp/json.go:65 +0x9b
immich-go/assets/gp.(*Takeout).copyGoogleMDToAsset(0xc0001920c0?, 0xc001278000, 0x1c?)
	/home/jfcassan/Dev/immich-go/assets/gp/googlephotos.go:207 +0xb1
immich-go/assets/gp.(*Takeout).checkJSONs(0xc0001920c0, {0xc00203b65d, 0x1e}, {0xc0020441b0, 0x1, 0x0?})
	/home/jfcassan/Dev/immich-go/assets/gp/googlephotos.go:155 +0x1c5
immich-go/assets/gp.(*Takeout).Browse.func1()
	/home/jfcassan/Dev/immich-go/assets/gp/googlephotos.go:123 +0x231
created by immich-go/assets/gp.(*Takeout).Browse in goroutine 1
	/home/jfcassan/Dev/immich-go/assets/gp/googlephotos.go:109 +0xb6

Please @simulot, can you reopen this issue?


@Turge08 how do you run it in Unraid? User scripts plugin?

@simulot simulot reopened this Oct 11, 2023
@simulot
Copy link
Owner

simulot commented Oct 11, 2023

Get server's assets...GetAllAssets, GET, http://192.168.10.17:2283/api/asset, 200 OK
unknown time zone Europe/Paris

But works when running in the debugger 🤔

@Turge08
Copy link

Turge08 commented Oct 11, 2023

@Deses I copied the Linux binary along with the takeout files to one of the unraid shares, opened a shell through the unraid dashboard, added execute permission to the binary (chmod +x) then executed the same command line as on the Windows box

@simulot
Copy link
Owner

simulot commented Oct 11, 2023

fixed.
👀

@simulot simulot closed this as completed Oct 11, 2023
@Deses
Copy link
Author

Deses commented Oct 11, 2023

Paris is saved!

@Deses
Copy link
Author

Deses commented Oct 11, 2023

You are going to hate me (and Windows), but:

immich-go  0.3.3, commit 4a2a9a039c828f73f9fa053b019cd25b876f371e, built at 2023-10-11T17:11:35Z
Server status: OK
...

goroutine 51 [running]:
time.Time.In(...)
	/usr/local/go/src/time/time.go:1146
immich-go/assets/gp.googTimeObject.Time({0xc002480790?})
	/home/jfcassan/Dev/immich-go/assets/gp/json.go:65 +0x9b
immich-go/assets/gp.(*Takeout).copyGoogleMDToAsset(0xc00002c750?, 0xc001426000, 0x25?)
	/home/jfcassan/Dev/immich-go/assets/gp/googlephotos.go:207 +0xb1
immich-go/assets/gp.(*Takeout).checkJSONs(0xc00002c750, {0xc001ae5ae6, 0x17}, {0xc0021a0ac0, 0x1, 0x0?})
	/home/jfcassan/Dev/immich-go/assets/gp/googlephotos.go:155 +0x1c5
immich-go/assets/gp.(*Takeout).Browse.func1()
	/home/jfcassan/Dev/immich-go/assets/gp/googlephotos.go:123 +0x231
created by immich-go/assets/gp.(*Takeout).Browse in goroutine 1
	/home/jfcassan/Dev/immich-go/assets/gp/googlephotos.go:109 +0xb6

My timezone according to tzutil /g (cmd)

tzutil /g
Romance Standard Time

And with Powershell's Get-TimeZone

Id                         : Romance Standard Time
DisplayName                : (UTC+01:00) Bruselas, Copenhague, Madrid, París
StandardName               : Hora estándar romance
DaylightName               : Hora de verano romance
BaseUtcOffset              : 01:00:00
SupportsDaylightSavingTime : True

image

Is there anything I can do to assist you?

@simulot
Copy link
Owner

simulot commented Oct 11, 2023

You are going to hate me (and Windows), but:

Not you, but Microsoft. Who at MS took the stupide decision to name the time zone Romance Standard Time...?

@simulot simulot reopened this Oct 11, 2023
@Nuuki9
Copy link

Nuuki9 commented Oct 11, 2023

Similar issue for me, though I'm on standard GMT

immich-go  0.3.3, commit 4a2a9a039c828f73f9fa053b019cd25b876f371e, built at 2023-10-11T17:11:35Z
Server status: OK
Connected, user: richard@mines.uk
Get server's assets...GetAllAssets, GET, http://192.168.1.10:8084/api/asset, 200 OK
unknown time zone Europe/London

tzutil /g

GMT Standard Time

Powershell:

Id                         : GMT Standard Time
DisplayName                : (UTC+00:00) Dublin, Edinburgh, Lisbon, London
StandardName               : GMT Standard Time
DaylightName               : GMT Summer Time
BaseUtcOffset              : 00:00:00
SupportsDaylightSavingTime : True

@simulot
Copy link
Owner

simulot commented Oct 11, 2023

May be this time is the good one 👀
Note for the future: merge the fix before releasing the version

@Deses
Copy link
Author

Deses commented Oct 11, 2023

Maybe!

I was about to comment the whole list of Windows Timezones but you were faster!

Anyway: https://pastebin.com/ymFS1aH4

@Deses
Copy link
Author

Deses commented Oct 11, 2023

It's working!!!!

@simulot
Copy link
Owner

simulot commented Oct 11, 2023

The difficulty is when go-immich is compiled on windows targeting windows, the time zone is correctly handled.
But when the program is compiled on linux, targeting windows, the program detect the windows TZ: the infamous Romance Time Zone, infers correctly the Europe/Paris, but the last one is unknown...

The trick was to embed the linux TZ definition files in the exe file... This works, only if this change is merged to the main branch before releasing it... Shame on me for that one.

@Deses
Copy link
Author

Deses commented Oct 12, 2023

I ran the upload process to my dad's 45 gb takeout and I'm positive it was pretty much flawless. It created all the albums and all the albums had a matching number of files.
Except one album that was missing one picture and it wasn't even present in the takeout to begin with.

With that I learned that the takeout file Google generates is not 100% reliable. I shudder when I think what kind of hellish file structure they have to miss some files.

@Deses
Copy link
Author

Deses commented Oct 12, 2023

In the logs, I removed all the lines that contain This a new asset, upload it. and uploaded�[39m using Notepad++.

�[37mIMG-20220911-WA0009.jpg: This a new asset, upload it.�[39m
�[32mUploading "Takeout/Google Fotos/Photos from 2022/IMG-20220911-WA0009.jpg"...�[32mDone, total 8 uploaded�[39m

And all I had left were a bunch (31) of lines like these:
�[37m20160306_165137_HDR.jpg: An asset with the same name:"20160306_165137_HDR" and date:"2016-03-06 16:51:36" but with smaller size:2.5 MB exists on the server. Replace it.�[39m

That are duplicate files, one in a Photos from 20XX folder and the other in al album folder.

I've checked them and for the pictures they are fine, but I found an edge case:

One of the videos is one of those variable slowmo videos that are play at normal speed, then slomo for an user defined period and then back to normal. And the duplicated one is a full slowmo video.
This means that the app keeps only the biggest, full slowmo video.

What I'm going to do is manually upload them by dragging them to Immich's WebUI, but I wanted to let you know.

@simulot
Copy link
Owner

simulot commented Oct 12, 2023

I ran the upload process to my dad's 45 gb takeout and I'm positive it was pretty much flawless. It created all the albums and all the albums had a matching number of files.

The project is now battle field proven... Thank you for this extensive test. I'm glad this went well.

One of the videos is one of those variable slowmo videos that are play at normal speed, then slomo for an user defined period and then back to normal. And the duplicated one is a full slowmo video.
This means that the app keeps only the biggest, full slowmo video.

Even if you have found a workaround, it deserve opening a new issue with all details to help me to reproduce the problem, and maybe fixing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants