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

Bug: opening URL works intermittently #2429

Closed
danieldaquino opened this issue Sep 6, 2024 · 11 comments
Closed

Bug: opening URL works intermittently #2429

danieldaquino opened this issue Sep 6, 2024 · 11 comments
Assignees
Labels
bug Something is not working, or not working as intended push-notifications

Comments

@danieldaquino
Copy link
Contributor

danieldaquino commented Sep 6, 2024

What happens
When I click on Nostr URLs or on push notifications, the client intermittently does not open the url

What I expect to happen
I expect URLs to be opened flawlessly (if it cannot find an event right away, it should retry or show a loading screen)

Link to noteID, npub
N/A

Screenshots/video recording
N/A

Versions

Damus version: At least 1.10
Operating system version: At least iOS 17+
Device: Any

Steps To Reproduce
Steps to reproduce the behavior:

  1. Tap on push notifications
  2. Tap on damus links

Additional context

  • The solution may include some form of queuing
@danieldaquino danieldaquino added bug Something is not working, or not working as intended Needs recreation Issues requires concrete steps for recreation and removed Needs recreation Issues requires concrete steps for recreation labels Sep 6, 2024
@danieldaquino danieldaquino changed the title Bug: Bug: opening URL works intermittently Sep 6, 2024
@danieldaquino
Copy link
Contributor Author

@jb55 @alltheseas I am working on this one as it's pretty serious and it becomes a more visible issue when we rollout push notifications

@danieldaquino
Copy link
Contributor Author

Sorry @jb55 and @alltheseas, I started a draft on Friday for this but forgot about it until now, and ended up doing #751 instead 🤦‍♂️

I will continue working on this next! (Or please let me know if something more urgent comes up)

@danieldaquino
Copy link
Contributor Author

Descoping this from 1.10.

I paused my work on this ticket. For anyone who picks this up, here is the draft I was working on https://github.com/danieldaquino/damus/tree/%232429

@jb55 jb55 assigned jb55 and unassigned danieldaquino Oct 14, 2024
@jb55 jb55 added this to the 1.11 - lists milestone Oct 14, 2024
@jb55 jb55 moved this to Planned in Damus Roadmap 🛣️ Oct 14, 2024
@danieldaquino danieldaquino assigned danieldaquino and unassigned jb55 Dec 19, 2024
@danieldaquino danieldaquino moved this from Planned to In Progress in Damus Roadmap 🛣️ Jan 8, 2025
danieldaquino added a commit to danieldaquino/damus that referenced this issue Jan 9, 2025
This commit improves reliability on the handling of
external URLs.

This was achieved through the following improvements:
1. The URL handler interface is now well-defined, with more clear inputs
   and outputs, to avoid silent failures and error paths that are hard to see
   within convoluted logic paths
2. Side effects during URL parsing were almost completely removed for
   more predictable behavior
3. Error handling logic was added to present errors to the user in a user-friendly manner,
   instead of silently failing
4. Event loading logic was moved into a special new thread view, which
   makes its own internal state evident to the user (i.e. whether
   the note is loading, loaded, or if the note could not be found)

These changes make the URL opening logic more predictable, easy to
refactor, and helps ensure the user always gets some outcome from
opening a URL, even if it means showing a "not found" or "error" screen,
to eliminate cases where nothing seems to happen.

Closes: damus-io#2429
Changelog-Fixed: Improved robustness of the URL handler
Signed-off-by: Daniel D’Aquino <[email protected]>
danieldaquino added a commit to danieldaquino/damus that referenced this issue Jan 9, 2025
This commit improves reliability on the handling of
external URLs.

This was achieved through the following improvements:
1. The URL handler interface is now well-defined, with more clear inputs
   and outputs, to avoid silent failures and error paths that are hard to see
   within convoluted logic paths
2. Side effects during URL parsing were almost completely removed for
   more predictable behavior
3. Error handling logic was added to present errors to the user in a user-friendly manner,
   instead of silently failing
4. Event loading logic was moved into a special new thread view, which
   makes its own internal state evident to the user (i.e. whether
   the note is loading, loaded, or if the note could not be found)

These changes make the URL opening logic more predictable, easy to
refactor, and helps ensure the user always gets some outcome from
opening a URL, even if it means showing a "not found" or "error" screen,
to eliminate cases where nothing seems to happen.

Closes: damus-io#2429
Changelog-Fixed: Improved robustness of the URL handler
Changelog-Added: Added user-friendly error view for errors around the app that would not fit in other places
Signed-off-by: Daniel D’Aquino <[email protected]>
danieldaquino added a commit to danieldaquino/damus that referenced this issue Jan 9, 2025
This commit improves reliability on the handling of
external URLs.

This was achieved through the following improvements:
1. The URL handler interface is now well-defined, with more clear inputs
   and outputs, to avoid silent failures and error paths that are hard to see
   within convoluted logic paths
2. Side effects during URL parsing were almost completely removed for
   more predictable behavior
3. Error handling logic was added to present errors to the user in a user-friendly manner,
   instead of silently failing
