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

iTunes import broken after redesign #8

Open
liftarn opened this issue Jun 8, 2017 · 40 comments · Fixed by #10
Open

iTunes import broken after redesign #8

liftarn opened this issue Jun 8, 2017 · 40 comments · Fixed by #10

Comments

@liftarn
Copy link

liftarn commented Jun 8, 2017

It appears the redesign broke the script.

@dufferzafar
Copy link
Owner

@liftarn @augustjanse I've updated the script and it now works for me. Please try and let me know!

@ewauq
Copy link

ewauq commented Jun 9, 2017

I can't see the importation button on any pages after the new design.
https://itunes.apple.com/fr/album/witness/id1236471560
image

@liftarn
Copy link
Author

liftarn commented Jun 10, 2017

Sorry, but I don't see the import button either.

@dufferzafar
Copy link
Owner

@dufferzafar
Copy link
Owner

How can we debug this now?

@ewauq
Copy link

ewauq commented Jun 10, 2017

Just deleted the userscript and re-installed it, same problem for me.
This is the only Userscript I activated.
image

@dufferzafar
Copy link
Owner

dufferzafar commented Jun 10, 2017

Hi, considering that the "Link to HD Artwork" is working, I've moved the "Add to MusicBrainz" button to the left now. And have updated the script accordingly. See if this works.

image

@liftarn
Copy link
Author

liftarn commented Jun 11, 2017

Odd. I first saw the Link to HD Artwork button, but then it vanished.
It may be an idea to bump the version as well.

@dufferzafar
Copy link
Owner

@liftarn When that happens, did you try and reload the page? It happened for me too once but I reloaded and it worked!

@V-Toll
Copy link

V-Toll commented Jun 11, 2017

Hmm, it's not working for me either, even after the latest update. The link to HD artwork works (links only to the 939px version and not 1200px) but the import button is just not there (like liftarn and ewauq). I'm using Tampermonkey and Google Chrome 60.0.3112.24 an macOS 10.12.5.

@Bacardi89
Copy link

hey it don't work me.

@liftarn
Copy link
Author

liftarn commented Jun 12, 2017

@dufferzafar Nope, just the artwork link first showing and then disappearing. Running Greasemonkey 3.11 on Firefox.

augustjanse added a commit to augustjanse/Userscripts that referenced this issue Jun 12, 2017
@liftarn
Copy link
Author

liftarn commented Jun 19, 2017

I still haven't managed to get it to work using Firefox 54.0 and GreaseMonkey 3.11. I have tried to reinstall both the script and GreaseMonkey with no luck.

@augustjanse
Copy link
Collaborator

Did you check your console (Ctrl+Shift+K)? My update should have fixed the error visible in @ewauq's screenshot, if your console shows a different one that would be helpful. Also try refreshing the release page, seems like it can be a little slow in showing up.

@liftarn
Copy link
Author

liftarn commented Jun 20, 2017

Noting really suspicious in the console:
Cross-Origin begäran blockerad: Same-Origin policyn tillåter inte läsningar av fjärresurs på https://www.apple.com/ac/globalfooter/3/en_US/assets/ac-footer/legacy/appleicons_text.woff. (Orsak: CORS header 'Access-Control-Allow-Origin' saknas). (okänt) downloadable font: download failed (font-family: "Apple Legacy Chevron" style:normal weight:normal stretch:normal src index:1): bad URI or cross-site access not allowed source: https://www.apple.com/ac/globalfooter/3/en_US/assets/ac-footer/legacy/appleicons_text.woff ac-globalfooter.built.css:1:1040 Metrics config: No config provided via delegate or fetched via init(), using default/cached config values. vendor-5f048e2ad0248e8169016946294565f8.js:28:11988 Cross-Origin begäran blockerad: Same-Origin policyn tillåter inte läsningar av fjärresurs på https://www.apple.com/ac/globalfooter/3/en_US/assets/ac-footer/legacy/appleicons_text.ttf. (Orsak: CORS header 'Access-Control-Allow-Origin' saknas). (okänt) downloadable font: download failed (font-family: "Apple Legacy Chevron" style:normal weight:normal stretch:normal src index:2): bad URI or cross-site access not allowed source: https://www.apple.com/ac/globalfooter/3/en_US/assets/ac-footer/legacy/appleicons_text.ttf ac-globalfooter.built.css:1:1040 GET https://web-experience.itunes.apple.com/assets/controls/[email protected] [HTTP/1.1 200 OK 0ms] OPTIONS XHR https://xp.apple.com/report/2/xp_its_preview [HTTP/1.1 200 OK 522ms] POST XHR https://xp.apple.com/report/2/xp_its_preview [HTTP/1.1 200 OK 138ms]

@liftarn
Copy link
Author

liftarn commented Jun 20, 2017

When refreshing I sometimes get a "Link to HD artwork" that then disappear.

@augustjanse
Copy link
Collaborator

Replication succeeded! Windows 10, newly installed Firefox 54.0 64-bit and Greasemonkey 3.11 for the record, but the browser is probably the critical part. I'll take a look.

@liftarn
Copy link
Author

liftarn commented Jun 20, 2017

Tested with your fix and it seem to solve the problem.

@libussa
Copy link

libussa commented Aug 19, 2017

This is still broken for me. Link to HD artwork and import button appear briefly below the artwork, then disappears.
Firefox 55, Linux

@dufferzafar
Copy link
Owner

@libussa Link to itunes page where you're experiencing the problem?

A screenshot?

@dufferzafar dufferzafar reopened this Aug 19, 2017
@libussa
Copy link

libussa commented Aug 19, 2017

@liftarn
Copy link
Author

liftarn commented Aug 22, 2017

Yes, it appears and then disappears. Using Firefox 54.0.1 and Greasemonkey 3.11

@dufferzafar
Copy link
Owner

dufferzafar commented Aug 22, 2017

Are you sure you guys are using the right version? (current master tip)

Because it stays visible for me. I'm on KDE Neon using FF 55.0.2 and the dotjs addon.

@liftarn
Copy link
Author

liftarn commented Aug 22, 2017

Yes, reinstalled from https://github.com/dufferzafar/Userscripts/blob/master/MB-Import-From-iTunes.user.js today and tested.

@Bacardi89
Copy link

Bacardi89 commented Aug 22, 2017 via email

@otringal
Copy link

otringal commented Aug 24, 2017

I had the same problem but found a solution that works for me, but sometimes you have to reload the itunes page before it starts to work. I think the problem is that the script runs before the page has finished loading. Add this at the top of the script if you use Greasemonkey:
//@run-at document-idle

@AzoresOne
Copy link

@otringal

Add this at the top of the script if you use Greasemonkey:
//@run-at document-idle

I get this warning:
Scam Warning: Take care when pasting things you don't understand. This could allow attackers to steal
your identity or take control of your computer. Please type 'allow pasting' in the scratchpad below to allow pasting
.

Now what?

@AzoresOne
Copy link

Update:
I went ahead and typed instead of pasting and whattya know, it now works properly!
Thanks 👍

@V-Toll
Copy link

V-Toll commented Aug 26, 2017

Strange. Same problem here, even with //@run-at document-idle

Here is an example: the US iTunes site doesn't work:
https://itunes.apple.com/us/album/raining-single/id1272276768
01

The German one works fine for me:
https://itunes.apple.com/de/album/raining-single/id1272276768
2

(using Tampermonkey on Google Chrome)

@liftarn
Copy link
Author

liftarn commented Aug 28, 2017

Even with //@run-at document-idle it don't always appears so I often have to reload the page to make it appear, but it's still a vast improvement over how it was before.

Mirgolth added a commit to Mirgolth/Userscripts that referenced this issue Sep 9, 2017
Is a fix for people with slow computers having issues with dufferzafar#8
@augustjanse
Copy link
Collaborator

I haven't had this problem recently, but started encountering it today. These two were the problem at first:

But now that I test other albums, they all seem to be having problems, including ones I had no problem with just now. No idea what's the problem. Don't really have any time to debug it either, sorry.

Tried @Mirgolth's fix, but it didn't do much. It seems reasonable, but on the other hand the script already waits for a state change so I'm not sure it does much.

@augustjanse
Copy link
Collaborator

I found while debugging that pausing the execution of the userscript (for example by setting debugging mode in Tampermonkey/Greasemonkey and opening the console before updating the page) consistently makes the button appear as it should after resuming. It seems clear that the problem is when it executes before the iTunes scripts do. Not sure how to fix it, but this is a pretty useful workaround.

@jesus2099
Copy link
Contributor

jesus2099 commented Oct 14, 2017

Hello, I also have a broken iTunes script I don’t really intend to work on any more.

But just to say I have noticed that iTunes JavaScript is running routinely to red raw redraw the page (I see an ugly font jump, few seconds after each page load in opera presto).

So I have put a delay before my script runs and it worked but it is not good solution.
jesus2099/konami-command#353 (comment)

@5moufl
Copy link

5moufl commented Jan 24, 2018

works again on Firefox 58 with ViolentMonkey

@gauravjuvekar
Copy link

Disabling security.csp.enabled in FF ESR 52.7.3 allows it to work correctly.

@jesus2099
Copy link
Contributor

@dufferzafar, you could try to add a setInterval(function() { … }, 5000); that keeps checking if your buttons are still there, and if not, readds them.

@jesus2099
Copy link
Contributor

@Mirgolth’s fix #15 (// @run-at document-idle), which is a sensible improvement in running this script on iTunes’ new page design, has just been deployed!

@ghost
Copy link

ghost commented Mar 14, 2019

I cannot see the "Add to MusicBrainz" button with Firefox 65.0.2 and GreaseMonkey 4.7 so I install ViolentMonkey 2.10.3 and it works !

@jesus2099
Copy link
Contributor

jesus2099 commented Mar 14, 2019

Does anyone still have this problem since version 2017.11.21.1 deployed on 2019-02-08?
No problem here with Vivaldi (Chrome) + Violentmonkey (but I don’t often go to iTunes).

UPDATE

I have just had the issue right now.
WHen you browse iTunes, it uses an AJAX stuff that does not really reload full pages and the script button will never appear.

@dufferzafar, for this kind of sites, the solution really is IMO to use setInterval to regularly check if the buttons are there or not.
There are cleaner means but they are much more difficult to maintain as the web sites regularly changes its code — for this reason I progressively put all sites in such setInterval dumbMode in some other script.

@jesus2099
Copy link
Contributor

I forgot to mention the very easy work around: Press F5 to load page properly and to let the user script catch up.

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

Successfully merging a pull request may close this issue.

13 participants