status-im / status-mobile

a free (libre) open source, mobile OS for Ethereum
https://status.app
Mozilla Public License 2.0
3.89k stars 984 forks source link

Schema error, profile picture customization color is `nil` right after device synced #20385

Open yqrashawn opened 3 months ago

yqrashawn commented 3 months ago

Might be related to https://github.com/status-im/status-mobile/issues/17193

 LOG  -- Schema error at quo.components.avatars.user-avatar.view/user-avatar-internal ----

Invalid function arguments:
  [{:full-name "zQ3...TLfiph",
    :online? nil,
    :profile-picture {:config {#}},
    :ring? true,
    :size :small,
    :status-indicator? true}]

Input Schema:
  [:catn [:props [:map [#] [#] [#] [#] [#] ...]]]

Errors:
  {:in [0 :profile-picture],
   :message "should be an integer",
   :path [:props :profile-picture 0 0 0 0 ...],
   :schema :int,
   :value {:config {:options {#, ...}, :type :initials}}}
  {:in [0 :profile-picture],
   :message "should be a string",
   :path [:props :profile-picture 0 0 0 0 ...],
   :schema :string,
   :value {:config {:options {#, ...}, :type :initials}}}
  {:in [0 :profile-picture :uri],
   :message "missing required key",
   :path [:props :profile-picture 0 0 0 0 ...],
   :schema [:map [:uri [#]]],
   :type :malli.core/missing-key,
   :value nil}
  {:in [0
        :profile-picture
        :config
        :options
        :customization-color],
   :message "should be either :primary, :blue, :yellow, :purple, :turquoise, :magenta, :sky, :orange, :army, :flamingo, :camel or :copper",
   :path [:props :profile-picture 0 0 1 :config ...],
   :schema [:enum
            :primary
            :blue
            :yellow
            :purple
            :turquoise
            ...],
   :value nil}

------------------------------------------------------------
 LOG  -- Schema Error --------------------------------------------

Invalid function arguments:
  [{:options {:customization-color nil,
              :font-file "/private/var/containers/Bundle/Application/78073E9F-8781-43DD-BAA8-55D5ADF071B8/StatusIm.app/Inter-Medium.otf",
              :key-uid "0x102f234349953bacaf35c71ee030f123a3cd4637d6b8626baf0341958caed213",
              :override-ring? nil,
              :port 62479,
              :ratio 3,
              ...},
    :type :initials}
   {:color "rgba(255,255,255,0.7)",
    :font-size 13,
    :full-name "zQ3...TLfiph",
    :indicator-border 2,
    :indicator-center-to-edge 4,
    :indicator-color "#A1ABBD",
    ...}]

Function Var:
  utils.image-server/get-image-uri

Input Schema:
  [:cat
   :schema.quo/image-uri-config
   :schema.quo/profile-picture-options]

Errors:
  {:in [0 :options :customization-color],
   :message "should be either :primary, :blue, :yellow, :purple, :turquoise, :magenta, :sky, :orange, :army, :flamingo, :camel or :copper",
   :path [0 :initials :options :customization-color],
   :schema [:enum
            :primary
            :blue
            :yellow
            :purple
            :turquoise
            ...],
   :value nil}

------------------------------------------------------------
churik commented 2 months ago

I suppose you can't see it in the real device, right?

yqrashawn commented 2 months ago

I suppose you can't see it in the real device, right?

Yes, the check is only done in debug build