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

goat: refresh access token if it expires during migration #898

Open
mackuba opened this issue Jan 6, 2025 · 2 comments
Open

goat: refresh access token if it expires during migration #898

mackuba opened this issue Jan 6, 2025 · 2 comments

Comments

@mackuba
Copy link

mackuba commented Jan 6, 2025

Earlier this week I ran a migration of my main account to my PDS using goat. When I ran goat account migrate, it migrated some things and then started downloading & uploading blobs, which went on for 2 hours, and ended this way:

2025/01/02 20:49:19 INFO transferred blob cid=bafkreihldh3yy4y3oc4f5sjyi4c5i75cqgakzhe3czoy4tvd7iudtiiriy size=108518
2025/01/02 20:49:22 INFO transferred blob cid=bafkreihlfgmszbhuimpb26vhsjmor3o7zzowzc7xggtrtmwc4d4yth74ge size=443370
2025/01/02 20:49:25 INFO transferred blob cid=bafkreihlgjxm2lq4apsj7jub4nf6xw2mquaf52cgtrkulgh2cqqdxlemiq size=493005
2025/01/02 20:49:28 INFO transferred blob cid=bafkreihliwv5w3vjeoloyigqney3ludkf236vse5fli23dh76jba7yxzjm size=898579
2025/01/02 20:49:30 INFO transferred blob cid=bafkreihlkbjhjwbznj2qhh4znrflnhlz6hodu6wikys5flclcc5p7hdkni size=348192
2025/01/02 20:49:32 INFO transferred blob cid=bafkreihlofiutrw4aoio5fryvcuewy22o6fimql4mmhp7hdap3yczt3xby size=275461
2025/01/02 20:49:34 INFO transferred blob cid=bafkreihls3zsotdkmq2jd3qwxficwsxncwgfea5czqs6sjw7dpm574eavy size=119222
2025/01/02 20:49:37 INFO transferred blob cid=bafkreihlwvgiq6whekdrzj5cbdqhy6o7c23ybnfktfqa7sbkbyx6xoqy64 size=310308
2025/01/02 20:49:42 WARN failed downloading blob cid=bafkreihlx3l5rkvqp2s42djszhsg5aprjeqxstiy5fw4xlim6avu64w3v4 err="XRPC ERROR 400: ExpiredToken: Token has expired"
2025/01/02 20:49:43 WARN failed downloading blob cid=bafkreihlxwvszecyjy25gmranyonrlhkhj53tfdo7f7tglilw7rj4pijxa err="XRPC ERROR 400: ExpiredToken: Token has expired"
2025/01/02 20:49:44 WARN failed downloading blob cid=bafkreihly65rdacqkki6x23xbei6fwkfuqrvg5fv4emsayfbi52sgz4zem err="XRPC ERROR 400: ExpiredToken: Token has expired"
2025/01/02 20:49:44 WARN failed downloading blob cid=bafkreihm4t5aljnhty25ebznnksxkqcngtcllypoh5lny4cldnwy2nptyq err="XRPC ERROR 400: ExpiredToken: Token has expired"
2025/01/02 20:49:45 WARN failed downloading blob cid=bafkreihm4zw5437x6yo3sbruh6ioc2en37oh4qgdqawyf6x2dcxqwm7ivy err="XRPC ERROR 400: ExpiredToken: Token has expired"
2025/01/02 20:49:49 WARN failed downloading blob cid=bafkreihm6vol6nfjp5r4he3ikdim7mhzlz2lw4kvjvrvhr756hdut6qf44 err="XRPC ERROR 400: ExpiredToken: Token has expired"
2025/01/02 20:49:50 WARN failed downloading blob cid=bafkreihm6yrasvwop3igtobvv5gyeceklnri342belxhovbklmlgvwathm err="XRPC ERROR 400: ExpiredToken: Token has expired"
2025/01/02 20:49:54 WARN failed downloading blob cid=bafkreihmbx5m4cyerpnybgmzklp2xappl5i4gyakcg2lzu2puoew7psyka err="XRPC ERROR 400: ExpiredToken: Token has expired"
2025/01/02 20:49:58 WARN failed downloading blob cid=bafkreihmc6ic42phbhsj6rtwhdmo5qffwbvmeyg2gbknuictddrqcdhoxq err="XRPC ERROR 400: ExpiredToken: Token has expired"
2025/01/02 20:49:58 WARN failed downloading blob cid=bafkreihmeezr23xx7m3cw5p7ss36lrzvcviuoh6pnefn5liwjxe2cqdowi err="XRPC ERROR 400: ExpiredToken: Token has expired"
error: failed listing blobs: XRPC ERROR 400: ExpiredToken: Token has expired
kuba@Zeratul indigo % 

I wasn't sure if I can just restart it to continue, so I finished the migration manually.

I think goat should try to automatically refresh the token if the migration takes more than 2 hours, which it can if the account has many blobs (mine had ~3400).

@bnewbold
Copy link
Collaborator

bnewbold commented Jan 6, 2025

the longer-term plan for this is to have an API client which automatically handles token refreshes

@bnewbold
Copy link
Collaborator

bnewbold commented Jan 6, 2025

also, congrats on your account migration!

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

2 participants