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

Stream launch failure #637

Closed
2 tasks done
GenesisFR opened this issue Apr 26, 2019 · 9 comments
Closed
2 tasks done

Stream launch failure #637

GenesisFR opened this issue Apr 26, 2019 · 9 comments
Labels

Comments

@GenesisFR
Copy link

GenesisFR commented Apr 26, 2019

Bug report

  • I understand the difference between Streamlink and Streamlink Twitch GUI.
  • This is a bug report and I have read the contribution guidelines.

Environment details

Operating system and version: Windows 10 x64 1809

Streamlink Twitch GUI version: 1.7.1

Streamlink version: 1.1

Configuration details: English language

Description

There's a missing translation in the quality drop-down menu when opening a stream. I can't tell what's the missing translation as the string is cut out.

Expected / Actual behavior

It should say something like "Quality" or not be displayed at all.

Reproduction steps

I can't reproduce it as I was randomly browsing streams. Tried to open the same streams again, multiple streams at the same time or cancelling them. What's weird is that the window in the attached screenshot doesn't have any information about a stream.

Log output

REPLACE THIS TEXT WITH THE LOG OUTPUT

Additional comments, screenshots, etc.

When upgrading from portable 1.7.0, I drag and dropped the content of streamlink-twitch-gui-v1.7.1-win64.zip over my Twitch GUI directory and replaced all files.

image

@bastimeyer
Copy link
Member

The issue is not a missing translation, but rather an error while trying to initialize the stream-launch sequence which is not covered by the regular error flow. You're only seeing the missing translation text because the drop-down needs the quality selection from the active stream record in order to show the correct text, and this data doesn't exist for some reason, same as the other stuff like the channel name, stream title, etc.

Could you please see if an error got logged in the log files or if it gets logged to stderr while the app is running?
On Windows, the log dir is here: %TMPDIR%\streamlink-twitch-gui\logs
https://github.com/streamlink/streamlink-twitch-gui/wiki/Parameters

I can't reproduce it as I was randomly browsing streams.

Could you please be a bit more specific what exactly you were doing since the application start? Which channels were you trying to watch? Do you have custom settings set for the channels you're trying to watch?

@bastimeyer bastimeyer changed the title Missing translation about stream quality Stream launch failure Apr 27, 2019
@GenesisFR
Copy link
Author

Well, if it's not a translation issue then we can close this as it's pretty much a one-time issue which I can't reproduce. I've been using Twitch GUI for more than a year and this has never happened before.

I just checked and don't have any log, just a cache folder.

As I said, I was randomly browsing streams. Opened Twitch GUI, typed "Max Payne" in the search bar, clicked on Max Payne, opened a stream, clicked on Previous then Max Payne 2, opened and closed the 2 streams you can see on the screenshot then maybe reopened one of them. Really not sure about these steps though.

@bastimeyer
Copy link
Member

Let's not close this thread. I think I know what the issue is, but I don't know what caused it. Without a log, this is a bit difficult, unfortunately.

Like I've mentioned, it looks like the active stream record wasn't set when the streaming dialog was opened. This makes be believe that there was an error regarding loading custom channel settings or a malformed Twitch API reponse while loading the channel data. If I don't manage to find and fix this issue, it will be resolved enventually when I'm going to rewrite the entire streaming logic (which I already wanted to a long time ago).

@GenesisFR
Copy link
Author

GenesisFR commented Apr 27, 2019

I'm not using custom channel settings.

I suppose there's no way of setting logging verbosity without using the launch parameter? Haven't found anything in the GUI. I set it to debug and can now see logs in my temp folder. I'll send you the log if the issue ever happens again.

By the way, there's no environment variable named "%TMPDIR%" by default on Windows, just "%TEMP%" and "%TMP%".

@bastimeyer
Copy link
Member

I suppose there's no way of setting logging verbosity without using the launch parameter?

No. That's because the settings get loaded way too late during the app initialization.

I don't think debug messages will be of use here. I'm surprised though that the error got swallowed and not logged. Maybe there's something else which I am missing here. Luckily it's a very rare bug, so I am not too worried right now.

there's no environment variable named "%TMPDIR%"

Thanks, that's of course true. I just mindlessly copied it from the wiki, which is now fixed (I've also fixed several other things on that page).

@GenesisFR
Copy link
Author

GenesisFR commented Jul 25, 2019

I've had the issue happen again tonight on the same version. Clicked on a live channel but it was hosting another channel. So I clicked on Switch but Streamlink Twitch GUI doesn't get the stream info and the hosted channel gets opened in VLC.

image
image

The only thing appearing in the log is this (I'm not using the debug loglevel):

[2019-07-25T07:43:14.932Z][error][StreamingService]
Error: anthony_kongphan is hosting grimmmz

@bastimeyer
Copy link
Member

I'm now also running into this issue after fixing a few bugs/issues for the next release and bumping NW.js to 0.40.0 (latest version) in preparation for that.

The issue here is caused by a silly EmberData implementation when unloading a model/record and trying to create a new one later on (closing a stream and re-opening it again in this case).
https://github.com/streamlink/streamlink-twitch-gui/blob/v1.7.1/src/app/services/streaming/service.js#L82-L103
Usually, the hasRecordForId should guard against creating duplicate records, but it doesn't seem to be doing it here.

I've experienced this EmberData bug in the past, and also created a test case for this and posted a Gist on EmberData's issue tracker:
https://gist.github.com/bastimeyer/ecb84112ba24082dfa58fdd3596ef978#file-foo-test-js

What I don't understand is why this is only happening to me when I use NW.js 0.40.0 instead of 0.37.4 (currently used version).

@bastimeyer
Copy link
Member

After this bug has been fixed, I will add proper error logging.

bastimeyer added a commit that referenced this issue Aug 7, 2019
fixes #637

- globally apply fix/workaround to Model.prototype.destroyRecord
- remove old individual fixes which are not working anymore or which
  were unreliable
- use deleteRecord().save() where fix should not be applied
- remove embedded record data from createRecord responses in the
  Twitch{Channel,Game}FollowedSerializer and rewrite tests
@bastimeyer
Copy link
Member

I've pushed the fix to the nwjs-40 branch. The issue will be closed once it gets merged into master. I still have to check and see whether the NW.js bump has caused any issues on other platforms before I can merge it. Error logging improvements are also added to that branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants