Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't migrate via goat, possibly because I'm an idiot #787

Open
waferbaby opened this issue Nov 3, 2024 · 7 comments
Open

Can't migrate via goat, possibly because I'm an idiot #787

waferbaby opened this issue Nov 3, 2024 · 7 comments

Comments

@waferbaby
Copy link

waferbaby commented Nov 3, 2024

Hi friends! I'm trying to migrate to my own hosted PDS, which is up and running nicely (yay!). I'm trying to follow Bryan's guide to migrate via goat, but I'm running into an issue where:

  • I run goat account login, which (fairly) throws up a 401 because it's emailing me a token (error: XRPC ERROR 401: AuthFactorTokenRequired: A sign in code has been sent to your email address).
  • I then run goat account migrate with all their pertinent details, including the token I got via the email, but it just throws up an error (error: auth required, but not logged in).

I scrubbed through existing/closed issues and the guide, and I cannot for the life of me work out what I'm missing. Help? 😅

@waferbaby waferbaby changed the title Can't migrate via goat, possible because I'm an idiot Can't migrate via goat, possibly because I'm an idiot Nov 3, 2024
@haileyok
Copy link
Contributor

haileyok commented Nov 4, 2024

@bnewbold

@bnewbold
Copy link
Collaborator

bnewbold commented Nov 4, 2024

hrm, the basic account login should not usually require an email token. do you have "email 2FA" enabled for your account? is your account email verified?

I may not have tested this flow when the "email 2FA" flag is set. You might be able to disable that and try again? If that is what the issue is, let me know and i'll at least open a ticket to track the issue.

@waferbaby
Copy link
Author

waferbaby commented Nov 4, 2024

@bnewbold You are a scholar and a gentleman. Will give that a shot.

@waferbaby
Copy link
Author

@bnewbold Progress! That worked, could get the correct code via email* - however, It's now telling me the API is sending me invalid data (wrong content type, maybe? assuming HTML instead of whatever it's expecting?).

error: failed connecting to new host: XRPC ERROR 404: failed to decode xrpc error message: invalid character '<' looking for beginning of value

* Also just FYI, when it sends you that email, the message actually says:

To update the email for your account, enter the code below in the app along with your new email.

@waferbaby
Copy link
Author

waferbaby commented Nov 4, 2024

@bnewbold Running through the manual migration steps via goat, it looks like that error is coming from my self-hosted server - logging in after account creation shows the same thing - here's the output in my local logs:

{
    "level": 30,
    "time": 1730764573244,
    "pid": 7,
    "hostname": "homebase",
    "name": "pds",
    "req": {
        "id": 9140,
        "method": "POST",
        "url": "//xrpc/com.atproto.server.createSession",
        "query": {},
        "params": {},
        "headers": {
            "host": "wafer.baby",
            "user-agent": "indigo/v0.0.0-20241031232035-1a73c3fb6841",
            "content-length": "87",
            "accept-encoding": "gzip",
            "content-type": "application/json",
            "x-forwarded-for": "(ip address)",
            "x-forwarded-host": "wafer.baby",
            "x-forwarded-proto": "https"
        }
    },
    "res": {
        "statusCode": 404,
        "headers": {
            "x-powered-by": "Express",
            "access-control-allow-origin": "*",
            "content-security-policy": "default-src 'none'",
            "x-content-type-options": "nosniff",
            "content-type": "text/html; charset=utf-8",
            "content-length": 178,
            "vary": "Accept-Encoding"
        }
    },
    "responseTime": 3,
    "msg": "request completed"
}

@waferbaby
Copy link
Author

Oh ha, it's because I left a trailing slash on my server name - removing that lets it work! FYI.

@moll-dev
Copy link

+1 I ended up patching goat to take a hardcoded 2FA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants