misskey-dev / misskey

🌎 A completely free and open interplanetary microblogging platform 🚀
https://misskey-hub.net/
GNU Affero General Public License v3.0
9.93k stars 1.34k forks source link

If got HTTP 401 when fetching remote AP object without signature, automatically retry with signature #9110

Open rinsuki opened 2 years ago

rinsuki commented 2 years ago

Summary

定期的にこれで困ってる人を見るので勝手にフォールバックしたほうが便利なんじゃないかという説

rinsuki commented 2 years ago

related: #6727 #8093

pedroCX486 commented 1 year ago

Hi, sorry I only speak English. I think this should be classified as also a bug instead of a feature? My instance is unable to interact with most instances now due to this.

rinsuki commented 1 year ago

If your owned server have a issue, you can manually enables sign to GET AP requests: https://github.com/misskey-dev/misskey/issues/8093#issuecomment-1002025528

pedroCX486 commented 1 year ago

#8093 (comment)

That actually fixed most of the issues I had. Thank you. ありがとう !

mei23 commented 1 year ago

フォールバックするくらいならデフォルトオンでいいのではという説

Albirew commented 9 months ago

#8093 (comment) did not fix issue for me since it was already enabled since 2022... I can read remote users profiles and notes, but for some, I can't answer or follow. When trying to follow @mikrotik@mikrotik.social or @codegouvfr@social.numerique.gouv.fr, I get these errors (shown in docker logs):

Logs ``` INFO * [url-preview] Getting preview of https://mikrotik.social/users/mikrotik/inbox@fr-FR ... WARN * [url-preview] Failed to get preview of https://mikrotik.social/users/mikrotik/inbox: StatusError: 404 Not Found INFO * [remote resolve-user] return existing remote user: mikrotik@mikrotik.social WARN 1 [queue deliver] failed(UnrecoverableError: 401 Unauthorized) id=1618 attempts=1/12 age=1108ms to=https://mikrotik.social/users/mikrotik/inbox WARN 1 [queue deliver] failed(UnrecoverableError: 401 Unauthorized) id=1619 attempts=1/12 age=573ms to=https://mikrotik.social/users/mikrotik/inbox INFO * [url-preview] Getting preview of https://code.gouv.fr/fr/awesome/@fr-FR ... INFO * [download] Downloading https://social.numerique.gouv.fr/packs/media/icons/favicon-48x48-c1197e9664ee6476d2715a1c4293bf61.png to /tmp/tmp-250-6Ex4I9aMSgE6 ... DONE * [url-preview] Got preview of https://code.gouv.fr/fr/awesome/: Awesome CodeGouvFr DONE * [download] Download finished: https://social.numerique.gouv.fr/packs/media/icons/favicon-48x48-c1197e9664ee6476d2715a1c4293bf61.png INFO * [url-preview] Getting preview of https://code.gouv.fr/fr/blog/awesome-codegouvfr-logiciels-libres-remarquables-de-ladministration/@fr-FR ... INFO * [download] Downloading https://code.gouv.fr/favicon/apple-touch-icon.png to /tmp/tmp-250-WAtqokVJMVvm ... INFO * [download] Downloading https://code.gouv.fr/favicon/favicon.ico to /tmp/tmp-250-QoPB6ojbOFWr ... DONE * [download] Download finished: https://code.gouv.fr/favicon/apple-touch-icon.png DONE * [url-preview] Got preview of https://code.gouv.fr/fr/blog/awesome-codegouvfr-logiciels-libres-remarquables-de-ladministration/: Awesome CodeGouvFr : logiciels libres remarquables de l'administration DONE * [download] Download finished: https://code.gouv.fr/favicon/favicon.ico query is slow: SELECT "__chart_day__per_user_notes"."id" AS "__chart_day__per_user_notes_id", "__chart_day__per_user_notes"."date" AS "__chart_day__per_user_notes_date", "__chart_day__per_user_notes"."group" AS "__chart_day__per_user_notes_group", "__chart_day__per_user_notes"."___total" AS "__chart_day__per_user_notes____total", "__chart_day__per_user_notes"."___inc" AS "__chart_day__per_user_notes____inc", "__chart_day__per_user_notes"."___dec" AS "__chart_day__per_user_notes____dec", "__chart_day__per_user_notes"."___diffs_normal" AS "__chart_day__per_user_notes____diffs_normal", "__chart_day__per_user_notes"."___diffs_reply" AS "__chart_day__per_user_notes____diffs_reply", "__chart_day__per_user_notes"."___diffs_renote" AS "__chart_day__per_user_notes____diffs_renote", "__chart_day__per_user_notes"."___diffs_withFile" AS "__chart_day__per_user_notes____diffs_withFile" FROM "__chart_day__per_user_notes" "__chart_day__per_user_notes" WHERE ("__chart_day__per_user_notes"."group" = $1) ORDER BY "__chart_day__per_user_notes"."date" DESC LIMIT 1 -- PARAMETERS: ["9kxzo10djl"] execution time: 3143 WARN 1 [queue deliver] failed(UnrecoverableError: 401 Unauthorized) id=1620 attempts=1/12 age=574ms to=https://social.numerique.gouv.fr/users/codegouvfr/inbox WARN 1 [queue deliver] failed(UnrecoverableError: 401 Unauthorized) id=1621 attempts=1/12 age=407ms to=https://social.numerique.gouv.fr/users/codegouvfr/inbox ```

BTW, attempt never get past 1/12