Hello!
I wanted to move away from Reddit and started with a Lemmy instance for a few days. But, I kept on bumping into these mentions about PieFed and got curious. I figured since I just started, no harm in just spinning up PieFed. That, and once I saw Voyager was able to work with PieFed, it just seemed like a no brainer.
I'm so very impressed, I'm just exploring everything, checking out settings, and adding new communities.
That said I probably did something wrong in the process. I input the settings for email in .env.docker. As soon as I did, error emails arrived in batches of 5-8 at a time. I tried making sense of it myself, but I got stuck. Would anyone kindly take a look and point me in the right direction?
Error
Exception on /inbox [POST]
Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/requests/models.py", line 976, in json
return complexjson.loads(self.text, **kwargs)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/json/init.py", line 346, in loads
return _default_decoder.decode(s)
~~~~~~~~~~~~~~~~~~~~~~~^^^
File "/usr/local/lib/python3.13/json/decoder.py", line 345, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/json/decoder.py", line 363, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/pyld/documentloader/requests.py", line 72, in loader
'document': response.json()
~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/site-packages/requests/models.py", line 980, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/pyld/context_resolver.py", line 143, in _fetch_context
remote_doc = jsonld.load_document(url,
{'documentLoader': self.document_loader},
requestProfile='http://www.w3.org/ns/json-ld#context')
File "/usr/local/lib/python3.13/site-packages/pyld/jsonld.py", line 6583, in load_document
remote_doc = options['documentLoader'](url, options)
File "/usr/local/lib/python3.13/site-packages/pyld/documentloader/requests.py", line 100, in loader
raise JsonLdError(
...<2 lines>...
cause=cause)
pyld.jsonld.JsonLdError: ('Could not retrieve a JSON-LD document from the URL.',)
Type: jsonld.LoadDocumentError
Code: loading document failed
Cause: Expecting value: line 1 column 1 (char 0) File "/usr/local/lib/python3.13/site-packages/pyld/documentloader/requests.py", line 72, in loader
'document': response.json()
~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/site-packages/requests/models.py", line 980, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/pyld/jsonld.py", line 1219, in to_rdf
expanded = self.expand(input_, options)
File "/usr/local/lib/python3.13/site-packages/pyld/jsonld.py", line 870, in expand
expanded = self._expand(active_ctx, None, document, options,
inside_list=False)
File "/usr/local/lib/python3.13/site-packages/pyld/jsonld.py", line 2302, in _expand
active_ctx = self._process_context(
active_ctx, element['@context'], options)
File "/usr/local/lib/python3.13/site-packages/pyld/jsonld.py", line 3049, in _process_context
resolved = options['contextResolver'].resolve(active_ctx, local_ctx, options.get('base', ''))
File "/usr/local/lib/python3.13/site-packages/pyld/context_resolver.py", line 58, in resolve
resolved = self._resolve_remote_context(
active_ctx, ctx, base, cycles)
File "/usr/local/lib/python3.13/site-packages/pyld/context_resolver.py", line 108, in _resolve_remote_context
context, remote_doc = self._fetch_context(active_ctx, url, cycles)
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/pyld/context_resolver.py", line 148, in _fetch_context
raise jsonld.JsonLdError(
...<8 lines>...
code='loading remote context failed')
pyld.jsonld.JsonLdError: ('Dereferencing a URL did not result in a valid JSON-LD object. Possible causes are an inaccessible URL perhaps due to a same-origin policy (ensure the server uses CORS if you are using client-side JavaScript), too many redirects, a non-JSON response, or more than one HTTP Link Header was provided for a remote context.',)
Type: jsonld.InvalidUrl
Code: loading remote context failed
Details: {'url': 'https://www.w3.org/ns/activitystreams', 'cause': JsonLdError('Could not retrieve a JSON-LD document from the URL.')}
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/pyld/jsonld.py", line 1128, in normalize
dataset = self.to_rdf(input_, opts)
File "/usr/local/lib/python3.13/site-packages/pyld/jsonld.py", line 1221, in to_rdf
raise JsonLdError(
'Could not expand input before serialization to '
'RDF.', 'jsonld.RdfError', cause=cause)
pyld.jsonld.JsonLdError: ('Could not expand input before serialization to RDF.',)
Type: jsonld.RdfError
Cause: ('Dereferencing a URL did not result in a valid JSON-LD object. Possible causes are an inaccessible URL perhaps due to a same-origin policy (ensure the server uses CORS if you are using client-side JavaScript), too many redirects, a non-JSON response, or more than one HTTP Link Header was provided for a remote context.',)
Type: jsonld.InvalidUrl
Code: loading remote context failed
Details: {'url': 'https://www.w3.org/ns/activitystreams', 'cause': JsonLdError('Could not retrieve a JSON-LD document from the URL.')} File "/usr/local/lib/python3.13/site-packages/pyld/jsonld.py", line 1219, in to_rdf
expanded = self.expand(input_, options)
File "/usr/local/lib/python3.13/site-packages/pyld/jsonld.py", line 870, in expand
expanded = self._expand(active_ctx, None, document, options,
inside_list=False)
File "/usr/local/lib/python3.13/site-packages/pyld/jsonld.py", line 2302, in _expand
active_ctx = self._process_context(
active_ctx, element['@context'], options)
File "/usr/local/lib/python3.13/site-packages/pyld/jsonld.py", line 3049, in _process_context
resolved = options['contextResolver'].resolve(active_ctx, local_ctx, options.get('base', ''))
File "/usr/local/lib/python3.13/site-packages/pyld/context_resolver.py", line 58, in resolve
resolved = self._resolve_remote_context(
active_ctx, ctx, base, cycles)
File "/usr/local/lib/python3.13/site-packages/pyld/context_resolver.py", line 108, in _resolve_remote_context
context, remote_doc = self._fetch_context(active_ctx, url, cycles)
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/pyld/context_resolver.py", line 148, in _fetch_context
raise jsonld.JsonLdError(
...<8 lines>...
code='loading remote context failed')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/flask/app.py", line 1511, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.13/site-packages/flask/app.py", line 919, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.13/site-packages/flask/app.py", line 917, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.13/site-packages/flask/app.py", line 902, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/app/app/activitypub/routes.py", line 613, in shared_inbox
LDSignature.verify_signature(request_json, actor.public_key)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/app/activitypub/signature.py", line 485, in verify_signature
final_hash = cls.normalized_hash(options) + cls.normalized_hash(document)
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
File "/app/app/activitypub/signature.py", line 544, in normalized_hash
norm_form = jsonld.normalize(
document,
{"algorithm": "URDNA2015", "format": "application/n-quads"},
)
File "/usr/local/lib/python3.13/site-packages/pyld/jsonld.py", line 272, in normalize
return JsonLdProcessor().normalize(input_, options)
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/pyld/jsonld.py", line 1130, in normalize
raise JsonLdError(
'Could not convert input to RDF dataset before normalization.',
'jsonld.NormalizeError', cause=cause)
pyld.jsonld.JsonLdError: ('Could not convert input to RDF dataset before normalization.',)
Type: jsonld.NormalizeError
Cause: ('Could not expand input before serialization to RDF.',)
Type: jsonld.RdfError
Cause: ('Dereferencing a URL did not result in a valid JSON-LD object. Possible causes are an inaccessible URL perhaps due to a same-origin policy (ensure the server uses CORS if you are using client-side JavaScript), too many redirects, a non-JSON response, or more than one HTTP Link Header was provided for a remote context.',)
Type: jsonld.InvalidUrl
Code: loading remote context failed
Details: {'url': 'https://www.w3.org/ns/activitystreams', 'cause': JsonLdError('Could not retrieve a JSON-LD document from the URL.')} File "/usr/local/lib/python3.13/site-packages/pyld/jsonld.py", line 1219, in to_rdf
expanded = self.expand(input_, options)
File "/usr/local/lib/python3.13/site-packages/pyld/jsonld.py", line 870, in expand
expanded = self._expand(active_ctx, None, document, options,
inside_list=False)
File "/usr/local/lib/python3.13/site-packages/pyld/jsonld.py", line 2302, in _expand
active_ctx = self._process_context(
active_ctx, element['@context'], options)
File "/usr/local/lib/python3.13/site-packages/pyld/jsonld.py", line 3049, in _process_context
resolved = options['contextResolver'].resolve(active_ctx, local_ctx, options.get('base', ''))
File "/usr/local/lib/python3.13/site-packages/pyld/context_resolver.py", line 58, in resolve
resolved = self._resolve_remote_context(
active_ctx, ctx, base, cycles)
File "/usr/local/lib/python3.13/site-packages/pyld/context_resolver.py", line 108, in _resolve_remote_context
context, remote_doc = self._fetch_context(active_ctx, url, cycles)
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/pyld/context_resolver.py", line 148, in fetch_context
raise jsonld.JsonLdError(
...<8 lines>...
code='loading remote context failed')
File "/usr/local/lib/python3.13/site-packages/pyld/jsonld.py", line 1128, in normalize
dataset = self.to_rdf(input, opts)
File "/usr/local/lib/python3.13/site-packages/pyld/jsonld.py", line 1221, in to_rdf
raise JsonLdError(
'Could not expand input before serialization to '
'RDF.', 'jsonld.RdfError', cause=cause)
As soon as federation starts there is all kinds of weird JSON that arrives from different software, so errors start happening. Most of them are not serious.
Are you following PeerTube channels? Afaik PeerTube is the one most likely to trigger the JSON-LD-based signature validation.
Thank you everyone, for your replies and tips!!
I haven't followed PeerTube channels directly from PieFed - yet.
After just under 24 hours up, so far everything seems to be working just as wjs018 says.
Thanks Rimu for the Sentry tip.
I think I'll just not set the email for errors so as to avoid the logs being sent out.