Skip to content

[cli] panic: interface conversion: float64 not int8 in GetFileType when exporting Locker filesΒ #9288

@addy2k

Description

@addy2k

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

  1. ente account add β†’ choose app type: locker
  2. Login with email + passkey
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions