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

Label not appearing #3

Closed
MisutaaAsriel opened this issue Nov 15, 2024 · 14 comments
Closed

Label not appearing #3

MisutaaAsriel opened this issue Nov 15, 2024 · 14 comments

Comments

@MisutaaAsriel
Copy link

I tried setting this up to see how easy it is to test and how hard it would be to run, but even though everything appears to be running without error, the custom label doesn't show up. At all. I've tried different mixes of label properties but it's not showing up; am I doing something wrong?

Console prints Successfully labeled did:plc:### with labelname when I like the post from another account, but nothing happens. The label is not applied.

@nulfrost
Copy link

Running into this issue as well, I'm fairly certain I did all of the steps correctly. My theory is it might be able the reverse proxy part but I'm pretty sure I've set that up correctly too

@MisutaaAsriel
Copy link
Author

MisutaaAsriel commented Nov 17, 2024

Running into this issue as well, I'm fairly certain I did all of the steps correctly. My theory is it might be able the reverse proxy part but I'm pretty sure I've set that up correctly too

In my case I wasn't even using a reverse proxy. I was using a DDNS to dynamically set a temporary URL to my IP and port forwarding my router. (Reverse proxy instructions were too confusing to use a URL.)

So I doubt this. I'm thinking APIs changed breaking support, or something else is broken or maybe undocumented. If it actually is the reverse proxy for you it would suggest something is undocumented by this project.

@imigueldiaz
Copy link

I don´t know if it's related but in my case I had to adjust main.ts asa I propose on #4 for the listener to listen on all interfaces.

@KiyoshiYoRHa
Copy link

KiyoshiYoRHa commented Nov 18, 2024

I don´t know if it's related but in my case I had to adjust main.ts asa I propose on #4 for the listener to listen on all interfaces.

I'm still new to all of this but I have tried using your suggestion. I did have to alter it to make it go through but it still seems to behaving the same as OP for me as well. Here is my alteration from your suggestion on main.ts:

labelerServer.app.listen({ port: PORT, host: "0.0.0.0" }, (error, address) => {
          if (error) console.error(error);
            else console.log(`Labeler server listening on ${address}`);
});

It's still listening to like replies and "successfully labeling" but I still don't see it on my profile. I am using a VPS provided by OVHcloud.

UPDATE: I think your alternative worked! I didn't setup my CaddyFile correctly. I put the link of my labeler handle instead of my server url.

@brettmillerb
Copy link

brettmillerb commented Nov 19, 2024

Anyone able to spell out where I need to make these changes?

I replaced

// labelerServer.start(PORT, (error, address) => {
//   if (error) {
//     logger.error('Error starting server: %s', error);
//   } else {
//     logger.info(`Labeler server listening on ${address}`);
//   }
// });

labelerServer.app.listen({ port: PORT, host: "0.0.0.0" }, (error, address) => {
  if (error) console.error(error);
    else console.log(`Labeler server listening on ${address}`);
});

Logs show the labels are being added and removed but nothing on my profile still 🤔

@MisutaaAsriel
Copy link
Author

MisutaaAsriel commented Nov 20, 2024

Even with the changes I still have no labels showing from the labeler after application. I'm not using Caddy, but a dynamic DNS (during testing, at least) to configure and test locally.

@imigueldiaz
Copy link

Anyone able to spell out where I need to make these changes?

I replaced

// labelerServer.start(PORT, (error, address) => {
//   if (error) {
//     logger.error('Error starting server: %s', error);
//   } else {
//     logger.info(`Labeler server listening on ${address}`);
//   }
// });

labelerServer.app.listen({ port: PORT, host: "0.0.0.0" }, (error, address) => {
  if (error) console.error(error);
    else console.log(`Labeler server listening on ${address}`);
});

Logs show the labels are being added and removed but nothing on my profile still 🤔

Is the Labeler server listening on ${address} log been shown? I suppose you have run bunx @skyware/labeler setup and put the correct public https address... It shows you smothing if you browse to <public_https_address>/xrpc/com.atproto.label.queryLabels ?

@imigueldiaz
Copy link

Even with the changes I still have no labels showing from the labeler after application. I'm not using Caddy, but a dynamic DNS (during testing, at least) to configure and test locally.

