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

But these are logs generated from pm2 running totaljs how is this not relevant ?

what other logs do you want me to show you ??? im asking for help here guys.....

punters360 avatar Jun 17 '20 12:06 punters360

We don't use PM2, we recommend to use Total.js Cloud or Total.js SuperAdmin. Total.js is not optimized for PM2.

what other logs do you want me to show you ??? im asking for help here guys.....

We requrested for logs from Total.js application, not from PM2. We need to see where is the problem in Total.js. @molda described the problem -> Permision denied is quite obvious error.

petersirka avatar Jun 17 '20 12:06 petersirka

but Evan if we dont use PM2 we get the same problem no matter how we run it it gets the same thing ??

if we cannot get this running do you guys know of any other self hosting online editors we could try ?

punters360 avatar Jun 17 '20 13:06 punters360

You can test Total.js Code Editor easily in Total.js Cloud for free for 48 hours (after that is container removed) or rent some virtual server and install SuperAdmin and then install Total.js Code.

but Evan if we dont use PM2 we get the same problem no matter how we run it it gets the same thing ??

No, you can run it directly via:

$ cd code
$ node index.js

Then you will see all logs from the app directly in terminal.

petersirka avatar Jun 17 '20 13:06 petersirka

I seem to be not getting my message across. so if I run it using cd code node index.js which just runs the debug version it still has the same problem.

with running superadmin on a virtual server to you mean a complete new server ? as in rent a new box and install it on that ??? what is superadmin ? cant i just run it all on one server ?

punters360 avatar Jun 17 '20 13:06 punters360

runs the debug version it still has the same problem

With privileges? Show logs.

SuperAdmin installation:

# UBUNTU
$ sudo wget https://cdn.totaljs.com/superadmin.sh && bash superadmin.sh
# CENTOS
$ sudo wget https://cdn.totaljs.com/superadmin-centos.sh && bash superadmin-centos.sh
# ALPINE
$ sudo wget https://cdn.totaljs.com/superadmin-alpine.sh && bash superadmin-alpine.sh

Or you can use the best way for development - Total.js Cloud:

  • https://platform.totaljs.com
  • you can start to code in 2 minutes in Total.js Code Editor

petersirka avatar Jun 17 '20 13:06 petersirka

We are a startup and need to watch spending.

its a shame we cant get it working non of your replys are help full I think we will just look for some other online editor that works. thanks anyway

punters360 avatar Jun 17 '20 13:06 punters360

I'm sorry to hear it still doesn't work for you. I just tried the simplest way to run the editor using following steps

For master branch

  • git clone https://github.com/totaljs/code.git
  • cd code
  • npm i
  • node debug.js

For total4 branch which is most recent officialy unreleased version

  • git clone https://github.com/totaljs/code.git
  • cd code
  • git checkout total4
  • npm i
  • node index.js

Default folder for backups is /www/tmp/backup/ which Code app will try to create so it must have write permision. (the app needs to run with root permisions, to avoid that create the directory and give permision to the user the code app is running under)

I had no issues with it at all.

The app also must have write permision to directory of the app you are editing.

molda avatar Jun 17 '20 15:06 molda

The total4 is the in home directory of our server.

But how do i change the permissions so that total4 has root permissions ?

The problem is not downloading and installing the app or getting it running the problem is it wont save

so lets focus on how we can solve this. its like you said, a permissions issue but i dont know how to solve it.

punters360 avatar Jun 18 '20 00:06 punters360

If the Code app is running in your home directory and the code you are editing is also in your home directory then just change the backup path in config file to also point somewhere in your home dir and you don't need to run it as root. You should have no problem with permisions. If you still have issues then please answer these questions.

  • Where is the Code app installed? for example: /home/punters360/codeapp/
  • Where are the files you edit? for example /home/punters360/applications/
  • What is backup config set to? See config file in the root of Code app to find out. Ideally set to /home/punters360/backup/ or anywhere in your home directory to avoid permisions issues
  • What is the path in Projects for each of your apps? for example /home/punters360/applications/app1 Make sure to use absolute paths !!!

molda avatar Jun 18 '20 17:06 molda

Where is the Code app installed? for example: /home/punters360/codeapp/ the code app is installed at /home/punters360/totaljs_code160

Where are the files you edit? for example /home/punters360/applications/ /home/punters360/node_website_react

What is backup config set to? This is my config app below


name : Code allow_custom_titles : true

cookie : __sauth authkey : seEdCollabo

backup : /home/punters360/backup/ autodiscover : /www/www/

default_port : 8008


What is the path in Projects for each of your apps? /home/punters360/node_website_react /home/punters360/node_socialserver /home/punters360/node_betserver

I Run the app under sudo command: sudo node debug.js

and we still cannot save a file giving timeout requests stuck on loading screen still ??? Below is server logs

Screenshot_9

punters360 avatar Jun 19 '20 04:06 punters360

This all looks good. I don't see a reason for it to fail at creating directories. It would be helpfull if you can show me more of the totaljs-out.log You shouldn't even need to run Code as root with sudo since everything is in your home directory.

molda avatar Jun 20 '20 08:06 molda

Do you have a skype contact and maybe you could fix it for me ?? I will pay you ?

punters360 avatar Jun 21 '20 23:06 punters360