status-im / status-go

The Status module that consumes go-ethereum
https://status.im
Mozilla Public License 2.0
728 stars 246 forks source link

fix_:still return the image when handleAccountInitialsImpl is unable to get public key to generate color hash to generate ring #5409

Closed qfrank closed 2 months ago

qfrank commented 3 months ago

the relate mobile issue is caused by the error:

ERROR[06-24|04:04:49.124|github.com/status-im/status-go/server/handlers.go:494]   handleAccountInitialsImpl: no public key, can't draw ring 

There are 2 solutions for this:

  1. already implemented in this PR, we can return the image without the ring so that user won't see an blank, once user log in and log out, the issue will be fixed automatically. Because it will caculate the color hash and update it to the corresponding account on log in, we can only get public key(chat account key) after log in.
  2. create a script migration for 1.20.x (let's assume the patch version is 1.20.9), add a column named public_key to table accounts, once user log in, we can get the public key and update it to accounts. so when user upgrade to v2, the avatar can be display normally with ring before user log in. but this solution has limit: user may not upgrade to 1.20.9 and may upgrade to v2 directly. I believe we won't like this one.
status-im-auto commented 3 months ago

Jenkins Builds

Click to see older builds (18) | :grey_question: | Commit | :hash: | Finished (UTC) | Duration | Platform | Result | |-|-|-|-|-|-|-| | :heavy_check_mark: | 69635eb626c922be52d9316ab6e41bf3cb8f17fe | [#1](https://ci.status.im/job/status-go/job/prs/job/linux/job/PR-5409/1/) | 2024-06-24 07:22:18 | ~4 min | `linux` | [:package:`zip`](https://status-im-prs.ams3.cdn.digitaloceanspaces.com/status-go-desktop-240624-071814-69635eb626c922be52d9316ab6e41bf3cb8f17fe-pr5409.zip) | | :heavy_check_mark: | 69635eb626c922be52d9316ab6e41bf3cb8f17fe | [#1](https://ci.status.im/job/status-go/job/prs/job/ios/job/PR-5409/1/) | 2024-06-24 07:22:44 | ~4 min | `ios` | [:package:`zip`](https://status-im-prs.ams3.cdn.digitaloceanspaces.com/status-go-ios-240624-071814-69635eb626c922be52d9316ab6e41bf3cb8f17fe-pr5409.zip) | | :heavy_check_mark: | 69635eb626c922be52d9316ab6e41bf3cb8f17fe | [#1](https://ci.status.im/job/status-go/job/prs/job/android/job/PR-5409/1/) | 2024-06-24 07:23:49 | ~5 min | `android` | [:package:`aar`](https://status-im-prs.ams3.cdn.digitaloceanspaces.com/status-go-android-240624-071814-69635eb626c922be52d9316ab6e41bf3cb8f17fe-pr5409.aar) | | | | | | | | | | :heavy_check_mark: | 69635eb6 | [#1](https://ci.status.im/job/status-go/job/prs/job/tests/job/PR-5409/1/) | 2024-06-24 08:01:09 | ~42 min | `tests` | [:page_facing_up:`log`](https://ci.status.im/job/status-go/job/prs/job/tests/job/PR-5409/1//consoleText) | | | | | | | | | | :heavy_check_mark: | eadf472e48e40679d5319ecacd72612208167586 | [#2](https://ci.status.im/job/status-go/job/prs/job/ios/job/PR-5409/2/) | 2024-06-24 11:12:39 | ~3 min | `ios` | [:package:`zip`](https://status-im-prs.ams3.cdn.digitaloceanspaces.com/status-go-ios-240624-110938-eadf472e48e40679d5319ecacd72612208167586-pr5409.zip) | | :heavy_check_mark: | eadf472e48e40679d5319ecacd72612208167586 | [#2](https://ci.status.im/job/status-go/job/prs/job/linux/job/PR-5409/2/) | 2024-06-24 11:15:34 | ~5 min | `linux` | [:package:`zip`](https://status-im-prs.ams3.cdn.digitaloceanspaces.com/status-go-desktop-240624-110939-eadf472e48e40679d5319ecacd72612208167586-pr5409.zip) | | :heavy_check_mark: | eadf472e48e40679d5319ecacd72612208167586 | [#2](https://ci.status.im/job/status-go/job/prs/job/android/job/PR-5409/2/) | 2024-06-24 11:19:03 | ~9 min | `android` | [:package:`aar`](https://status-im-prs.ams3.cdn.digitaloceanspaces.com/status-go-android-240624-110938-eadf472e48e40679d5319ecacd72612208167586-pr5409.aar) | | | | | | | | | | :heavy_check_mark: | eadf472e | [#2](https://ci.status.im/job/status-go/job/prs/job/tests/job/PR-5409/2/) | 2024-06-24 11:56:00 | ~46 min | `tests` | [:page_facing_up:`log`](https://ci.status.im/job/status-go/job/prs/job/tests/job/PR-5409/2//consoleText) | | | | | | | | | | :heavy_check_mark: | feb34bd31ad3f81e714dbfbf06c44c26d16e2a38 | [#3](https://ci.status.im/job/status-go/job/prs/job/android/job/PR-5409/3/) | 2024-06-25 02:41:24 | ~1 min | `android` | [:package:`aar`](https://status-im-prs.ams3.cdn.digitaloceanspaces.com/status-go-android-240625-023956-feb34bd31ad3f81e714dbfbf06c44c26d16e2a38-pr5409.aar) | | :heavy_check_mark: | feb34bd31ad3f81e714dbfbf06c44c26d16e2a38 | [#3](https://ci.status.im/job/status-go/job/prs/job/ios/job/PR-5409/3/) | 2024-06-25 02:42:48 | ~2 min | `ios` | [:package:`zip`](https://status-im-prs.ams3.cdn.digitaloceanspaces.com/status-go-ios-240625-024000-feb34bd31ad3f81e714dbfbf06c44c26d16e2a38-pr5409.zip) | | :heavy_check_mark: | feb34bd31ad3f81e714dbfbf06c44c26d16e2a38 | [#3](https://ci.status.im/job/status-go/job/prs/job/linux/job/PR-5409/3/) | 2024-06-25 02:44:04 | ~4 min | `linux` | [:package:`zip`](https://status-im-prs.ams3.cdn.digitaloceanspaces.com/status-go-desktop-240625-024000-feb34bd31ad3f81e714dbfbf06c44c26d16e2a38-pr5409.zip) | | | | | | | | | | :heavy_check_mark: | feb34bd3 | [#3](https://ci.status.im/job/status-go/job/prs/job/tests/job/PR-5409/3/) | 2024-06-25 03:25:03 | ~45 min | `tests` | [:page_facing_up:`log`](https://ci.status.im/job/status-go/job/prs/job/tests/job/PR-5409/3//consoleText) | | | | | | | | | | :heavy_check_mark: | 2edfd6dc | [#1](https://ci.status.im/job/status-go/job/prs/job/tests-rpc/job/PR-5409/1/) | 2024-07-16 12:36:37 | ~2 min | `tests-rpc` | [:page_facing_up:`log`](https://ci.status.im/job/status-go/job/prs/job/tests-rpc/job/PR-5409/1//consoleText) | | :heavy_check_mark: | 2edfd6dc | [#4](https://ci.status.im/job/status-go/job/prs/job/ios/job/PR-5409/4/) | 2024-07-16 12:37:21 | ~3 min | `ios` | [:package:`zip`](https://status-im-prs.ams3.cdn.digitaloceanspaces.com/status-go-ios-240716-123403-2edfd6-pr5409.zip) | | :heavy_check_mark: | 2edfd6dc | [#4](https://ci.status.im/job/status-go/job/prs/job/linux/job/PR-5409/4/) | 2024-07-16 12:38:11 | ~4 min | `linux` | [:package:`zip`](https://status-im-prs.ams3.cdn.digitaloceanspaces.com/status-go-desktop-240716-123403-2edfd6-pr5409.zip) | | :heavy_check_mark: | 2edfd6dc | [#4](https://ci.status.im/job/status-go/job/prs/job/android/job/PR-5409/4/) | 2024-07-16 12:40:22 | ~6 min | `android` | [:package:`aar`](https://status-im-prs.ams3.cdn.digitaloceanspaces.com/status-go-android-240716-123358-2edfd6-pr5409.aar) | | :heavy_multiplication_x: | 2edfd6dc | [#4](https://ci.status.im/job/status-go/job/prs/job/tests/job/PR-5409/4/) | 2024-07-16 12:41:35 | ~7 min | `tests` | [:page_facing_up:`log`](https://ci.status.im/job/status-go/job/prs/job/tests/job/PR-5409/4//consoleText) | | :heavy_multiplication_x: | 2edfd6dc | [#5](https://ci.status.im/job/status-go/job/prs/job/tests/job/PR-5409/5/) | 2024-07-17 07:26:52 | ~17 min | `tests` | [:page_facing_up:`log`](https://ci.status.im/job/status-go/job/prs/job/tests/job/PR-5409/5//consoleText) |
:grey_question: Commit :hash: Finished (UTC) Duration Platform Result
:heavy_check_mark: aba9e91b #2 2024-07-17 14:33:14 ~2 min tests-rpc :page_facing_up:log
:heavy_check_mark: aba9e91b #5 2024-07-17 14:34:03 ~2 min ios :package:zip
:heavy_check_mark: aba9e91b #5 2024-07-17 14:35:04 ~4 min linux :package:zip
:heavy_check_mark: aba9e91b #5 2024-07-17 14:37:12 ~6 min android :package:aar
:heavy_check_mark: aba9e91b #6 2024-07-17 15:15:11 ~44 min tests :page_facing_up:log
:heavy_check_mark: 233e4bba #3 2024-07-19 07:53:02 ~2 min tests-rpc :page_facing_up:log
:heavy_check_mark: 233e4bba #6 2024-07-19 07:53:21 ~2 min ios :package:zip
:heavy_check_mark: 233e4bba #6 2024-07-19 07:54:42 ~4 min linux :package:zip
:heavy_check_mark: 233e4bba #6 2024-07-19 07:55:07 ~4 min android :package:aar
:heavy_check_mark: 233e4bba #7 2024-07-19 08:35:11 ~44 min tests :page_facing_up:log