Giter Site home page Giter Site logo

Error loading / about appjs-deskshell HOT 9 CLOSED

sihorton avatar sihorton commented on June 29, 2024
Error loading /

from appjs-deskshell.

Comments (9)

sihorton avatar sihorton commented on June 29, 2024

In the .desk file (probably called app.desk) it should tell deskshell the default location to start the app at. I am guessing that this is missing. So in app.desk there should be:-

"defaultLocation": "index.htm",

If this is missing then I think it will try to start at / which is why you are getting the error. You will also need a starting page for your application, if it is called something else then add or change "defaultLocation" to be the name of the starting page. Hopefully deskshell will then display this first page instead of the error.

@Ingwie: looks like desk_parse is looking in the wrong place for desk.decl-defs (it is looking relative to user application instead of relative to deskshell install directory?).

from appjs-deskshell.

sihorton avatar sihorton commented on June 29, 2024

@Ingwie: simplest way to help here would be to go to the demos tab in the default application, select html website and then click on "view source", on windows this opens explorer with the working demo app so people could then copy and paste that and start from there. View source is implemented by opening explorer, on mac we would need to use process.platform or similar to detect we are running on mac and then start up the finder.

from appjs-deskshell.

markpenrose avatar markpenrose commented on June 29, 2024

I had all the above in place. Originally, I was getting a javascript error in the console on augular that I fixed. Then I just got the "Error Loading" page.

Here is my .desk file.

{
"name":"default"
,"version":"0.2"
,"author":"mpenrose"
,"description":"default app shown when you start deskshell"
,"main":"app.js"
,"licence":"MIT"
,"frontend":"chromium-portable"
,"backend":"node"
,"defaultLocation":"index.htm"
,"width":1024
,"height":640
,"htdocs":"/"
}

the app.js is a copy from your demo. I understand that pouchdb uses Indexeddb on Chrome. And It look like deskshell is using webSQL. Maybe this is the problem?

Thank you for the help.

from appjs-deskshell.

sihorton avatar sihorton commented on June 29, 2024

Not sure if this is the problem but I see you have the following:-

,"htdocs":"/"

on mac that means that the htdocs directory will be served from root i.e. /
try changing that to be:

,"htdocs":"htdocs"

instead so that it is pointing to a relative directory called "htdocs" then you should also check that there is a folder called "htdocs" under the folder containing the .desk file.

My guess is that the problem is simply that deskshell cannot find index.htm so that is what the error means. I think it is looking for /index.htm and not finding it.

from appjs-deskshell.

IngwiePhoenix avatar IngwiePhoenix commented on June 29, 2024

From what I remember, the htdocs path is appended to the dirname of the desk file.

I.e. if your .desk file is at /Users/Ingwie/Work/deskshell-demo/app.desk and it reads „htdocs“:“htdocs“ it looks for /Users/Ingwie/Work/deskshell-demo/htdocs - and then the DefaultLocation - like index.htm: /Users/Ingwie/Work/deskshell-demo/htdocs/index.htm . Its just minor poking of the webserver-part. ^^
Am 12.11.2013 um 15:37 schrieb sihorton [email protected]:

Not sure if this is the problem but I see you have the following:-

,"htdocs":"/"
on mac that means that the htdocs directory will be served from root i.e. /
try changing that to be:

,"htdocs":"htdocs"
instead so that it is pointing to a relative directory called "htdocs" then you should also check that there is a folder called "htdocs" under the folder containing the .desk file.

My guess is that the problem is simply that deskshell cannot find index.htm so that is what the error means. I think it is looking for /index.htm and not finding it.


Reply to this email directly or view it on GitHub.

from appjs-deskshell.

sihorton avatar sihorton commented on June 29, 2024

Ah yes you are correct. So in which case / means that deskshell is looking for /Users/Ingwie/Work/deskshell-demo/index.htm and that file is probably in /Users/Ingwie/Work/deskshell-demo/htdocs/index.htm.

from appjs-deskshell.

IngwiePhoenix avatar IngwiePhoenix commented on June 29, 2024

Correct :) So some web server poking may be necessary ova
Am 12.11.2013 um 20:16 schrieb sihorton [email protected]:

Ah yes you are correct. So in which case / means that deskshell is looking for /Users/Ingwie/Work/deskshell-demo/index.htm and that file is probably in /Users/Ingwie/Work/deskshell-demo/htdocs/index.htm.


Reply to this email directly or view it on GitHub.

from appjs-deskshell.

markpenrose avatar markpenrose commented on June 29, 2024

That did it. All work.

from appjs-deskshell.

sihorton avatar sihorton commented on June 29, 2024

Great, glad it is working for you now. Good luck with your app!

from appjs-deskshell.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.