Gopher access doesn't draw Public/Federated timeline in terminal
I enabled gopher setting in prod.secret.exs, and tried to access my pleroma instance from local machine with lynx gopher://pleroma.example.com:9999
. Accessing was secceeded and Gopher Menu appeared properly, but nothing was displaied by entering both Public and Federated timeline.
Error says (UndefinedFunctionError) function Pleroma.Object.fetch/2 is undefined (Pleroma.Object does not implement the Access behaviour)
.
Full error message and my prod.secret.exc confrig are here.
Error log
[/opt/pleroma]% sudo -Hu pleroma MIX_ENV=prod mix phx.server [git][pleroma/.][develop]
fatal: No tags can describe 'cdcdbd88da76f18c21da7f6f15a29883044902c8'.
Try --always, or create some tags.
Compiling 213 files (.ex)
Compiling lib/pleroma/web/activity_pub/views/user_view.ex (it's taking more than 15s)
Compiling lib/pleroma/web/activity_pub/views/object_view.ex (it's taking more than 15s)
Compiling lib/pleroma/web/mastodon_api/views/conversation_view.ex (it's taking more than 15s)
Compiling lib/pleroma/web/twitter_api/twitter_api_controller.ex (it's taking more than 15s)
Compiling lib/pleroma/web/mastodon_api/views/list_view.ex (it's taking more than 15s)
Compiling lib/pleroma/web/activity_pub/activity_pub_controller.ex (it's taking more than 15s)
Compiling lib/pleroma/web/mastodon_api/views/account_view.ex (it's taking more than 15s)
Compiling lib/pleroma/web/mastodon_api/views/app_view.ex (it's taking more than 15s)
Generated pleroma app
03:00:56.633 [warn] !!!DEPRECATION WARNING!!!
You are using the old configuration mechanism for the frontend. Please check config.md.
03:00:56.713 [info] Retry queue disabled
03:00:56.856 [info] Running Pleroma.Web.Endpoint with cowboy 2.6.1 at https://pleroma.example.com
03:00:56.857 [info] Starting gopher server on 9999
03:01:07.509 [error] Process #PID<0.1967.0> raised an exception
** (UndefinedFunctionError) function Pleroma.Object.fetch/2 is undefined (Pleroma.Object does not implement the Acces
behaviour)
(pleroma) Pleroma.Object.fetch(%Pleroma.Object{__meta__: #Ecto.Schema.Metadata<:loaded, "objects">, data: %{"acto
" => "https://mastodon.technology/users/fdroidorg", "atomUri" => "https://mastodon.technology/users/fdroidorg/statuse
/102088713688373021", "attachment" => [], "attributedTo" => "https://mastodon.technology/users/fdroidorg", "bcc" => [
, "bto" => [], "cc" => ["https://mastodon.technology/users/fdroidorg/followers", "https://chaos.social/users/metalab"
, "content" => "<p>If you are in Vienna you might be interested in joining the first meeting of a new <a href=\"https
//mastodon.technology/tags/fdroid\" class=\"mention hashtag\" rel=\"tag\">#<span>FDroid</span></a> user-group tomorro
18:30 at <span class=\"h-card\"><a href=\"https://chaos.social/@metalab\" class=\"u-url mention\">@<span>metalab</sp
n></a></span> </p><p>All details on: <a href=\"https://metalab.at/wiki/FDroidMeetupVienna\" rel=\"nofollow noopener\"
target=\"_blank\"><span class=\"invisible\">https://</span><span class=\"ellipsis\">metalab.at/wiki/FDroidMeetupVi</s
an><span class=\"invisible\">enna</span></a></p>", "contentMap" => %{"en" => "<p>If you are in Vienna you might be in
erested in joining the first meeting of a new <a href=\"https://mastodon.technology/tags/fdroid\" class=\"mention has
tag\" rel=\"tag\">#<span>FDroid</span></a> user-group tomorrow 18:30 at <span class=\"h-card\"><a href=\"https://chao
.social/@metalab\" class=\"u-url mention\">@<span>metalab</span></a></span> </p><p>All details on: <a href=\"https://
etalab.at/wiki/FDroidMeetupVienna\" rel=\"nofollow noopener\" target=\"_blank\"><span class=\"invisible\">https://</s
an><span class=\"ellipsis\">metalab.at/wiki/FDroidMeetupVi</span><span class=\"invisible\">enna</span></a></p>"}, "co
text" => "tag:mastodon.technology,2019-05-13:objectId=17620464:objectType=Conversation", "context_id" => 353, "conver
ation" => "tag:mastodon.technology,2019-05-13:objectId=17620464:objectType=Conversation", "emoji" => %{}, "id" => "ht
ps://mastodon.technology/users/fdroidorg/statuses/102088713688373021", "inReplyTo" => nil, "inReplyToAtomUri" => nil,
"published" => "2019-05-13T12:22:27Z", "replies" => %{"first" => %{"items" => [], "partOf" => "https://mastodon.techn
logy/users/fdroidorg/statuses/102088713688373021/replies", "type" => "CollectionPage"}, "id" => "https://mastodon.tec
nology/users/fdroidorg/statuses/102088713688373021/replies", "type" => "Collection"}, "sensitive" => false, "summary"
=> "", "tag" => [%{"href" => "https://chaos.social/users/metalab", "name" => "@metalab@chaos.social", "type" => "Ment
on"}, %{"href" => "https://mastodon.technology/tags/fdroid", "name" => "#fdroid", "type" => "Hashtag"}, "fdroid"], "t
" => ["https://www.w3.org/ns/activitystreams#Public"], "type" => "Note", "url" => "https://mastodon.technology/@fdroi
org/102088713688373021"}, id: 354, inserted_at: ~N[2019-05-13 12:22:41], updated_at: ~N[2019-05-13 12:22:41]}, "like_
ount")
(elixir) lib/access.ex:318: Access.get/3
(pleroma) lib/pleroma/gopher/server.ex:80: anonymous fn/1 in Pleroma.Gopher.Server.ProtocolHandler.render_activit
es/1
(elixir) lib/enum.ex:1314: Enum."-map/2-lists^map/1-0-"/2
(pleroma) lib/pleroma/gopher/server.ex:76: Pleroma.Gopher.Server.ProtocolHandler.render_activities/1
(pleroma) lib/pleroma/gopher/server.ex:108: Pleroma.Gopher.Server.ProtocolHandler.response/1
(pleroma) lib/pleroma/gopher/server.ex:152: Pleroma.Gopher.Server.ProtocolHandler.loop/2
03:01:07.509 [error] Ranch listener :gopher had connection process started with Pleroma.Gopher.Server.ProtocolHandler
start_link/4 at #PID<0.1967.0> exit with reason: {%UndefinedFunctionError{arity: 2, function: :fetch, message: nil, m
dule: Pleroma.Object, reason: "Pleroma.Object does not implement the Access behaviour"}, [{Pleroma.Object, :fetch, [%
leroma.Object{__meta__: #Ecto.Schema.Metadata<:loaded, "objects">, data: %{"actor" => "https://mastodon.technology/us
rs/fdroidorg", "atomUri" => "https://mastodon.technology/users/fdroidorg/statuses/102088713688373021", "attachment" =
[], "attributedTo" => "https://mastodon.technology/users/fdroidorg", "bcc" => [], "bto" => [], "cc" => ["https://mas
odon.technology/users/fdroidorg/followers", "https://chaos.social/users/metalab"], "content" => "<p>If you are in Vie
na you might be interested in joining the first meeting of a new <a href=\"https://mastodon.technology/tags/fdroid\"
lass=\"mention hashtag\" rel=\"tag\">#<span>FDroid</span></a> user-group tomorrow 18:30 at <span class=\"h-card\"><a
ref=\"https://chaos.social/@metalab\" class=\"u-url mention\">@<span>metalab</span></a></span> </p><p>All details on:
<a href=\"https://metalab.at/wiki/FDroidMeetupVienna\" rel=\"nofollow noopener\" target=\"_blank\"><span class=\"invi
ible\">https://</span><span class=\"ellipsis\">metalab.at/wiki/FDroidMeetupVi</span><span class=\"invisible\">enna</s
an></a></p>", "contentMap" => %{"en" => "<p>If you are in Vienna you might be interested in joining the first meeting
of a new <a href=\"https://mastodon.technology/tags/fdroid\" class=\"mention hashtag\" rel=\"tag\">#<span>FDroid</spa
></a> user-group tomorrow 18:30 at <span class=\"h-card\"><a href=\"https://chaos.social/@metalab\" class=\"u-url men
ion\">@<span>metalab</span></a></span> </p><p>All details on: <a href=\"https://metalab.at/wiki/FDroidMeetupVienna\"
el=\"nofollow noopener\" target=\"_blank\"><span class=\"invisible\">https://</span><span class=\"ellipsis\">metalab.
t/wiki/FDroidMeetupVi</span><span class=\"invisible\">enna</span></a></p>"}, "context" => "tag:mastodon.technology,20
9-05-13:objectId=17620464:objectType=Conversation", "context_id" => 353, "conversation" => "tag:mastodon.technology,2
19-05-13:objectId=17620464:objectType=Conversation", "emoji" => %{}, "id" => "https://mastodon.technology/users/fdroi
org/statuses/102088713688373021", "inReplyTo" => nil, "inReplyToAtomUri" => nil, "published" => "2019-05-13T12:22:27Z
, "replies" => %{"first" => %{"items" => [], "partOf" => "https://mastodon.technology/users/fdroidorg/statuses/102088
13688373021/replies", "type" => "CollectionPage"}, "id" => "https://mastodon.technology/users/fdroidorg/statuses/1020
8713688373021/replies", "type" => "Collection"}, "sensitive" => false, "summary" => "", "tag" => [%{"href" => "https:
/chaos.social/users/metalab", "name" => "@metalab@chaos.social", "type" => "Mention"}, %{"href" => "https://mastodon.
echnology/tags/fdroid", "name" => "#fdroid", "type" => "Hashtag"}, "fdroid"], "to" => ["https://www.w3.org/ns/activit
streams#Public"], "type" => "Note", "url" => "https://mastodon.technology/@fdroidorg/102088713688373021"}, id: 354, i
serted_at: ~N[2019-05-13 12:22:41], updated_at: ~N[2019-05-13 12:22:41]}, "like_count"], []}, {Access, :get, 3, [file
'lib/access.ex', line: 318]}, {Pleroma.Gopher.Server.ProtocolHandler, :"-render_activities/1-fun-0-", 1, [file: 'lib
pleroma/gopher/server.ex', line: 80]}, {Enum, :"-map/2-lists^map/1-0-", 2, [file: 'lib/enum.ex', line: 1314]}, {Plero
a.Gopher.Server.ProtocolHandler, :render_activities, 1, [file: 'lib/pleroma/gopher/server.ex', line: 76]}, {Pleroma.G
pher.Server.ProtocolHandler, :response, 1, [file: 'lib/pleroma/gopher/server.ex', line: 108]}, {Pleroma.Gopher.Server
ProtocolHandler, :loop, 2, [file: 'lib/pleroma/gopher/server.ex', line: 152]}]}
prod.secret.exc
use Mix.Config
config :pleroma, Pleroma.Web.Endpoint,
url: [host: "pleroma.example.com", scheme: "https", port: 443],
secret_key_base: "**********",
signing_salt: "******"
config :pleroma, :instance,
name: "Pleroma/Example",
email: "contact@example.com",
limit: 5000,
registrations_open: false,
dedupe_media: false,
no_attachment_links: true
config :pleroma, :media_proxy,
enabled: true,
redirect_on_failure: true,
base_url: "https://pleroma.example.com"
config :pleroma, Pleroma.Repo,
adapter: Ecto.Adapters.Postgres,
username: "pleroma",
password: "*************",
database: "pleroma_dev",
hostname: "localhost",
pool_size: 10
# Configure web push notifications
config :web_push_encryption, :vapid_details,
subject: "mailto:contact@example.com",
public_key: "***********",
private_key: "************"
# Configure BBS/SSH access
app_dir = File.cwd!
priv_dir = Path.join([app_dir, "priv/ssh_keys"])
config :esshd,
enabled: true,
priv_dir: priv_dir,
handler: "Pleroma.BBS.Handler",
port: 10_022,
password_authenticator: "Pleroma.BBS.Authenticator"
# Configure gopher
config :pleroma, :gopher,
enabled: true,
ip: {0, 0, 0, 0},
port: 9999
Edited by Yuji Nakao