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

Error HRESULT E_FAIL with iTunes #202

Closed
areeves89 opened this Issue Sep 14, 2017 · 16 comments

Comments

Projects
None yet
9 participants
@areeves89

areeves89 commented Sep 14, 2017

I updated to the latest version of iTunes for Windows 10 (version 12.7.0.166), but since doing so it doesn't seem to want to play nicely with Snip (version 6.9.1). Whenever I open Snip, it opens iTunes as well, but immediately after iTunes opens I get the following error:

_Please exit iTunes and reselect iTunes from within Snip.

Error HRESULT E_FAIL has been returned from a call to a COM component._

iTunes seems to function fine, but Snip is unable to pick up song info from iTunes. I've tried closing and selecting Snip->iTunes to re-launch iTunes as instructed in the error message, but the same error comes up each time. I've experimented with setting Snip to another service (Spotify, VLC, etc.), opening iTunes separately, and then setting it back to iTunes, and I've also uninstalled and re-installed, but despite my best efforts the error message comes up each time. Has anyone else seen this kind of thing before?

@Jewlander

This comment has been minimized.

Jewlander commented Sep 19, 2017

Yep I'm also encountering this issue, it appears the new iTunes update broke snip's compatibility. If anyone has a dl for the previous version of iTunes that'd be appreciated until this is fixed.

@Kurtessis

This comment has been minimized.

@dlrudie

This comment has been minimized.

Owner

dlrudie commented Oct 19, 2017

I’ve been looking into it. Have not found a solution yet. Apple broke compatibility with their own library.

@dlrudie

This comment has been minimized.

Owner

dlrudie commented Oct 26, 2017

So it's not the COM library that's broken. Internal events within the COM library have changed. There's zero documentation on this so I'm stuck playing around with it until I find something that works.

@dlrudie

This comment has been minimized.

Owner

dlrudie commented Nov 8, 2017

I've been trying to figure out a solution but am still stuck.

If I don't create any events I can link against the COM library and the rest of the stuff works. But when trying to create an event it has the E_FAIL error.

this.iTunesApplication.OnPlayerPlayEvent += new _IiTunesEvents_OnPlayerPlayEventEventHandler(this.App_OnPlayerPlayEvent);

The problem seems to be that there is no longer these event handlers. It will still build just fine but when trying to use them it fails.

I've tried digging around other things within the library but nothing comes up. They either changed them or removed them internally.

@VickGE

This comment has been minimized.

VickGE commented Nov 10, 2017

Hey, Rainmeter did fix their iTunes problem, it's surely a bit different, but you could contact their devs to see how they did it.

@1215drew

This comment has been minimized.

1215drew commented Nov 11, 2017

It actually looks like it could be very related. Here's the pull request from the rainmeter project: rainmeter/rainmeter#125

@CyberStar1

This comment has been minimized.

CyberStar1 commented Dec 3, 2017

Any way to fix this yet?

@markspolakovs

This comment has been minimized.

Contributor

markspolakovs commented Dec 3, 2017

@CyberStar1

There's zero documentation on this so I'm stuck playing around with it until I find something that works.

They either changed them or removed them internally.

TL;DR: no

@VickGE

This comment has been minimized.

VickGE commented Dec 7, 2017

@markspolakovs Other programs like Rainmeter found a solution to this problem, so it is possible to fix now.

markspolakovs added a commit to markspolakovs/Snip that referenced this issue Dec 26, 2017

Hotfix for broken iTunes events
Apple seem to have broken their own COM events. To get iTunes back to working, this commit now makes the iTunes interface poll the current track as part of the Update() cycle.

Fixes dlrudie#202, dlrudie#205, dlrudie#208, dlrudie#211, dlrudie#213, dlrudie#214, dlrudie#221, dlrudie#223, dlrudie#236.
@markspolakovs

This comment has been minimized.

Contributor

markspolakovs commented Dec 26, 2017

I've created a hotfix for the issues. Until #238 is merged, you can download my hotfixed version at https://github.com/markspolakovs/Snip/releases/tag/v6.9.1-hotfix.1.

Please note that this is probably broken and unsupported - do not report any issues here!

@kmaehashi

This comment has been minimized.

kmaehashi commented Dec 31, 2017

Hi, I'm a developer of @LyricsMaster and having the same issue.
This is just a FYI for developers, not a solution nor a workaround: it seems that iTunes is not dropping COM event support, but rather it was caused by a configuration error of iTunes.
iTunes v12.7 specifies PSOAInterface as a proxy/stub while it was PSDispatch in v12.6.
I confirmed that by changing the registry value HKEY_CLASSES_ROOT\Interface\{5846EB78-317E-4B6F-B0C3-11EE8C8FEEF2}\ProxyStubClsid32 from {00020424-0000-0000-C000-000000000046} (CLSID of PSOAInterface) to {00020420-0000-0000-C000-000000000046} (PSDispatch), events are dispatched as it was in v12.6.

@dlrudie

This comment has been minimized.

Owner

dlrudie commented Jan 1, 2018

Thanks for the insight! I wonder if there's a way to override the CLSID in code. May be worth reaching out to Apple somehow to see what they can do.

@kmaehashi

This comment has been minimized.

kmaehashi commented Jan 2, 2018

I've already reported this to Apple on Dec 9th via https://bugreport.apple.com, but got no response so far...

@dlrudie

This comment has been minimized.

Owner

dlrudie commented Apr 2, 2018

See #223 for hotfix for now.

@dlrudie dlrudie self-assigned this Apr 2, 2018

@dlrudie dlrudie added the bug label Apr 2, 2018

@dlrudie

This comment has been minimized.

Owner

dlrudie commented Apr 2, 2018

I just updated to iTunes 12.7.4 and they appear to have switched back to PSDispatch. Snip is working perfectly fine again with iTunes.

@dlrudie dlrudie closed this Apr 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment