"General permanent error" during libspotify search - spotify

I've recently started programming in C on my Raspberry Pi. I have downloaded libspotify (I have the correct version), and have managed it pretty well.
Just recently (~2 hours ago (around 18:00 30/12/2013)), libspotify started to return SP_ERROR_OTHER_PERMANENT when checking for a search error in the search_complete_cb callback.
Before the error started occuring, I have built and started the program quite a few times (and thus, logging in many times, during only a short period of time), and to test my 'Search' feature, I have used the same query every time. Then, without making any changes to my program, suddenly there were no results returned after calling sp_search_create.
I am worried that the developer account has been somehow suspended for either repeatedly logging in, or because it seemed weird to the spotify crew that I would search for the same query all the time. I don't really know what the problem is caused by. There are no emails or warnings sent to the address connected to the account. The problem has lasted for a while now, so it seems like it's not going away at first.
Additional details
log_message tells me there is a ChannelError(4, 0, search). I have also seen ChannelError(5, 0, search), but only once.
I can still play music from the official Spotify desktop client for Windows.
I have an earlier version of the program, before I rewrote it to get a bit more structure, that works. The same API key and same credentials are used in both programs, so that excludes a ban. The rewrite does log in, but no results are returned from searching. In the old version, I get a lot of results. All working. I have rebooted the Raspberry Pi several times, but that doesn't seem to help.
If you need any code or other information, I'll be happy to share. Just point out what's needed, because the code is split over a lot of files.

Well, if your old one is working then the problem will be in your rewrite. Don't pay too much notice to the error messages, they're pretty much par for the course, and can be triggered by something as benign as a cache miss. Unless you're actually getting an error callback somewhere, the log messages are meaningless.
As for your problem, I can't really make any guesses without seeing your code. One thing to check and is the most common course of a permanent error is to make sure you're actually logged in. The login process is asynchronous, and any functionality that requires you to be logged in (searching is one of them) will fail before login is completed.

Related

Issue with malicious files showing up in IIS site folders

If this is something in another thread I'm happy to read but I've been keeping google hot without a result.
I have an IIS site that is getting hammered with some search engine exploit file creations. Basically trying to direct traffic to videos on YouTube by getting them indexed. I've disabled all FTP accounts to start and then went through confirming everything is updated including things like PHP. I'm having a bear of a time figuring out where these are coming from. I have started resetting the passwords on the anonymous user credential for each website but I don't think this is a password exploit.
The info I have:
They all seem to be created by Network Service but I can't tell which site they are coming in through.
I'm using up to date and active AV and active malware scanning.
All windows updates are in place
I have attempted to use process monitor and the only thing I can see is that the file creation comes from NETWORK SERVICE
The only thing I've thought of at this point is an exploit somewhere but without any viruses, missing updates or malware I'm at a loss of where to go with this.
I have tried to put auditing in place but this server has a pretty immense load overall so there is a number of completely safe temp files created and deleted constantly. This is compounded by the files being created at random times. I may keep a clean deck for a day or two and then get hit for a few hours. I did try auditing anyways and stopped at 15gb of security events without a hit.
I am considering containerizing into credentialed app pools but that will be a pretty significant time and resource overhead for a guess.
Any ideas or suggestions? I'm nearing the point of visiting a fortune teller down the road to see if they have any idea. :D

Classic ASP: response time periodically slows down extremely

