Comments (7)
Sounds strange...
Could you please check the value of the process.env.PATH
, process.env.Path
, process.env.path
variables? Also see this line...
Start the application with --remote-debugging-port=8888
and open up http://localhost:8888
to do this.
The node-webkit version has changed since the v0.5.0 release from 0.10.1
to 0.10.4
, so the issue might be in the old nw version.
from streamlink-twitch-gui.
I'm trying to get the value of process.env.PATH
et. al. but requirejs minifies the file so that I can't get in to place a breakpoint (even after trying chrome's formatter), and even littering which.js
with console.log
statements doesn't seem to output anything. I must be something wrong. How are you supposed to work on this application? It seems kind of weird to have to create a build and run the node-webkit binary from inside the app bundle on the src
directory, but I can't seem to find any obvious grunt tasks to launch it with debugging set up.
from streamlink-twitch-gui.
Alright, I installed the nodewebkit
package globally and tried running the src
directory with it. Lots of resources are broken and stuff, but I did get the value of PATHS
:
0: "/usr/local/bin"
1: "/usr/bin"
2: "/bin"
3: "/usr/sbin"
4: "/sbin"
5: "/usr/local/opt/go/libexec/bin"
6: "/usr/bin"
7: "/bin"
8: "/usr/sbin"
9: "/sbin"
10: "/usr/local/bin"
11: "/usr/local/opt/go/libexec/bin"
As suspected, running the latest version from the repo does have the correct path. I'm trying to check the values from the installed version, but since I can't seem to get any breakpoints in there, it's proving to be challenging.
EDIT: Got the info by modifying the minified source in the installed app bundle.
0: "/usr/bin"
1: "/bin"
2: "/usr/sbin"
3: "/sbin"
I guess this might have been a bug with the old version of node-webkit, then.
from streamlink-twitch-gui.
I've just tested it with all v0.10.x node-webkit versions and it's still not working properly. 😞
Like you've mentioned, it's working after launching the application via the bash and using the open command, but it doesn't if you open it via the finder or dock. The value of process.env.PATH
then is /usr/bin:/bin:/usr/sbin:/sbin
instead of the expected /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
.
So is this really a node-webkit bug or is this intended behavior of OSX? (I don't use it, so I don't know...)
How can this be fixed? Simply adding the /usr/local/bin
path could make it work, but this is a bit dirty.
from streamlink-twitch-gui.
It seems that apps launched through spotlight or the dock don't read environment variables from the normal places (.profile
, .bash_profile
, etc.), so $PATH
is just set to whatever the default is. I guess it's intended (why, I don't know...), not a bug.
However, from what I've been able to gather from some quick googling, it seems you can set environment variables from within app bundles by declaring them in an Info.plist
file. For node-webkit apps, that file should be in Contents/Info.plist
, more info here. This answer on Stack Overflow mentions how to set the PATH variable.
The issue is that there's no way to read the path from any of the sane places, so I'm guessing the least intrusive way would be to create a list of common places where it could be installed and add that to a separate environment variable (LIVESTREAMER_TWITCH_GUI_PATH
or something) and read that if available.
Now, I think you'd still want to read from the normal path as well, so maybe this line will have to change, since it only reads from the first available environment variable:
PATH = process.env.PATH || process.env.Path || process.env.path || "."
Maybe instead you could read from all of them (plus your own), filter out the duplicates and go from there?
I'd be willing to help you out, if I knew how the development workflow was set up, but I'm going to be very busy all week, so I'll likely not have any opportunity until next weekend. I'll be checking my notifications though, so I'll try to be around to test things or maybe try implementing something as soon as I have the time.
from streamlink-twitch-gui.
Thanks for offering your help, much appreciated!
I think the right way of fixing this issue would be changing the Info.plist
and adding the needed LSEnvironment
data. I don't want to change the code itself, because it's just an osx related issue and things don't need to be unnecessarily messy here.
It's a little bit sad that you can't read the user specific $PATH and prepend/append your path to it. But I think /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
should be good enough, since we're just looking for the livestreamer executable.
The problem I ran into so far is the way node-webkit-builder
deals with a custom plist. You're able to define a custom one instead of generating one off the blank node-webkit app, but then you also need to provide all the other stuff. That's not what I want to do, I just want to add one (nested) key-value pair. So I guess I need to make another pull request over there.
from streamlink-twitch-gui.
I'm still waiting for a merge at nwutils/nw-builder#96...
My forked repositories will be used as build dependency until then.
from streamlink-twitch-gui.
Related Issues (20)
- Audio stuttering while streaming HOT 3
- On small windows below minimum width, horizontal scroll is broken if there's vertical one HOT 6
- Streamlink is unable to get an access token for watching streams
- Since today I can no longer watch streams via Streamlink Twitch Gui. It comes when starting any stream the following error: HOT 1
- macOS arm64 builds (Apple M1, etc.) HOT 1
- New release HOT 1
- any variable other than {name} doesn't work with "--sout" in VLC HOT 5
- Windows 7 caveat missing from last release as it's not supported (due to nw.js) HOT 7
- Compact GUI/ Channel Specific Player Args
- VLC config paramter no longer working after updating to v2.3.0 HOT 2
- Followed channels menu broken (`/helix/users/follows` API endpoint removal 2023-09-06 / 2023-09-12) HOT 2
- Layout issues with misalignment and empty spaces in the followed channels page HOT 3
- Channel search results and team members list broken since 2.4.0
- Request to run on windows 7 HOT 1
- Enable app native key binding for router component refresh on macOS HOT 2
- TODO: replace istanbul-js with native v8 code coverage
- kill streamlink-gui if already open and try to open it again HOT 2
- Import/Export Configuration HOT 2
- Could there be an option to ALLOW advertisements? Long total silences during watching not nice HOT 2
- [Closed thread, more info] "Could there be an option to ALLOW advertisements?" Ublock Origin prevents ads on Twitch.tv! HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from streamlink-twitch-gui.