Error when clicking LBRY URLs when app is closed on macOS #1119

Closed
opened 2018-03-17 22:49:29 +01:00 by tzarebczan · 1 comment
tzarebczan commented 2018-03-17 22:49:29 +01:00 (Migrated from github.com)

The Issue

If LBRY is closed and a LBRY hyperlink is clicked, the app opens but errors out on Mac. See below
screen_shot_2018-03-06_at_10 47 30_am

A similar issue was fixed here:
eeda7c17c5
and here:
a29688c1a5

Works fine if the app is open.

Steps to reproduce

  1. Make sure LBRY is closed
  2. Click LBRY URL from email or: https://open/lbry.io/test
  3. Error

System Configuration

  • LBRY Daemon version:
  • LBRY App version:
  • LBRY Installation ID:
  • Operating system:

Anything Else

Screenshots

<!-- Thanks for reporting an issue to LBRY and helping us improve! To make it possible for us to help you, please fill out below information carefully. Before reporting any issues, please make sure that you're using the latest version. - App releases: https://github.com/lbryio/lbry-app/releases - Standalone daemon: https://github.com/lbryio/lbry/releases We are also available on live chat at https://chat.lbry.io --> ## The Issue If LBRY is closed and a LBRY hyperlink is clicked, the app opens but errors out on Mac. See below <img width="419" alt="screen_shot_2018-03-06_at_10 47 30_am" src="https://user-images.githubusercontent.com/8120721/37560181-44e60e6c-2a0a-11e8-99c3-0a045eb52dc4.png"> A similar issue was fixed here: https://github.com/mathiasvr/webtorrent-desktop/commit/eeda7c17c5b1fc3923bf83b7b9032e26b9dec7c0 and here: https://github.com/keeweb/keeweb/commit/a29688c1a5e019d03008699638cf1cf6f8e3fe65 Works fine if the app is open. ### Steps to reproduce 1. Make sure LBRY is closed 2. Click LBRY URL from email or: https://open/lbry.io/test 3. Error ## System Configuration <!-- For the app, this info is in the About section at the bottom of the Help page. You can include a screenshot instead of typing it out --> <!-- For the daemon, run: curl 'http://localhost:5279' --data '{"method":"version"}' and include the full output --> - LBRY Daemon version: - LBRY App version: - LBRY Installation ID: - Operating system: ## Anything Else <!-- Include anything else that does not fit into the above sections --> ## Screenshots <!-- If a screenshot would help explain the bug, please include one or two here -->
tzarebczan commented 2018-03-18 21:52:03 +01:00 (Migrated from github.com)

On the latest RC, the error is which is happening because the window isn't rendered before it's called.
rc mac

I'm taking a look at how this process was refactored. So far this is what I can tell:

  1. there's a URL handler in index.js which says it's only for the mac and another piece of code in isSecondInstance
  2. The other URL calls are in createWindow.js but they would only work on Windows since deepLinkingURI is only populated for win32. This is probably what allows for links when LBRY is closed.

Looks like the handler in isSecondInstance allows it to function properly on Windows. The Mac protocol handler fails if the app is closed (this ticket). Opened a separate issue for Linux (https://github.com/lbryio/lbry-app/issues/1120) but I can see why it wouldn't work based on the current code - uri is never set (easy fix in isSecondInstance but then run into the same issue as this ticket).

We should have a single function handle all URL opening which would handle cases of the app being open/closed and the Windows regex.

On the latest RC, the error is which is happening because the window isn't rendered before it's called. ![rc mac](https://user-images.githubusercontent.com/8120721/37570361-4ffde6a6-2ac5-11e8-8fc1-2684b7a5735e.png) I'm taking a look at how this process was refactored. So far this is what I can tell: 1) there's a URL handler in index.js which says it's only for the mac and another piece of code in isSecondInstance 2) The other URL calls are in createWindow.js but they would only work on Windows since deepLinkingURI is only populated for win32. This is probably what allows for links when LBRY is closed. Looks like the handler in isSecondInstance allows it to function properly on Windows. The Mac protocol handler fails if the app is closed (this ticket). Opened a separate issue for Linux (https://github.com/lbryio/lbry-app/issues/1120) but I can see why it wouldn't work based on the current code - uri is never set (easy fix in isSecondInstance but then run into the same issue as this ticket). We should have a single function handle all URL opening which would handle cases of the app being open/closed and the Windows regex.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbry-desktop#1119
No description provided.