Spotify Hello World App not loading - spotify

I'm trying to get the Spotify Hello World app running (https://developer.spotify.com/technologies/apps/tutorial/) and when I run the app in Spotify it doesn't load anything. Using the Inspector, it shows nothing in the head and body of the HTML. I've verified time and again that there actually is something in my index.html file.
I do have a developer's account and I am a premium member.
Does anyone have any suggestions for me to get the app to run correctly?

[SOLVED] I just realized when trying to load the application I was typing spotify:app:Tutorial when it should have been spotify:app:tutorial. It's case sensitive, yet when its the wrong case it doesn't yield any error, just empty HTML.

Seems like your application is found else you would get a not found error. At this rate we can't really tell alot. You might wanna include your manifest and index.html file.
Also if you change something in your manifest you have to kill spotify and restart for it to work properly again.

Using linux (Ubuntu 11.10) the tutorial did not start correctly until I used
consistent caps.
I.e. I changed to "tutorial" instead of "Tutorial" in both app directory name
and in the manifest. Still, the "Spotify" dir in $home needs S in caps.
Then the app started correctly using uri spotify:app:tutorial
I.e. ~/Spotify/tutorial/*

Make sure "BundleIdentifier":"tutorial" is in your manifest.json file.

Related

ASP.NET Core 5 MVC web app returning bad request errors in some pages after deployment to IIS

I have tried everything. I configured Windows Server 2019 according to Microsoft documentation and I successfully deployed a .NET 5 web application to the IIS.
I can get to the login page. I can even get to the forgot password page and they show themselves fine. However when I try to do any action (send the forgot password link or login to the page) I get a "Bad Request" from the server. I haven't found a way to explain why.
I have tried several, and I mean several things found Googling around but nothing helps. This include disabling https within the .NET Core application, trying to get a detailed error page using the app.UseDeveloperExceptionPage(); instruction inside Startup, etc etc but nothing works. I always receive this page trying to execute any action:
If someone could help or point me into the right direction, I will really, REALLY appreciate it.
Thank you
PD: In case it has anything to do with the problem, the error, at least the two that I can reproduce (because I can't even log in), happens, I think (maybe don't) when redirecting to another page in Microsoft Identity.
EDIT: code was asked by one of you. Thank you.
As you see, there's nothing specific in the forgot password screen for my application. This is scaffold code from Microsoft Identity. I even edited it and just let one line of code inside it, which is the default return code anyway as follow:
public async Task<IActionResult> OnPostAsync()
{
return RedirectToPage("./ForgotPasswordConfirmation");
}
As you can see, there's nothing special with that code. Here's the html that calls it, again, is a scaffold of Microsoft Identity with little to no changes (by little, I mean, maybe some CSS and a new value of view data):
But then again, forgot password page actually shows and seems well in the front end, but immediately I try to enter my email and click enter in this page, (also, just a scaffold of Microsoft Identity):
Nothing happens. I receive the bad request. There's NO magic nor custom code here. Something silly is going on.
EDIT II: YES, locally it works perfectly. The strange behavior happens only when deployed to IIS.
EDIT III: I coded and enabled logging in my .NET Core APP and wrote that to a file, and I think I finally got, at least the error (not the reason yet):
But why?? Cookies are enabled in the server browser without avail, same issue. Someone has a better idea than disabling anti forgery rules to login and forgot password pages?
Thank you
For some reason, when I deployed the first version of my app into IIS, I thought it was a good idea to just browse it from the IIS link. Of course, in a new mounted Windows Server 2019, IE is still the default browser. I connected directly to the IP of my web app via VPN, but used Chrome this time. Guess what? All problems disappeared. Yes, it's a bad idea to try to use a modern framework like .NET Core Identity with IE.

Spotify: Where excactly to put the app?

I have a Spotify developer account, this also shows in Spotify Client.
However, I'm having problems with my test app. I just copied the tutorial app from the Spotify deveopment pages.
In Program files\Spotify i put the folder tutorial with the app files.
I also made this directory: Libraries\My Dokuments\Spotify\tutorial\
This did not work. When searching for spotify:app:tutorial I got metadata error and "could not find this app". When changing the "t" to "T" (Tutorial with upper case T), I did not get "could not find"-message, but nothing happened. Also I got the message "metadatastarted" while "loading for ever".
I tried this path: Users\P45\AppData\Local\Spotify\tutorial
This did not help.
These are the directories I made:
Libraries\My Dokuments\Spotify\tutorial\
Program files\Spotify\tutorial\
Users\P45\AppData\Local\Spotify\tutorial\
Any suggestions?
(Also, more info I should provide? Other changes?)
Create "My Documents\Spotify" in your %USERPROFILE% folder (you should already have 'My Documents' there, assuming it is english windows, so just create "Spotify" under that), and then create your app folder, "tutorial" there. That is where your files should reside in.
Note that %USERPROFILE% probably does not point to 'Libraries' folder.
Metadata error however suggest you might have also an error with your application and not only with your folder path... if possible, post your manifest.json and index.html files, too, to fix that.
This is a simple app I made earlier on, you can check from there the bare minimum metadata stuff as well as the instructions. For completeness, this is the link to official instructions provided by Spotify.

Spotify Tutorial App not found

I know very similar questions have been asked before. Like here: Spotify apps / home directory location (Windows local development)?
But the solutions suggested in that thread have not worked for me. Here's what I've done:
1) Enabled developer account
2) Followed these steps https://developer.spotify.com/technologies/apps/tutorial/
3) Including creating a directory called "tutorial" under /user/Documents/Spotify/
I have deinstalled, reinstalled, etc the client. And I still get "Sorry, I could not find this app." and "MetaDataFailed" etc.
I run Win 7 64 bit and Spotify version 0.8.3.222.g317ab.79d
I'm sure the solution to this is real simple, but I just can't seem to figure it out.
I got the same error as well, but after adding the required keys (More here: Application Manifest) I got it working.
Another thing I noticed was that when adding the BundleIdentifier key in manifest.json I only could get it to work with a lowercase name. E.g. spotify:app:myapp instead of spotify:app:MyApp.
This could of course be something specific on my end, but it is worth checking out.
Your app name MUST match the identifier you specify for BundleIdentifier in your manifest.json file.
open app: spotify:app:my-identifier
manifest.json: "BundleIdentifier": "my-identifier"
see https://stackoverflow.com/a/10421944 for moar
Just a clarification you are using c:\users[user name]\Documents\Spotify[app name]\ as the folder? Your post looked like /user was the root.
Also, in your manifest.json file if your BundleVersion is a number equal to or less than the number in production your local app will be ignored. Spotify will only load a local app with a BundleVersion number higher than production.

Spotify Tutorial example app is blank

I'm having trouble getting the tutorial project working. I've placed it under homedir/Spotify/Tutorial
In side spotify i enter spotify:app:Tutorial and it asks me if i want to add it to the side bar, which i do. When choosing it its a blank page. Opening up the inspector i see this:
<html>
<head></head>
<body></body>
</html>
Any clues whats wrong? I'm running spotify version 0.8.0.952.g.0298b8ce and i have a developer account.
Thanks in advance
/Eric
When I take a working app and rename it with a capital letter I get the same behaviour you are describing, try renaming your directory from Tutorial to tutorial then load the app with spotify:app:tutorial
if you look at index.html in the body tag there is a variable call 'tutorial' I believe it calls for that when you ask for spotify:app:tutorial since there is no 'Tutorial' variable it returns nothing.

cherrypy: how to access file system from cherrypy?

I am working on a cherrpy web service to work with my web app. In this service it needs to be able to access the file system. For example, I want to be able to list all files under a certain directory. I am using os.walk('/public/') but don't seem to get it to work, even though the same code works outside of cherrpy.
Is there a way to make it work so I can use cherrypy to manage files?
What user is the webapp running as, and does it have access to read the folder?
According to the documentation os.walk() will ignore errors from the underlying calls to os.listdirs()
http://docs.python.org/release/2.4.4/lib/os-file-dir.html
You could try setting the onerror argument like
def print_error(error):
print error
os.walk('/public/', print_error)
which might give you a hint as to what's going on.
Also, you could try going directly to os.listdirs() and see if you get any errors from it.

Resources