500 error: "(Regex.CompileError) nothing to repeat at position 1", timeline not loading, can't post anything, it's so over
Environment
- Installation type (OTP or From Source): source
- Pleroma version (could be found in the "Version" tab of settings in Pleroma-FE): 2.6.1
- Elixir version (
elixir -v
for from source installations, N/A for OTP): 1.14.3, Erlang/OTP 25 - Operating system: FreeBSD 13.2-RELEASE
- PostgreSQL version (
psql -V
): 12.14
Bug description
My instance has been experiencing a very weird bug since earlier today that, as far as I can tell, has happened completely randomly possibly from an activity on another instance and that I haven't seen anyone else report. I had upgraded from an older release of Pleroma like a week ago to the most recent release, but it was running fine until suddenly shit broke earlier today and I don't think this is because of an upgrade getting screwed up.
At the moment any recent timeline posts (i.e. since this error started happening) will not load in either Pleroma FE or Husky, so this seems to be a backend issue, and trying to make a post on the FE side will give the "e.text is undefined" error. Here's an example of what shows up in the Pleroma logs:
22:46:19.045 [error] #PID<0.14402.0> running Pleroma.Web.Endpoint (connection #PID<0.14401.0>, stream id 1) terminated
Server: social.xenofem.me:80 (http)
Request: POST /inbox
** (exit) an exception was raised:
** (Regex.CompileError) nothing to repeat at position 1
(elixir 1.14.3) lib/regex.ex:231: Regex.compile!/2
(pleroma 2.6.1) lib/pleroma/web/activity_pub/mrf.ex:140: anonymous fn/2 in Pleroma.Web.ActivityPub.MRF.subdomains_regex/1
(elixir 1.14.3) lib/enum.ex:2468: Enum."-reduce/3-lists^foldl/2-0-"/3
(pleroma 2.6.1) lib/pleroma/web/activity_pub/mrf.ex:140: Pleroma.Web.ActivityPub.MRF.subdomains_regex/1
(pleroma 2.6.1) lib/pleroma/web/activity_pub/mrf/simple_policy.ex:32: Pleroma.Web.ActivityPub.MRF.SimplePolicy.check_reject/2
(pleroma 2.6.1) lib/pleroma/web/activity_pub/mrf/simple_policy.ex:234: Pleroma.Web.ActivityPub.MRF.SimplePolicy.filter/1
(elixir 1.14.3) lib/enum.ex:2468: Enum."-reduce/3-lists^foldl/2-0-"/3
(pleroma 2.6.1) lib/pleroma/web/activity_pub/activity_pub.ex:1685: Pleroma.Web.ActivityPub.ActivityPub.user_data_from_user_object/2
Similar errors will be reported trying to fetch the timeline:
22:47:48.603 [error] #PID<0.16133.0> running Pleroma.Web.Endpoint (connection #PID<0.16132.0>, stream id 1) terminated
Server: social.xenofem.me:80 (http)
Request: GET /objects/84de057f-52af-4c71-b42c-506d70839fdd
** (exit) an exception was raised:
** (Regex.CompileError) nothing to repeat at position 1
(elixir 1.14.3) lib/regex.ex:231: Regex.compile!/2
(pleroma 2.6.1) lib/pleroma/web/activity_pub/mrf.ex:140: anonymous fn/2 in Pleroma.Web.ActivityPub.MRF.subdomains_regex/1
(elixir 1.14.3) lib/enum.ex:2468: Enum."-reduce/3-lists^foldl/2-0-"/3
(pleroma 2.6.1) lib/pleroma/web/activity_pub/mrf.ex:140: Pleroma.Web.ActivityPub.MRF.subdomains_regex/1
(pleroma 2.6.1) lib/pleroma/web/activity_pub/mrf/simple_policy.ex:32: Pleroma.Web.ActivityPub.MRF.SimplePolicy.check_reject/2
(pleroma 2.6.1) lib/pleroma/web/activity_pub/mrf/simple_policy.ex:234: Pleroma.Web.ActivityPub.MRF.SimplePolicy.filter/1
(elixir 1.14.3) lib/enum.ex:2468: Enum."-reduce/3-lists^foldl/2-0-"/3
(pleroma 2.6.1) lib/pleroma/web/activity_pub/activity_pub.ex:1685: Pleroma.Web.ActivityPub.ActivityPub.user_data_from_user_object/2
An example of the sorts of errors that accompany these (the request_id
seems to always change):
01:31:12.520 request_id=F6Z91za8Ru31gegAACEh [error] Internal server error: %Regex.CompileError{message: "nothing to repeat at position 1"}
And on the frontend in the console the following error shows up when the page loads along with a bunch of JS garbage whenever I try to type anything into the status box:
XHRGET
https://social.xenofem.me/api/v1/accounts/40@den.raccoon.quest@den.raccoon.quest
[HTTP/2 404 Not Found 130ms]
GET
https://social.xenofem.me/api/v1/accounts/40@den.raccoon.quest@den.raccoon.quest
Status
404
Not Found
VersionHTTP/2
Transferred1.38 kB (27 B size)
Referrer Policysame-origin
My guess is that Pleroma somehow has an incorrectly formatted username for the user 40
in its database since the instance in the error is @den.raccoon.quest@den.raccoon.quest
, and maybe that's the source of the regex error, but I have no idea how to actually fix that or how it happened. It may also not even be related. I do know that instance is running some fork of Misskey (Foundkey I think).
Anyways, at the moment my instance is basically unusable and broken so any suggestions would be greatly appreciated.