Centova Technologies Forum

Centova Cast v3 => Bugs and issues => Topic started by: SCIFI.radio on April 16, 2013, 04:48:18 pm

Title: "Now Playing" Javascript widget doesn't work after V3 upgrade
Post by: SCIFI.radio on April 16, 2013, 04:48:18 pm
The old one worked on V2, the new one on V3 doesn't, and I have no clue why or where to start diagnosing this.  It displays the "Loading" message, but it never comes back with any data.

I've tested to make sure that the streaminfo.js file is accessible - it is if I access that Javascript directly via URL.  I'm using a Wordpress site, and the streaminfo.js loaded correctly from the same location on the page.

Just to see if it was having a problem with the port number, I copied the streaminfo.js file into the main web directory for the Wordpress site, and adjusted the URL in the script sourcing for that file. 

I note that this is a recurring problem, not a common one, but non-zero.

Does anybody know what to look at or how I can fix this?


Title: Re: "Now Playing" Javascript widget doesn't work after V3 upgrade
Post by: SCIFI.radio on April 16, 2013, 04:59:34 pm
Here's the odd bit: it works on the stream start page.  But the same code doesn't work on my Wordpress site.

http://kryptonradio.com:2199/start/kryptonradio/
http://kryptonradio.com
Title: Re: "Now Playing" Javascript widget doesn't work after V3 upgrade
Post by: SCIFI.radio on April 16, 2013, 05:09:47 pm
Actually, scratch that, it's not showing the current song accurately there either.  There appears to be significant lag, up to a minute or more.
Title: Re: "Now Playing" Javascript widget doesn't work after V3 upgrade
Post by: SCIFI.radio on April 18, 2013, 07:33:53 am
Anybody got a clue?
Title: Re: "Now Playing" Javascript widget doesn't work after V3 upgrade
Post by: DJFire_CFR on April 18, 2013, 10:13:51 am
All I see is errors..  :(

And the start page shows offline.
Title: Re: "Now Playing" Javascript widget doesn't work after V3 upgrade
Post by: My Auto DJ on April 18, 2013, 11:21:00 am
Had this problem last week on a new instal, Try changing to stable version, then update  /usr/local/centovacast/sbin/update

http://forums.centova.com/index.php?topic=2267.0

Title: Re: "Now Playing" Javascript widget doesn't work after V3 upgrade
Post by: nnuker on April 19, 2013, 09:46:46 am
Had this on Joomla. It is all about JQuery. Look these treads.

http://forums.centova.com/index.php?topic=1745.msg4345#msg4345

http://stackoverflow.com/questions/11764154/property-of-object
Title: Re: "Now Playing" Javascript widget doesn't work after V3 upgrade
Post by: SCIFI.radio on April 19, 2013, 01:53:32 pm
Had this problem last week on a new instal, Try changing to stable version, then update  /usr/local/centovacast/sbin/update

http://forums.centova.com/index.php?topic=2267.0

Already on a stable version, but thanks.
Title: Re: "Now Playing" Javascript widget doesn't work after V3 upgrade
Post by: SCIFI.radio on April 19, 2013, 01:54:14 pm
Had this on Joomla. It is all about JQuery. Look these treads.

http://forums.centova.com/index.php?topic=1745.msg4345#msg4345

http://stackoverflow.com/questions/11764154/property-of-object

Aha, a clue!  Thanks so much, this may save me a ton of time.
Title: Re: "Now Playing" Javascript widget doesn't work after V3 upgrade
Post by: SCIFI.radio on April 19, 2013, 02:29:18 pm
Well, tragically, that was a dead end. 

I'm frankly surprised that Centova would create something so essential and not check to make sure it was compatible with the environments in which the v2.6 equivalent ran in.  This is so important a feature to our listeners that I wouldn't have upgraded had I known this would break.
Title: Re: "Now Playing" Javascript widget doesn't work after V3 upgrade
Post by: My Auto DJ on April 19, 2013, 02:45:12 pm
have you tried to run the update script lately? If not in the past couple weeks I am almost sure you need to update -- if that's not it so sorry but I had this same issue and /usr/local/centovacast/sbin/update cleared it up
Title: Re: "Now Playing" Javascript widget doesn't work after V3 upgrade
Post by: SCIFI.radio on April 19, 2013, 02:54:57 pm
have you tried to run the update script lately? If not in the past couple weeks I am almost sure you need to update -- if that's not it so sorry but I had this same issue and /usr/local/centovacast/sbin/update cleared it up

I'll try doing that. 

I ran Firebug on a test page containing nothing but the "Now Playing" code, and it kicked back an RCP error:

jsonp1366408262015({"type":"error","rid":"tranceilfm","error":"Unable to access account : Invalid username or password"})

No idea what this means, but I'll try the upgrade first and see if that clears it.
Title: Re: "Now Playing" Javascript widget doesn't work after V3 upgrade
Post by: SCIFI.radio on April 19, 2013, 02:57:34 pm
The upgrade script fails:

Verifying archive integrity ...
Unpacking archive ...

Installing shoutcast ...


gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error exit delayed from previous errors
Sorry, an error occurred while unpacking ShoutCast DNAS.
Installer exited with error, aborting

Title: Re: "Now Playing" Javascript widget doesn't work after V3 upgrade
Post by: SCIFI.radio on April 19, 2013, 03:23:55 pm
Here's a new clue:  I went to the Centova-generated start page for my stream, and copied and pasted the code directly into an html file in my web root directory.

It failed.

Neither the Now Playing div nor the Playlist div were able to access the information they needed.  They're both stuck on "Loading...".

The identical code works in the original Start page, but nowhere else.
Title: Re: "Now Playing" Javascript widget doesn't work after V3 upgrade
Post by: SCIFI.radio on April 19, 2013, 03:29:28 pm
Oookay.  There is no package called 'shoutcast', but the Centova update program seems to think there is and tries to update it anyway.  I probably specified an incorrect package to add during setup, but there seems to be no way to clear this error, and the Centova scripts did not detect the fact that this package does not exist and added it to the manifest anyway.  Thereupon causing every attempt to update Centova to fail with no direct way to repair it.
Title: Re: "Now Playing" Javascript widget doesn't work after V3 upgrade
Post by: SCIFI.radio on April 19, 2013, 03:36:23 pm
Oookay.  There is no package called 'shoutcast', but the Centova update program seems to think there is and tries to update it anyway.  I probably specified an incorrect package to add during setup, but there seems to be no way to clear this error, and the Centova scripts did not detect the fact that this package does not exist and added it to the manifest anyway.  Thereupon causing every attempt to update Centova to fail with no direct way to repair it.

I solved this.  Going to the /usr/local/centovacast/update.d directory, I found the files that referred to the nonexistent package and deleted them.  After this I was able to perform the update and have it complete successfully.

Two issues remain:  One, the Centova scripts should not create update scripts for packages that do not exist.  Two, running the update did not fix the problem with the Now Playing scripts, which run only from within the web space maintained by the Start Menu, i.e.  http://yourservername.com:2199/start/yourCentovaAccountName

This proves that there is nothing wrong with the Javascript in streaminfo.js.

However, it is not getting whatever it needs in order to function, and this exists only in the http://yourservername.com:2199/start environment.  That makes the feature useless.
Title: Re: "Now Playing" Javascript widget doesn't work after V3 upgrade
Post by: SCIFI.radio on April 19, 2013, 03:47:49 pm
And now it's working on the test page.  The only difference?

Instead of sourcing the streaminfo file from the domain name, I used the IP address instead.

Suddenly it works.
Title: Re: "Now Playing" Javascript widget doesn't work after V3 upgrade
Post by: SCIFI.radio on April 19, 2013, 04:04:13 pm
And now the final puzzle. 

It works just fine here:  http://kryptonradio.com/nowplaying.html

But not here:  http://kryptonradio.com

And the HTML code I'm using and the way I'm calling the Javascript is identical.
Title: Re: "Now Playing" Javascript widget doesn't work after V3 upgrade
Post by: DJFire_CFR on April 19, 2013, 09:48:35 pm
I can't say if this is the issue or not, but the code you are using, there is a break in it, where there shouldnt be.

Code: [Select]
<a href="/tunein/kryptonradio.pls" id="cc_strinfo_summary_kryptonradio" class="cc_streaminfo" style="text-overflow: ellipsis">Loading...</\
a> (<span id="cc_strinfo_server_kryptonradio" class="cc_streaminfo"></span>)<br />

This part here:
Loading...</\
a>

May be try to fix that up?  And see if that helps anything there?

Should be:  Loading...</a>
Title: Re: "Now Playing" Javascript widget doesn't work after V3 upgrade
Post by: SCIFI.radio on April 20, 2013, 06:49:43 pm
It could very well be something as simple as that.  I'll try it and let you know.
Title: Re: "Now Playing" Javascript widget doesn't work after V3 upgrade
Post by: SCIFI.radio on April 20, 2013, 06:55:56 pm
Sadly, tragically, no.  The Javascript is supposed to replace the text in the DOM object with the id of "cc_strinfo_server_kryptonradio" and the CSS class="cc_streaminfo", and it's simply refusing to do this.

Works fine on an otherwise blank test page, but doesn't work on Wordpress, and I've no idea why.

UPDATE:  There was an update to the software today, and one of the things they fixed was widgets not behaving correctly when certain fonts were used.  I ran the update, and lo and behold, something began to spring to life, and I'm now seeing status messages that weren't there before.  I think that was probably the bug.

Nice job, guys, and sincerely, thank you.
Title: Re: "Now Playing" Javascript widget doesn't work after V3 upgrade
Post by: DJFire_CFR on April 20, 2013, 10:11:19 pm
yay for updates!  :)
Title: Re: "Now Playing" Javascript widget doesn't work after V3 upgrade
Post by: nnuker on April 21, 2013, 02:44:17 am
I repeat again this is JQuery issue ! Two options: you must substitute $  in streaminfo.js for JQuery, particullary on all places of code. $ is an alias for JQuery but it can mean other things in other Javascript languages. So there is a conflict between JQuery and other Javascript. In Joomla there are several tools that helps to debug JQuery conflicts. Search for "Wordpress Jquery conflict" or something.
Title: Re: "Now Playing" Javascript widget doesn't work after V3 upgrade
Post by: Headshaker on April 22, 2013, 02:44:32 am
Google maps widget doesn/t work as well.

I repeat again this is JQuery issue ! Two options: you must substitute $  in streaminfo.js for JQuery, particullary on all places of code. $ is an alias for JQuery but it can mean other things in other Javascript languages. So there is a conflict between JQuery and other Javascript. In Joomla there are several tools that helps to debug JQuery conflicts. Search for "Wordpress Jquery conflict" or something.

Well this is not the jQuery issue. I'm not using any other libraries than jQuery so I shouldn't have any conflicts, isn't it ?