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

Froze on Loading #620

Closed
ghost opened this issue Apr 10, 2012 · 28 comments · Fixed by #622
Closed

Froze on Loading #620

ghost opened this issue Apr 10, 2012 · 28 comments · Fixed by #622

Comments

@ghost
Copy link

ghost commented Apr 10, 2012

Hey all,

some days ago i installed etherpad-lite. on installation all went fine but i think there is a problem with the database and i don´t know how to fix it.
I created an mysql user and a database and went on like the how to it say´s.

When i start etherpad-lite via script i can read this at log:

[32m[2012-04-10 13:56:43.875] [INFO] console - [39mYour Etherpad Lite git version is 309e3b0
[32m[2012-04-10 13:56:43.877] [INFO] console - [39mReport bugs at https://github.com/Pita/etherpad-lite/issues
[32m[2012-04-10 13:56:44.031] [INFO] console - [39mServer is listening at 88.198.116.77:9001
[32m[2012-04-10 13:56:44.032] [INFO] console - [39m �[36minfo -�[39m 'socket.io started'

and when i go on the site this apperas at log:

[32m[2012-04-10 13:57:06.482] [INFO] http -[39m200, GET /p/5CrUAwYnoW
[32m[2012-04-10 13:57:06.962] [INFO] http -[39m200, GET /minified/pad.js?callback=require.define
[32m[2012-04-10 13:57:07.012] [INFO] http -[39m200, GET /minified/pad/index.js?callback=require.define

on browser etherpad-lite freeze on "Loading..."
also the log stop until a new website request.

Anyone have an idee what i do wrong /where the problem is?

@jhollinger
Copy link
Contributor

The develop branch is freezing quite a bit for me on "Loading..." as well, thought it looks like a javascript problem.

@ghost
Copy link
Author

ghost commented Apr 10, 2012

Okay but how can i fix it?

@fourplusone
Copy link
Contributor

Which Browser/OS are you using

@ghost
Copy link
Author

ghost commented Apr 10, 2012

I use Win 7 Mozilla 11.0/ Chrome 18.0.xxx

Server is Ubutnu 10.04 LTS with Apache

@jhollinger
Copy link
Contributor

Does your browser report any js errors?

@ghost
Copy link
Author

ghost commented Apr 10, 2012

Yep

[17:23:21.392] The module at "/pad" does not exist. @ http://88.198.116.77:9001/static/js/require-kernel.js:1

@edy
Copy link
Contributor

edy commented Apr 10, 2012

same issue here with Firefox 11 (Chrome and Safari are OK)

$ git clone https://github.com/Pita/etherpad-lite.git && cd etherpad-lite
$ git checkout develop
$ ./bin/run.sh

Mac OS X 10.7.3
Firefox 11.0 (new installation, new profile but with Firebug installed)

Alt Text

@ghost
Copy link
Author

ghost commented Apr 10, 2012

not at all Chrome isn´t ok @ me

@fourplusone
Copy link
Contributor

@edy-b can you confirm that 1260044 works and that c65216a does not?

@edy
Copy link
Contributor

edy commented Apr 10, 2012

yes! 1260044 works and c65216a doesn't

@jhollinger
Copy link
Contributor

Firebug hangs and gets no response from http://localhost:9001/javascripts/lib/ep_etherpad-lite/static/js/ace2_inner.js?callback=require.define. If I visit that url manually however, it servers just fine.

Chromium says Uncaught ReferenceError: translate is not defined.

@0ip
Copy link
Member

0ip commented Apr 10, 2012

Deleting "document.domain = document.domain;" in pad.html helps.
(develop branch, tested on Ubuntu Firefox 11)

@edy
Copy link
Contributor

edy commented Apr 10, 2012

@0ip thank you!

@jhollinger
Copy link
Contributor

@0ip it doesn't seem to help in my case. Same errors as before.

@jhollinger
Copy link
Contributor

Chromium is dying at pad_userlist.js:713 translate("Enter your name"). translate is used a lot, but neither Chrome or I can find it defined it anywhere.

@jhollinger
Copy link
Contributor

Yes, that's definitely the problem. I defined a rather dull translate function (which simply echos what you pass it). Now both Chrome and FF work. So...where is the real translate function?

@fourplusone
Copy link
Contributor

@jhollinger can you specify the commit where translate is beeing used? cant find it on develop or master

@jhollinger
Copy link
Contributor

I'm at the most recent checkout of develop. It's used about a dozen times.

@fourplusone
Copy link
Contributor

@jhollinger
Copy link
Contributor

What the crap, git? Maybe my branch is screwed up.

@jhollinger
Copy link
Contributor

I like git but every now and then I have to delete everything and refork for no reason...grrr. That fixed translate in Chrome. But FF still hangs on ace2_inner.js.

@0ip
Copy link
Member

0ip commented Apr 10, 2012

I'm running 67d9f73.
Do you get that ace2_inner.js error here: http://pad.factor.cc:9002/p/tadzlvfjAx too?

@jhollinger
Copy link
Contributor

@0ip same problem at your link. (FF isn't actually throwing an error. It just hangs on "Loading" and Firebug shows that the request for ace2_inner.js never completes.)

@jhollinger
Copy link
Contributor

beta.etherpad.org doesn't work for me in FF either, looks like same issue.

@jhollinger
Copy link
Contributor

I now believe this to be a Minify issue. I disabled minify and now it works. Investigating.

@jhollinger
Copy link
Contributor

The problem seems to be triggered in pad.html. The fact that no errors are thrown makes it difficult to track down. But so far I've found two workarounds:

  1. Remove ?callback=require.define from <script type="text/javascript" src="../javascripts/lib/ep_etherpad-lite/static/js/pad.js?callback=require.define"></script>

Or

  1. Put pad = require('ep_etherpad-lite/static/js/pad').pad; inside of a 1 second setTimeout.

Does this make sense to anyone more familiar with kernel.require or yajsml? It only seems to be a problem in FF, so I guess the problem could be there, too.

@cweider
Copy link
Contributor

cweider commented Apr 11, 2012

@jhollinger, I’m looking into it. First thing I ought to do is adjust 22eaa6f, That conditional means that the packaging middleware is never exercised in development… so nobody will ever notice when integration with that breaks down.

cweider added a commit to cweider/etherpad-lite that referenced this issue Apr 11, 2012
@cweider cweider mentioned this issue Apr 11, 2012
@cweider cweider mentioned this issue Apr 11, 2012
@cweider
Copy link
Contributor

cweider commented Apr 11, 2012

I don’t have a full understanding on exactly what is happening, but the end effect was that the following lines:

--- a/src/templates/pad.html
+++ b/src/templates/pad.html
@@ -287,11 +287,14 @@

                   var plugins = require('ep_etherpad-lite/static/js/pluginfw/plugins');
                   plugins.update(function () {
+                    console.log('interrupted');
                     require('ep_etherpad-lite/static/js/pad').init();
                   });

                   /* TODO: These globals shouldn't exist. */
+                  console.log('- require');
                   pad = require('ep_etherpad-lite/static/js/pad').pad;
+                  console.log('+ require');
                   chat = require('ep_etherpad-lite/static/js/chat').chat;
                   padeditbar = require('ep_etherpad-lite/static/js/pad_editbar').padeditbar;
                   padimpexp = require('ep_etherpad-lite/static/js/pad_impexp').padimpexp;

Executed in this order:

- require
interrupted
+ require

I’m not a fan of what this appears to imply (that update’s XHR is preempting other JS code) and there are plenty of other things to cause this odd behavior (communication between our ~3 frames is more feasible), but anyways, scheduling the callback fixes the issue, which is good enough for me.

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

Successfully merging a pull request may close this issue.

5 participants