ckolderup / postmarks

a single-user bookmarking website designed to live on the Fediverse

Home Page:https://postmarks.glitch.me

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to follow Postmarks user from Postmarks

andypiper opened this issue · comments

Updated my Glitch-running app to the latest code from GitHub, with my existing DBs in place.

I'm unable to follow the Postmarks user from another Postmarks instance running the same level of code; but I am able to follow from e.g. a Mastodon instance.

Output on the Postmarks server I'm trying to follow from:

[2023-9-25 10:6:19] POST:/admin/following/follow 200 0.002ms
Sent message to an inbox at pipesmarks.glitch.me!
Response Status Code: 503
Response body: <!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>👻 Site didn't respond</title>
    <meta name="viewport" content="initial-scale=1, width=device-width">
    <link rel="stylesheet" type="text/css" href="https://glitch.com/edit/themes/cosmos.css" target="_blank" rel="nofollow">
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.3/jquery.js"></script>
    <script src="https://glitch.com/edit/error-page.js"></script>
  </head>
  <body class="ghost-border">
    <div class="container">
      <h1>
        Site didn't respond
      </h1>
      <p>
        Something in the code caused it to close the connection before providing a response.
      </p>
      <p>
        If this is your project please visit us at <a href="https://support.glitch.com">support.glitch.com</a> for assistance.
      </p>
      <div class="actions">
        <a href="https://glitch.com">
          <div class="glitch-logo bird">
          </div>
        </a>
      </div>
    </div>
    <canvas id="stars"></canvas>
  </body>
</html>

Output on the receiving server:

[2023-9-25 10:6:19] GET:/.well-known/webfinger/?resource=acct:andypiper@pipesmarks.glitch.me 200 0.003ms
[2023-9-25 10:6:19] GET:/u/andypiper.json 200 0.003ms
[2023-9-25 10:6:19] POST:/api/inbox 200 0.003ms
undefined:1
<html>
^
SyntaxError: Unexpected token < in JSON at position 0
    at JSON.parse (<anonymous>)
    at Response.json (file:///rbd/pnpm-volume/2c58c3bc-c846-4d1a-af35-475ee568b9ca/node_modules/node-fetch/src/body.js:149:15)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async getInboxFromActorProfile (file:///app/src/activitypub.js:159:16)
at async sendAcceptMessage (file:///app/src/routes/activitypub/inbox.js:22:17)
at async handleFollowRequest (file:///app/src/routes/activitypub/inbox.js:35:3)

I think this may have been introduced as a result of other changes, because I already have other Postmarks users following the same account.

@andypiper I just pulled from main on my install and I was able to follow you. Maybe it has to do with the remote server being on an older version of Postmarks? Feel free to try following me to see if it works: @patrick@links.pburke.me

In any case, it seems like there should be some error handling rather than a crash when something like this happens.

Huh.

I've just repeated the same steps as I tried earlier, and now things are working fine...

Closing as cannot reproduce! 🙄 Thanks @pburke for the check here!