code icon indicating copy to clipboard operation
code copied to clipboard

Stuck on loading

Open punters360 opened this issue 6 years ago • 33 comments

Hey guys i have noticed with v1.4.0 when you save a file it does save the file but the screen just gets stuck on the loading and nevers comes off until you refresh the page ??

cdn.min.js:13 POST http://103.16.131.178:8000/api/files/197682001ap61b/ 408 (Request Timeout)

getting this error ??

also with the new v5 you cant seem to add a new directory to the project ?

punters360 avatar Jun 17 '20 05:06 punters360

There is a problem on the server-side. Check the application logs because there will be some exception.

also with the new v5 you cant seem to add a new directory to the project ?

New features are part of branch total4. You can use it without any problem, but you need to install Total.js 4 $ npm install total4.

petersirka avatar Jun 17 '20 06:06 petersirka

Can you give me some more direction with using version 5 ? I have installed total4 but how i use the code editor ? is total4 the code editor ? or is it some other program needed to run the editor ?

punters360 avatar Jun 17 '20 06:06 punters360

https://github.com/totaljs/code/tree/total4

  • download source-code of Code branch total4
  • perform $ npm install
  • run code:
    • $ cd code
    • $ node index.js
  • open http://127.0.0.1:8000

Do you have some Total.js Cloud container in our cloud? Because we can updrade Code there.

petersirka avatar Jun 17 '20 06:06 petersirka

ok so npm is installed and I have installed total4 into the dir that the total code v5 is in I run the index.js file and i get this back

Error: Cannot find module 'total4/debug' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15) at Function.Module._load (internal/modules/cjs/loader.js:562:25) at Module.require (internal/modules/cjs/loader.js:692:17) at require (internal/modules/cjs/helpers.js:25:18) at Object. (/home/punters360/totaljs_code160/index.js:16:1) at Module._compile (internal/modules/cjs/loader.js:778:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3)

punters360 avatar Jun 17 '20 07:06 punters360

when i run the debug.js or release.js file it seems to run but i get errors when im trying to add a new repository it errors out

Screenshot_3

punters360 avatar Jun 17 '20 07:06 punters360

Make sure you have installed total4@beta. If you installed framework using npm install total4 then reinstall it using npm install total4@beta You can check ./node_modules/total4/ folder and if there's only index.js and package.json then that's the problem.

molda avatar Jun 17 '20 07:06 molda

Cool!! that solved that problem now its working however i still have the same original problem stock on loading screen when i save a file

Screenshot_4

punters360 avatar Jun 17 '20 07:06 punters360

Any error on the server?

If you are running the Code on windows you need to change config. This will put backup into code-root-directory/apps/backup Change it as you wish but keep in mind the Code is optimized to run on linux server not on local windows

backup                : apps/backup/
autodiscover       : apps/

Then you also need to use relative paths in project settings.

I've just tested it and it works fine.

molda avatar Jun 17 '20 07:06 molda

its got something to do with running on port 8000 how can i change the config to boot it on another port ?

also we running on Linux box

punters360 avatar Jun 17 '20 07:06 punters360

config

default_port : 8001

https://docs.totaljs.com/latest/en.html#api~FrameworkConfiguration

molda avatar Jun 17 '20 07:06 molda

ok got the port to change but it did not resolve the problem still a post timeout error when saving a file ??

punters360 avatar Jun 17 '20 07:06 punters360

Port can be changed easily via $ node index.js 8005 ... But we need to see application logs.

petersirka avatar Jun 17 '20 07:06 petersirka

The application logs will not load anything ?? what other logs can i check ?

punters360 avatar Jun 17 '20 08:06 punters360

In the screenshot you posted above there's also `500 Internal server error' before the timeout error. You should see that error on the server with full stack.

molda avatar Jun 17 '20 08:06 molda

what other logs can i check ?

Check the output from terminal, there are logs.

petersirka avatar Jun 17 '20 08:06 petersirka

now its doing Evan stranger things when you open a file

Screenshot_5

punters360 avatar Jun 17 '20 08:06 punters360

Server logs

jfkdla

jfkdlajkl

punters360 avatar Jun 17 '20 08:06 punters360

Permision denied is quite obvious error. You don't have permision to create /www directory. What directory is the application you are editing in? Have you changed backup config?

molda avatar Jun 17 '20 09:06 molda

everything is obvious when you know how, we still carnt seem to get this to work can you give us more direction ?

our website in the the server main directory. no in the public_html

this is the logs when you just refresh the page manually seems to be errors flying everywhere here what are we doing wrong ????

Screenshot_6

punters360 avatar Jun 17 '20 11:06 punters360

The error from the screenshot above has nothing to do with Total.js framework or Code application. It has something to do with pm2 process manager. We can't help you with that.

molda avatar Jun 17 '20 11:06 molda