4. Event loading logic was moved into a special new thread view, which
   makes its own internal state evident to the user (i.e. whether
   the note is loading, loaded, or if the note could not be found)

These changes make the URL opening logic more predictable, easy to
refactor, and helps ensure the user always gets some outcome from
opening a URL, even if it means showing a "not found" or "error" screen,
to eliminate cases where nothing seems to happen.

Closes: damus-io#2429
Changelog-Fixed: Improved robustness of the URL handler
Changelog-Added: Added user-friendly error view for errors around the app that would not fit in other places
Signed-off-by: Daniel D’Aquino <[email protected]>
danieldaquino added a commit to danieldaquino/damus that referenced this issue Jan 9, 2025
This commit improves reliability on the handling of
external URLs.

This was achieved through the following improvements:
1. The URL handler interface is now well-defined, with more clear inputs
   and outputs, to avoid silent failures and error paths that are hard to see
   within convoluted logic paths
2. Side effects during URL parsing were almost completely removed for
   more predictable behavior
3. Error handling logic was added to present errors to the user in a user-friendly manner,
   instead of silently failing
4. Event loading logic was moved into a special new thread view, which
   makes its own internal state evident to the user (i.e. whether
   the note is loading, loaded, or if the note could not be found)

These changes make the URL opening logic more predictable, easy to
refactor, and helps ensure the user always gets some outcome from
opening a URL, even if it means showing a "not found" or "error" screen,
to eliminate cases where nothing seems to happen.

Closes: damus-io#2429
Changelog-Fixed: Improved robustness of the URL handler
Changelog-Added: Added user-friendly error view for errors around the app that would not fit in other places
Signed-off-by: Daniel D’Aquino <[email protected]>
danieldaquino added a commit to danieldaquino/damus that referenced this issue Jan 9, 2025
This commit improves reliability on the handling of
external URLs.

This was achieved through the following improvements:
1. The URL handler interface is now well-defined, with more clear inputs
   and outputs, to avoid silent failures and error paths that are hard to see
   within convoluted logic paths
2. Side effects during URL parsing were almost completely removed for
   more predictable behavior
3. Error handling logic was added to present errors to the user in a user-friendly manner,
   instead of silently failing
4. Event loading logic was moved into a special new thread view, which
   makes its own internal state evident to the user (i.e. whether
   the note is loading, loaded, or if the note could not be found)

These changes make the URL opening logic more predictable, easy to
refactor, and helps ensure the user always gets some outcome from
opening a URL, even if it means showing a "not found" or "error" screen,
to eliminate cases where nothing seems to happen.

Closes: damus-io#2429
Changelog-Fixed: Improved robustness of the URL handler
Changelog-Added: Added user-friendly error view for errors around the app that would not fit in other places
Signed-off-by: Daniel D’Aquino <[email protected]>
danieldaquino added a commit to danieldaquino/damus that referenced this issue Jan 9, 2025
This commit improves reliability on the handling of
external URLs.

This was achieved through the following improvements:
1. The URL handler interface is now well-defined, with more clear inputs
   and outputs, to avoid silent failures and error paths that are hard to see
   within convoluted logic paths
2. Side effects during URL parsing were almost completely removed for
   more predictable behavior
3. Error handling logic was added to present errors to the user in a user-friendly manner,
   instead of silently failing
4. Event loading logic was moved into a special new thread view, which
   makes its own internal state evident to the user (i.e. whether
   the note is loading, loaded, or if the note could not be found)

These changes make the URL opening logic more predictable, easy to
refactor, and helps ensure the user always gets some outcome from
opening a URL, even if it means showing a "not found" or "error" screen,
to eliminate cases where nothing seems to happen.

Closes: damus-io#2429
Changelog-Fixed: Improved robustness of the URL handler
Changelog-Added: Added user-friendly error view for errors around the app that would not fit in other places
Signed-off-by: Daniel D’Aquino <[email protected]>
@danieldaquino
Copy link
Contributor Author

@alltheseas, @jb55, I sent a patch via email to resolve this!

Please let me know if there are any suggestions, questions, or concerns.
Thank you!

@danieldaquino danieldaquino moved this from In Progress to In Review in Damus Roadmap 🛣️ Jan 10, 2025
@jb55
Copy link
Collaborator

jb55 commented Jan 10, 2025 via email

@danieldaquino
Copy link
Contributor Author

danieldaquino commented Jan 12, 2025 via email

@jb55
Copy link
Collaborator

jb55 commented Jan 12, 2025 via email

@danieldaquino
Copy link
Contributor Author

danieldaquino commented Jan 13, 2025 via email

@jb55
Copy link
Collaborator

jb55 commented Jan 13, 2025 via email

@danieldaquino
Copy link
Contributor Author

danieldaquino commented Jan 15, 2025 via email

@danieldaquino
Copy link
Contributor Author

danieldaquino commented Jan 17, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working, or not working as intended push-notifications
Projects
Status: Done
Development

No branches or pull requests

3 participants