Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"loading..." when creating a new post #421

Closed
mrprajesh opened this issue Jul 26, 2019 · 9 comments
Closed

"loading..." when creating a new post #421

mrprajesh opened this issue Jul 26, 2019 · 9 comments

Comments

@mrprajesh
Copy link

mrprajesh commented Jul 26, 2019

I have installed coauthor following the installation steps of Test Sever; on a Debian server machine.
When I tried to create a new post the text area says "Loading.." and not allowing me to put text into it.

It looks like something similar to this bug #278. But, we have a good internet connection here. Can you suggest me a fix?
Thank you.

@edemaine
Copy link
Owner

This sounds like a firewall issue; the client is probably failing to connect to rhe ShareJS port. Did you check the client console for error messages?

@mrprajesh
Copy link
Author

Thanks for your reply. Yes, it throws up errors periodically in the console.
On chrome :
Screenshot from 2019-07-26 19-01-04
Whereas on Firefox:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:3000/channel/test?a=2takv9qoxkh8&VER=8&MODE=init&zx=lluasn3alyb7&t=1. (Reason: CORS request did not succeed).

There were few npm warnings during installation; but thought that was okay. Should I be changing any configs on the server? Do you see where could be issue is? or do you still think it is the firewall?

P.S: It is on our local server with local IP address (10.x.x.x). Our research group wanted use coauthor using that IP from our Linux machines. This is what we intended to do.
Thank you.

@edemaine
Copy link
Owner

edemaine commented Jul 26, 2019

Ah, then Coauthor is failing to get its hostname, and is instead generating localhost URLs. Are you using mup? Did you adjust the host parameter in .deploy/mup.js to the 10.6.3.10 IP address?

Actually, more importantly, you need to adjust ROOT_URL in meteor.env in .deploy/mup.js.

Looking at your screenshot mode, you're using port 3000, so I think you must be running the server via the meteor command. This won't work as is, as the test server thinks that its name is http://localhost.

@edemaine
Copy link
Owner

OK, I see how to fix this using a local test server (meteor) command. You need to set the environment variable ROOT_URL to http://10.6.3.10:3000 before running meteor. You'll also want to set MAIL_URL if you want Coauthor to send email notifications (see the INSTALL document).

I'll add a note about this to the INSTALL document. Thanks for the input!

@mrprajesh
Copy link
Author

mrprajesh commented Jul 27, 2019

Thanks for your time.

  1. You figured it right, I was using local test server/meteor because I was unable to make the setup working using mup. That's a different story; I think shouldn't be cross posting here.
  2. Currently we are not using email thing.
  3. Setting up shell env variable(ROOT_URL=http://10.6.3.10:3000) before running meteor did not fix the issue. Also, mup.js has ROOT_URL set.
  4. Since, all the navigations and others links were working fine we thought we could use test server way.
  5. Observation: On the server, from its browser, there is no loading bug when using http://localhost but when usinghttp://127.0.0.1 it has. This made me suspicious.
    `
    Screenshot from 2019-07-27 10-19-16

Felt like somewhere(or maybe in ShareJs) urls were generated using localhost(or obsolete url) instead of a relative URL or incorrect headers.
//I maybe 100% wrong here because my knowledge about ShareJS/Coauthor is very limited.

Thanks a lot. Will try again later to setup using with mup.

@edemaine
Copy link
Owner

I tested the ROOT_URL fix and it worked well for me. Are you sure you're setting it correctly? What operating system are you using, and how did you set it? The default value is http://localhost:3000 which is why you're seeing this behavior with any other access URL.

I (re)wrote the code that generates ShareJS URLs, and it uses Meteor features which should use ROOT_URL.

@mrprajesh
Copy link
Author

Oh. If don't mind can you check if it works with IP address instead of hostname/localhost?
I think yes. The server runs on Debian GNU/Linux 8.7 (jessie). Since we are doing the test server steps, I put the ROOT_URL=http://10.6.3.10:3000 (without any quotes) in the .bashrc and re-logined. I even verified using echo $ROOT_URL before running the meteor cmd. is it right?

Then, once the server is up. I am opening Coauthor with that local IP from another(and server) machine. The above screenshots. So, this could be due to one of these below or like you said this issue might be distribution specific.

  1. meteor npm installhad the following warns
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
  1. while running meteor had this line which raised my eyebrow.
I20190727-20:51:05.602(5.5)? ShareJS: using unsupported db type none, falling back to in-memory.
=> App running at: http://localhost:3000/

Sorry for the trouble.

@edemaine
Copy link
Owner

edemaine commented Jul 27, 2019

@mrprajesh You're not setting the environment variable correctly, as evidenced by the App running at: http://localhost:3000/ output which should instead output the ROOT_URL (just tested on both Linux and Windows).

In Bash (and all Bourne shells), ROOT_URL=http://10.6.3.10:3000 will set a variable in the shell, but will not pass it into programs like meteor. Instead, you need to write

export ROOT_URL=http://10.6.3.10:3000

(Alternatively, you can write ROOT_URL=http://10.6.3.10:3000 meteor every time you run meteor.)

@mrprajesh
Copy link
Author

Oh my bad. Sorry. Now, I understood env variable better. It works :-)
Thank you very much Erik. Thanks for your time.
Yay! Now, I will invite others to use it. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants