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

census command returns HTTP 404 #13

Open
paul-bell opened this issue Nov 28, 2024 · 5 comments
Open

census command returns HTTP 404 #13

paul-bell opened this issue Nov 28, 2024 · 5 comments

Comments

@paul-bell
Copy link

Greetings, and thank you for this project.

Please know at the outset that I have no Go programming experience, and that I am only now learning a bit about BlueSky. But, at least in the Node.js world, I've been able to use agent.com.atproto.sync.listRepos to get user repositories.

I'm not sure what I am doing wrong in the census commands shown below (one that passes the default pds endpoint, the other that does not). But it appears that a successful census is a prerequisite for running the pull command in which I am most interested.

I am grateful for any light you can shed on this problem; thanks again.

Cordially,

Paul

PS C:\paul\skyfall> go run cmd/main.go census --pds-endpoint https://bsky.network --output-file /paul/census.jsonl
2024/11/28 09:00:45 [DEBUG] GET https://bsky.network/xrpc/com.atproto.sync.listRepos?cursor=&limit=1000
time="2024-11-28T09:00:46-05:00" level=fatal msg="Failed to get list of repos: XRPC ERROR 404: Not Found: "
exit status 1

PS C:\paul\skyfall> go run cmd/main.go census --output-file /paul/census.jsonl
2024/11/28 09:00:56 [DEBUG] GET https://bsky.network/xrpc/com.atproto.sync.listRepos?cursor=&limit=1000
time="2024-11-28T09:00:57-05:00" level=fatal msg="Failed to get list of repos: XRPC ERROR 404: Not Found: "
exit status 1
@paul-bell
Copy link
Author

So as to bypass use of the census command, I tried to create my own census.jsonl file (please see example below), but it fails as follows:

time="2024-11-29T09:13:55-05:00" level=info msg="Found identity: &{DID:did:plc:e772myiac2zkoae44lxfxzmo Handle:pmb99.bsky.social AlsoKnownAs:[at://pmb99.bsky.social] Services:map[atproto_pds:{Type:AtprotoPersonalDataServer URL:https://coral.us-east.host.bsky.network}] Keys:map[atproto:{Type:Multikey PublicKeyMultibase:zQ3shwJKuymuZcW8ibcQer7E2WxhQX9FxX61QqWDbDSfpySvH}]}"
time="2024-11-29T09:13:55-05:00" level=info msg="Authenticating with PDS endpoint: https://coral.us-east.host.bsky.network"
2024/11/29 09:13:55 [DEBUG] POST https://coral.us-east.host.bsky.network/xrpc/com.atproto.server.createSession
2024/11/29 09:13:55 [DEBUG] POST https://coral.us-east.host.bsky.network/xrpc/com.atproto.server.refreshSession
time="2024-11-29T09:13:55-05:00" level=info msg="output-file specified, so writing output to file: output.jsonl"
time="2024-11-29T09:13:55-05:00" level=info msg="Failed to decode census file line : json: cannot unmarshal array into Go value of type census.CensusFileEntry"
time="2024-11-29T09:13:55-05:00" level=error msg="Downloading ended unexpectedly: json: cannot unmarshal array into Go value of type census.CensusFileEntry"
time="2024-11-29T09:13:55-05:00" level=info msg="Shutting down on context done"

Can you please tell me what is wrong with the structure of my census file?

Thanks again.

[
 {"Did":"did:plc:aiuc2v5nww7kz2wnmb2dipv5","Head":"bafyreihnzjgmmuan42jdwa7skbpkcqdedf5teunaa3sdssgosc6242spje","Rev":"3l3y3vjdpvc2c"},
 {"Did":"did:plc:bbkcogpai65c5wh64nnzo5zd","Head":"bafyreiagk2mosudehhwcf5jfmiziv2von6u6xv6zdqs4q6tichtatnrv7u","Rev":"3l3y7bxka6c2f"}
]

@lxcode
Copy link
Contributor

lxcode commented Dec 11, 2024

I haven't actually used the census functionality; @milesmcc does anything look wrong here in how it's getting invoked?

@paul-bell
Copy link
Author

@lxcode: thank you for your response. I do remain interested in getting this to work. Waiting to hear what @milesmcc says.

@milesmcc
Copy link
Collaborator

Taking a look now. census should work.

@milesmcc
Copy link
Collaborator

Odd. Still listed here, but I agree https://bsky.network/xrpc/com.atproto.sync.listRepos?cursor=&limit=1000 is 404'ing.

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

3 participants