I have a problem with a bunch (around 50) of classic ASP-Sites on Win2012R2 with Access-Databases, which drives us crazy.
All asp-pages of all sites on this server run smoothly for around 45 seconds, after that period they (all) completely stop responding to any click for 15 to 20 seconds, then this delay disappears again for the next 45 seconds like it never existed before, it re-appears again - and so on. This effect started out of nothing a few weeks ago, after several months without any problems.
Static HTML-pages are not affected, and it seems, even asp-pages without connecting to their database run fine. We, therefore, tried testing to convert from Access to SQLExpress, but this didn't change anything - even the converted site was affected in the same way (so it seems not to be Access).
We then tried to stop all sites in IIS and re-activating just one single site with very few visitors to see if it only appears, when many requests are sent to the server. But the effect still showed up, even after Restarting IIS and even after restarting the whole machine with just one website activated in IIS. It seems to be completely independent from the number of effects, just like the server (rather: the asp-engine of IIS) being busy with itself in a periodical pattern.
What we can see in performace monitor (see screenshot): while requests/sec goes down to 0 at some moment, when the effect starts, the number of requests executed continuosly accumultes from a normal level (which looks "logical" to me, but only describes the effect, not justifies, where it comes from). A few seconds before the effect vanishes, request/sec again grow and these counters revert to normal values.
We had a similar problem a year ago on a Windows 2008-Server, where the sites ran without any problems for several years and then it started out of nothing. After testing some of the sites on a server of another hoster, we found out, the problems didn't appear on his server with Windows 2012 R2 (and still don't for a full year, while hosting 3 of our sites there). At another hosters virtual Windows 2012R2-Server we have another single site hosted with more traffic than most of our others and even there the problem didn't appear since a full year now. So we our hoster switched over to WinServer2012R2 and - bingo - all the problems were gone. All sites performed like a charm again from that moment on without changing anything but the OS.
We then stopped investigating the issue, thinking the problem relates to the OS. But around 9 months later, it re-appeared and after hours and hours of investigating we have no idea, what to search for and what to do (beside of moving all our sites to the other hosters server, which isn't a real solution to the problem and we cannot guarantee, the effect will not re-appear on this machine sometimes in the future).
I definitively found a solution by myself, but in a totally random way. After weeks of searching for a solution to the problem, I worked on cleaning up the server's hard disk and deleted all files in Windows/temp-folder (> 18.000 files!). And since this moment (4 days ago), the described response lag never showed up any more! But a small bunch of new .tmp-files were created in the folder.
My theory is: maybe every time a user visits one of the websites (which opens connections to its Access database, causing a .ldb-file in the database folder), a randomly(?) named .tmp-file (like: jet12f0.tmp) is created in Windows/temp folder in parallel. These files are "normally" deleted again, as database connection closes and the .ldb disappears. Maybe some of the connections are not closed correctly, therefore the corresponding .tmp-file in the Windows/temp folder resides there as an "orphan", literally forever. As time goes by, the folder fills up with these orphaned files. And then it comes, that a new .tmp-file should be generated, but with a name of a still existing "orphaned" .tmp-file. This now causes the server to stop all actions, because it is not possible to establish the new file, named like an existing. After 15 to 20 seconds the conflict is solved by some mechanism (unknown to me) and all runs perfect again, until the next conflict arises around 45 seconds later. And so on...
I must assume: this is only a "amateur" theory, I'm not a server "Guru".
Cleaning up this temp-folder from time to time seems to prevent the server from getting into this situation, because there are no file/naming conflicts.
I agree: The real solution would be finding the problem in the code (if there is one), but we can live with that situation, comparing the effort to find the problem with just cleaning up the temp-folder once in a month or so ;-)

spotify models.player.load(...) promise not resolving

Anyone ever notice the Promise from models.player.load("context","playing"); simply doesn't come back (which is to say it neither fails nor dones)?
This doesn't happen every time I try the operation, only sporadically.
Working with API version 1.0.0, on Spotify for Windows.
Yep, timeouts don't seem to fail or done. At least I assume they're timeouts, because of their sporadic appearance, and different behavior for different users.
See later comments on my answer here: Intermittent issue with tracks snapshot for current user top list
Can be pretty frustrating. Only option I know of at this point is a success flag and a retry timer.

JSF2 slow page loading

I'm working with a JSF2 webapp. When I'm navigating between different pages they normally load fast; less than 100 ms. Sometimes though, for no apparent reason, it takes several seconds.
I've been trying to find some common denominator for when this occurs, but it happens regardless of page and regardless if I have visited the page several times before. Also, after a page has been slow to load, the next time I load it, it will load fast again for some time.
It all seems to happen randomly.
I have tried to find out what part of the application that takes time to carry out its task. I've timed more or less everything I can think of and it's not database calls, the logic in my classes or anything like that. Instead, looking at the "network" graph of chrome, it seems to be the initial call to the page that is the time thief.
Looking at the "network" diagram of Chrome, it shows that the latency for the first call is several seconds on those occasions.
Had this been due to my own bad code, I could at least have timed it and found out where I had made mistakes. Seeing that this seems to happen before my own code is even reached, I have no idea about how to solve this problem.
This may not be the actual reason to the problem, but I noticed that my internet connection was going up and down, which seems to affect the application even though I'm running a local server.
If I have made a request to the application and the internet connection goes down, the requested page won't load and as soon as the connection is back, the page loads.
I didn't think that this would affect the application at all, as the server is local and I can inactivate the internet connection and still access the application.

Detecting if XBMC is playing, from shellscript?

I have an XBMC setup that I absolutely love at home. Now, I've been doing a bunch of automation to make everything run smoothly and without manual maintenance (Like updating my library automatically on new arrivals etc.), however one thing I'm missing:
I want to write a shellscript, which takes care of suspending the machine at night, and waking it at a predefined time the next day. There's two things to it:
1) It should start up automatically at predefined intervals. I have this covered through RTC + wakealarm in Ubuntu.
2) It should, at a specific time at night, check if XBMC is currently playing anything (In case I'm up at night). If XBMC is NOT playing, it should suspend the machine. I'm unaware if this is possible ?
I actually found the answer to this one myself, after digging quite a lot into the new JSON RPC webservice in newer XBMC's.
The webservice now allows you to poll to see if any players are currently active (When playing a video for instance). I'm going to use those in the aforementioned script to check if I'm currently watching anything, before shutting the mediacenter down for the night :)
It's described on http://wiki.xbmc.org/index.php?title=JSON_RPC#JSONRPC.GetAnnouncementFlags

Resources