Is the Labeler server listening on ${address} log been shown? I suppose you have run bunx @skyware/labeler setup and put the correct public https address... It shows you smothing if you browse to <public_https_address>/xrpc/com.atproto.label.queryLabels ?

@MisutaaAsriel
Copy link
Author

MisutaaAsriel commented Nov 20, 2024

Is the Labeler server listening on ${address} log been shown? I suppose you have run bunx @skyware/labeler setup and put the correct public https address... It shows you smothing if you browse to <public_https_address>/xrpc/com.atproto.label.queryLabels ?

Actually, attempting to query via HTTPS returned an error The server certificate is invalid: Write EPROTO 5148738136:error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER:../../third_party/boringssl/src/ssl/tls_record.cc:242:

I can query via HTTP though fine. I did run the setup.

specifically, I can run a GET at the endpoint using http://<public_http_address>:4100/xrpc/com.atproto.label.queryLabels but trying to use https://<public_https_address>:4100/xrpc/com.atproto.label.queryLabels results in an SSL error which suggest I am querying an HTTP endpoint via HTTPS.

@MisutaaAsriel
Copy link
Author

Ok so I still need a reverse proxy, DDNS was not enough.

I found easier instructions to follow with caddy and was able to successfully get it working.

The lack of log or console output is annoying though.

Consider this resolved

@brettmillerb
Copy link

brettmillerb commented Nov 20, 2024

Anyone able to spell out where I need to make these changes?
I replaced

// labelerServer.start(PORT, (error, address) => {
//   if (error) {
//     logger.error('Error starting server: %s', error);
//   } else {
//     logger.info(`Labeler server listening on ${address}`);
//   }
// });

labelerServer.app.listen({ port: PORT, host: "0.0.0.0" }, (error, address) => {
  if (error) console.error(error);
    else console.log(`Labeler server listening on ${address}`);
});

Logs show the labels are being added and removed but nothing on my profile still 🤔

Is the Labeler server listening on ${address} log been shown? I suppose you have run bunx @skyware/labeler setup and put the correct public https address... It shows you smothing if you browse to <public_https_address>/xrpc/com.atproto.label.queryLabels ?

image

My fork:
https://github.com/brettmillerb/ao3-bsky-labeler

I think I had it working at one point where it showed on my profile but wasn't showing on my posts
image

Apologies for the naive questions, I've never used Typescript before but getting there.

/etc/caddy/Caddyfile

epl.millerb.co.uk {
	reverse_proxy localhost:4100

	# Or serve a PHP site through php-fpm:
	# php_fastcgi localhost:9000
}

I tailed the logs for caddy which wasn't throwing any errors so looks like it's forward to port 4100 correctly when the app is running.

@imigueldiaz an pointers on what I'm missing? I think it's something obvious.

One thing, which may or may not be valid. When I attempted to run the project as-is I received the following error:
image

So I added the import and property as recommended by the error but I can't see that change on any of the other forks of this repo.

@imigueldiaz
Copy link

@imigueldiaz an pointers on what I'm missing? I think it's something obvious.

One thing, which may or may not be valid. When I attempted to run the project as-is I received the following error: image

So I added the import and property as recommended by the error but I can't see that change on any of the other forks of this repo.

I believe that on my multiples tries it was due to a wrong node version inferior to the recommended one (I'm not a developer of this project, only of my fork of the template)

@brettmillerb
Copy link

@imigueldiaz an pointers on what I'm missing? I think it's something obvious.
One thing, which may or may not be valid. When I attempted to run the project as-is I received the following error: image
So I added the import and property as recommended by the error but I can't see that change on any of the other forks of this repo.

I believe that on my multiples tries it was due to a wrong node version inferior to the recommended one (I'm not a developer of this project, only of my fork of the template)

Hmmm yeah I'm on v18.....good shout! 🤦‍♂️

@brettmillerb
Copy link

Okay so I rebuilt my VM from scratch, installed all the deps as required and node 21.

Went through the labeler setup again too which now appears to work, receives the post likes and labels the account according to the app

image

Labels are showing at the URI now too:
https://epl.millerb.co.uk/xrpc/com.atproto.label.queryLabels

Label doesn't appear on my account though when subscribed and liking the post.
image

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

Successfully merging a pull request may close this issue.

5 participants