-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
Bug Description
ente export crashes with a panic when trying to export files from Ente Locker via CLI.
The CLI successfully connects to the account, finds all albums, and starts downloading the file β but panics at the GetFileType function due to a type mismatch: JSON returns numeric values as float64, but the code expects int8.
Steps to Reproduce
ente account addβ choose app type:locker- Login with email + passkey
- Run
ente export
Error Output
panic: interface conversion: interface {} is float64, not int8
goroutine 1 [running]:
github.com/ente-io/cli/pkg/model.(*RemoteFile).GetFileType(...)
github.com/ente-io/cli/pkg/model/remote.go:87 +0xf4
github.com/ente-io/cli/pkg/model.(*RemoteFile).IsLivePhoto(...)
github.com/ente-io/cli/pkg/model/remote.go:91
Environment
- OS: macOS (Apple Silicon)
- CLI version: installed via
brew install ente-cli - App type: locker
- File type in Locker: JPG image
Expected Behavior
File is downloaded and saved to export directory.
Actual Behavior
CLI panics at GetFileType β type assertion fails because JSON deserializes file type as float64, not int8.
Possible Fix
In remote.go:87, use a safe type assertion or json.Number / explicit cast from float64 to the expected integer type.