URI handling on Ubuntu launches extra window #164

Closed
opened 2017-05-31 21:12:11 +02:00 by nikooo777 · 5 comments
nikooo777 commented 2017-05-31 21:12:11 +02:00 (Migrated from github.com)

The Issue

When clicking on LBRY links, a new instance of the application is launched rather than using the already existing one.

Steps to reproduce

  1. Click a LBRY link (ie. lbry://what )
  2. wait for the application to open
  3. Click the link again

Expected behaviour

The application simply opens the new link

Actual behaviour

a new application is launched (and the link is not navigated to)

System Configuration

{
  "id": null,
  "jsonrpc": "2.0",
  "result": {
    "build": "release",
    "ip": "*************",
    "lbrynet_version": "0.10.3",
    "lbryschema_version": "0.0.4",
    "lbryum_version": "2.7.22",
    "os_release": "4.8.0-52-generic",
    "os_system": "Linux",
    "platform": "Linux-4.8.0-52-generic-x86_64-with-Ubuntu-16.10-yakkety",
    "processor": "x86_64",
    "python_version": "2.7.12"
  }
}

Screenshots

https://scrn.storni.info/2017-05-31_21-09-02-722953507.png

## The Issue When clicking on LBRY links, a new instance of the application is launched rather than using the already existing one. ### Steps to reproduce 1. Click a LBRY link (ie. [lbry://what](lbry://what) ) 2. wait for the application to open 3. Click the link again ### Expected behaviour The application simply opens the new link ### Actual behaviour a new application is launched (and the link is not navigated to) ## System Configuration ``` { "id": null, "jsonrpc": "2.0", "result": { "build": "release", "ip": "*************", "lbrynet_version": "0.10.3", "lbryschema_version": "0.0.4", "lbryum_version": "2.7.22", "os_release": "4.8.0-52-generic", "os_system": "Linux", "platform": "Linux-4.8.0-52-generic-x86_64-with-Ubuntu-16.10-yakkety", "processor": "x86_64", "python_version": "2.7.12" } } ``` ## Screenshots https://scrn.storni.info/2017-05-31_21-09-02-722953507.png
alexliebowitz commented 2017-05-31 21:27:10 +02:00 (Migrated from github.com)

The part about it launching a second copy of the app is known. Electron has a built-in system for making single instance apps, and it's not behaving as expected (see #122). It's almost certainly a bug on the Electron side, and we may have to write our own system to get around it.

As to not navigating to the URI, we also got a report about that happening on Windows, so it's probably something to do with the conversion to Redux. Will check it out.

The part about it launching a second copy of the app is known. Electron has a built-in system for making single instance apps, and it's not behaving as expected (see #122). It's almost certainly a bug on the Electron side, and we may have to write our own system to get around it. As to not navigating to the URI, we also got a report about that happening on Windows, so it's probably something to do with the conversion to Redux. Will check it out.
tzarebczan commented 2017-06-12 22:22:21 +02:00 (Migrated from github.com)

@alexliebowitz any updates? @nikooo777 still having this issue.

@alexliebowitz any updates? @nikooo777 still having this issue.
btzr-io commented 2017-09-25 00:48:14 +02:00 (Migrated from github.com)

Fixed in the last version v1.7.8 :

Linux: Fixed app.makeSingleInstance hanging. #10586

https://github.com/electron/electron/releases/tag/v1.7.8

Fixed in the last version `v1.7.8` : > Linux: Fixed app.makeSingleInstance hanging. #10586 https://github.com/electron/electron/releases/tag/v1.7.8
kauffj commented 2017-09-25 18:19:33 +02:00 (Migrated from github.com)

Nice! @alexliebowitz does this just require an electron update to get working?

Nice! @alexliebowitz does this just require an electron update to get working?
alexliebowitz commented 2017-09-26 16:57:56 +02:00 (Migrated from github.com)

@kauffj: Yep. But I'm not positive that it actually fixes our problem. In the bug they fixed, app.makeSingleInstance() was just hanging for 30-60 seconds, with no mention of it always returning false. On the other hand, there's an issue more similar to ours that was merged into the same issue. So hopefully it's all the same bug. I'll try upgrading Electron and see what happens.

@kauffj: Yep. But I'm not positive that it actually fixes our problem. In the bug they fixed, `app.makeSingleInstance()` was just hanging for 30-60 seconds, with no mention of it always returning false. On the other hand, there's an [issue](https://github.com/electron/electron/issues/9576) more similar to ours that was merged into the same issue. So hopefully it's all the same bug. I'll try upgrading Electron and see what happens.
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#164
No description provided.