Skip to content

NIP-07 Signing Issues #50

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

Open
RydalWater opened this issue Feb 26, 2025 · 12 comments
Open

NIP-07 Signing Issues #50

RydalWater opened this issue Feb 26, 2025 · 12 comments

Comments

@RydalWater
Copy link
Owner

Logs in, but upon performing review or adding interests it logs the user out and doesn’t publish the event.

Have tested locally with Alby, Nostore and Nost2x (Mozilla) and appear to be working as expected.

More testing needed to identify root cause.

@yojimble reported the issue

@yojimble
Copy link

I had the issue originally with aka profiles: can login but not save the info mentioned

However on testing other signers cannot login

Image

this is with nos2x and alby on old computer running opera 95

@RydalWater
Copy link
Owner Author

this is with nos2x and alby on old computer running opera 95

So I've been testing it a bit this weekend (while making other updates, including some of your suggestions). But I was unable to replicate the issue you're having. I also spun up a new set of keys on Nost2x-fox and did the following tests:

  • I logged in using them and granted access
  • Then went over to the interests section and added some and it seemed to work (after granting access)
  • Hit the refresh button which should force a refresh of the values from the relays, which went OK as well.
  • Went back and added another item to the list which signed as expected (image below of browser log for nos2x-fox)
  • Then logged out and logged back and navigated to interests and could see all the items as expected

Image

As such I'm a little stumped as to why it is falling over for you. I wonder could you try the following:

  • Open your browser and access your extension settings
  • Revoke any items specifically related to openlibrarian.com (revoke/disconnect)

Image

Image

  • Clear the browser cache/history
  • Then try going back to the site and let me know if you get the same issue.

In the meantime I'll keep trying to replicate it on my side. Next option is to make a mirror of your profile on a new set of keys and try that to see if it works.

@yojimble
Copy link

yojimble commented Mar 4, 2025

Alrighty, did all of those things and one of them worked - interests are now added!

Buuut reviews wont save

Image button is greyed out (adding a comment doesnt change it)

@yojimble
Copy link

yojimble commented Mar 4, 2025

The home page with symbol titles is good

@yojimble
Copy link

yojimble commented Mar 4, 2025

interest were there, now they've gone and it logged me out again :/

is there a log I can run for a session and send it to you?

@RydalWater
Copy link
Owner Author

RydalWater commented Mar 4, 2025

interest were there, now they've gone and it logged me out again :/

is there a log I can run for a session and send it to you?

Dang, this is so frustrating. I actually started to seem something like these issues on my side as well. I'm not 100% sure what is happening but it took me a few goes the other day to get events updated. Even though when I ran it locally i could see the events getting created and signed without any issues. I may have to do some more testing this weekend to see if I can pin down what is actually happening, maybe I can add some more logging (there is very little currently). Funny thing is I am not seeing any errors in the logs I do have so nothing critical is falling over. I wonder if the events are getting rejected by the relays or the connections are not being established due to some relay policies.

For the reviews they are greyed out until you move the slider, as soon as you do that it is editable. I'll extend it though so that as soon as you type in the box it also activates the button.

massive apologies for messing you around, thanks for retesting, I really appreciate all the help.

@yojimble
Copy link

yojimble commented Mar 4, 2025

Dang, this is so frustrating. I actually started to seem something like these issues on my side as well. I'm not 100% sure what is happening but it took me a few goes the other day to get events updated. Even though when I ran it locally i could see the events getting created and signed without any issues. I may have to do some more testing this weekend to see if I can pin down what is actually happening, maybe I can add some more logging (there is very little currently). Funny thing is I am not seeing any errors in the logs I do have so nothing critical is falling over. I wonder if the events are getting rejected by the relays or the connections are not being established due to some relay policies.

Ah that is a great idea and reminds me I did get a POW error off nos.lol for some other app, will try different relays.

For the reviews they are greyed out until you move the slider, as soon as you do that it is editable. I'll extend it though so that as soon as you type in the box it also activates the button.

Image
Slided!

massive apologies for messing you around, thanks for retesting, I really appreciate all the help.

don't be silly :) I'm happy to help

@yojimble
Copy link

update review button appears fixed, but I'm getting publishing errors. Have added a few more relays but they dot seem to be receving the notes

@RydalWater
Copy link
Owner Author

update review button appears fixed, but I'm getting publishing errors. Have added a few more relays but they dot seem to be receving the notes

yeah I am kinda not surprised, if you press F12 on your keyboard it should open up the dev tab and if you look at the console it should show you some info, hopefully about the errors. I have a feeling it is something to do with some of your relays. I tried connecting to your relays myself and a few bugged out every time so I suspect some of them don’t accept events (like the algorithmic relay you have).

I had hoped pushing all the signing etc and authorisation to the front end would help but I think I need to figure out how to detect failed relay connections and skip them.

@yojimble
Copy link

in the console after adding a review, it gave this error:
Test Mode: false
event-coordinator.js:50 Error publishing events: nostr namespace not found

does that help at all?

@RydalWater
Copy link
Owner Author

in the console after adding a review, it gave this error: Test Mode: false event-coordinator.js:50 Error publishing events: nostr namespace not found

does that help at all?

Hi, thanks for checking in on this again. The "Test Mode: false" bit is just a flag I have so when I am building locally I don't spam the network with events so that is good. For the error pushing the events it is def interesting because it says it doesn't recognize 'nostr' and the only place that is used in the code is when connecting to your extension to set the signer.

Image

What is really bizarre is that I don't have these issues when using a signer on any of my devices. I wonder if I can perhaps add some code to get it to retry or add a delay before attempting to connect to window.nostr. Will try add something at the weekend (likely Sunday) to try this out again. Having fun currently this week (and last) with changing fiber providers and as you can imagine it isn't running smoothly hah! Still no internet means more reading time!

@RydalWater
Copy link
Owner Author

@yojimble I've added a delay + retry to help handle the Nip07 signer issues. Tentatively I hope it is sorted, but I wouldn't hold your breath just in case! When you get a min would you mind testing it out and then firing a message up here with the results.

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