Spotify Tutorial example app is blank - spotify

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.

Related

Spectron: how to test Electron `shell.openExternal('some url')`

I'm writing and E2E test for an application written in Electron. I need to test a button which calls in effect shell.openExternal('link') where link is an external website. I've been looking in the webdriver docs for something which allows the test intercept this call, but it doesn't look like anything like that exists in the API at all.
1) if something like this does exist an I missed it in the docs, please enlighten me in ways of the light side of the force,
2) if not, then does anyone out there in stackoverflow land have a fancy work-around?
Thanks so much!
I came up with an answer. Instead of trying to intercept the click, I added an env var in the main app such that when set, the click will put an entry into the log instead of actually opening the external link in a browser. Then I use the API in spectron to slurp up the render process logs: https://github.com/electron-userland/spectron#clientgetrenderprocesslogs
Then I can just look for a custom string in the logs and I can judge the proper text is present.

How to run server.js on client-side?

Can anyone explain me how I can run the server.js on client-side. Like I have index.html page and I've a button in it and I want to generate PDF on button click event and pass dynamic data to PDF. I've literally no idea about node.js. Any kind of help is appreciated. Sorry if the question is duplicate.
The simple answer is you don't. Node.js is a back end and the server.js file you have should not run on the browser. If you need the functionality on server.js after the first load you need to use something like ajax to communicate with the server. Or you could try to get your server code to run in the browser, but that may not work for all browsers and is probably a bad practice.

Put link in console.log(). Node.js

I would like to do something like this:
console.log('Your server available at localhost:3000 ');
But unfortunately node console doesn't recognize 'a' tag.
Are any ideas how to put link in node console?
There is no way you can make an HTML tag interpreted by your the terminal, because your terminal has no ideas what html is.
You can just display a URL in console output like
console.log('Your server available at http://localhost:3000
Most modern terminals will automatically parse it as a URL (if you put a valid URL there)
For example, Mac default terminal redirects to valid URL from console output if you double-click on it while holding Cmd
console.log in Node renders text in the console window (command prompt in Windows) which does not know how to interpret html tags. I am afraid that you would not be able to do that unless you find a 3rd party plugin (if such plugin even exists) that allow that.
Hope that helps.
You don't need this. Some terminals started supporting links not long time ago. I think it was around 2017.
You will find more info here: https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda

webpage appearing only when hitting refresh

My website www.999designs.in won't open at once, it shows an error, however it works fine once you refresh it!! I've hosted it on a LAMP environment, does it require any specific server settings??
First it given an error "Can not find the page you're looking for".
I think the cause of the problem is that you initialize the slider with a wrong image file name. Have a look at function.js line 240:
$(['img/woman1.png','img/woman2.png','img/woman3.png']).preload();
If you reload the image for "banner-slide-woman-1" is called woman.png not woman1.png.
HTH
Andy

Spotify Hello World App not loading

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.

Resources