-
Notifications
You must be signed in to change notification settings - Fork 288
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
Bug: cannot add relays #2293
Comments
@danieldaquino I seem to remember this was an issue previously - where relays could not be added. Is this a regression? |
Would first aid help here with restoring working relays? |
Please do not use First Aid (yet), or you will lose your follow list. I will try to repro your issue and see if I can find any workarounds to get your account working again. |
Reproduced. Finding a workaround |
@alltheseas one workaround that worked for me was to delete and reinstall Damus. This is probably the fastest workaround. You would lose bookmarks if you did this, though. If you don't want to lose bookmarks, I can prioritize creating a new first aid option (or a full fix if time permits). Are you ok with reinstalling or do you prefer to wait a bit more for the first-aid/fix? |
Works now, thanks. what was the cause? |
|
Found it /// This loads the latest contact event we have on file from NostrDB. This should be called as soon as we get the new DamusState
/// Loading the latest contact list event into our `Contacts` instance from storage is important to avoid getting into weird states when the network is unreliable or when relays delete such information
func load_latest_contact_event_from_damus_state() {
guard let latest_contact_event_id_hex = damus_state.settings.latest_contact_event_id_hex else { return }
guard let latest_contact_event_id = NoteId(hex: latest_contact_event_id_hex) else { return }
guard let latest_contact_event: NdbNote = damus_state.ndb.lookup_note( latest_contact_event_id)?.unsafeUnownedValue?.to_owned() else { return }
process_contact_event(state: damus_state, ev: latest_contact_event)
damus_state.contacts.delegate = self // Here
} Unless the user signs up after #2057 changes, this delegate will never be set, which means |
On Fri, Jun 14, 2024 at 12:20:30PM GMT, Daniel D’Aquino wrote:
Found it
```swift
/// This loads the latest contact event we have on file from NostrDB. This should be called as soon as we get the new DamusState
/// Loading the latest contact list event into our `Contacts` instance from storage is important to avoid getting into weird states when the network is unreliable or when relays delete such information
func load_latest_contact_event_from_damus_state() {
guard let latest_contact_event_id_hex = damus_state.settings.latest_contact_event_id_hex else { return }
guard let latest_contact_event_id = NoteId(hex: latest_contact_event_id_hex) else { return }
guard let latest_contact_event: NdbNote = damus_state.ndb.lookup_note( latest_contact_event_id)?.unsafeUnownedValue?.to_owned() else { return }
process_contact_event(state: damus_state, ev: latest_contact_event)
damus_state.contacts.delegate = self // Here
}
```
Unless the user signs up after #2057 changes, this delegate will never be set, which means `latest_contact_event_changed` will never get called. This line needs to be moved up probably
awesome, thanks for digging into this!
|
What happens
When I remove all relays but one, and I try to add I cannot successfully add a relay.
What I expect to happen
I expect to be able to add relays.
** Versions **
Damus version: 1.9 (7)
Steps to reproduce the behavior:
The text was updated successfully, but these errors were encountered: