GREYFOXRGR / shellinabox

Automatically exported from code.google.com/p/shellinabox
Other
0 stars 0 forks source link

Blank screen in Chrome Version 31.0.1650.57 m #245

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Install Chrome Version 31.0.1650.57 m
2. Go to https://code.google.com/p/shellinabox/
3. The basic interpreter demo shows a white screen.

This behaviour (blank schreen) is also observed on my own installations of 
shellinabox.

What is the expected output? What do you see instead?

When doing the above in with FireFox 21.0, I see the basic interpreter, just 
like a did with previous versions of Chrome.

What version of the product are you using? On what operating system?

Chrome Version 31.0.1650.57 m on Windows 7.
I run shellinabox-2.14 on my own server. Not sure about the version of the demo 
on https://code.google.com/p/shellinabox/

Please provide any additional information below.

Original issue reported on code.google.com by rani...@argentini.net on 20 Nov 2013 at 12:27

GoogleCodeExporter commented 8 years ago
Same problem on OSX.  Shell in a box doesn't work with v31 but works fine with 
v30

Original comment by jlsonl...@gmail.com on 21 Nov 2013 at 1:01

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Same problem, Firefox Portable ESR 24.1.1 shows the console.
Internet Explorer 64-bit 11.0.9600.16428 doesn't work either.

Running from my Raspberry PI, installed from Raspbian's repository.

Original comment by william....@gmail.com on 23 Nov 2013 at 1:50

GoogleCodeExporter commented 8 years ago
Same problem

Original comment by Elie.lia...@gmail.com on 23 Nov 2013 at 10:45

GoogleCodeExporter commented 8 years ago
The problem seems to be that the program is trying to determine a character 
width by writing an nbsp into a hidden pre named 'cursor' and reading back the 
clientWidth of the element.  For whatever reason, the width comes back as zero. 
 That causes a divide by zero later on on the resize function, and eventually 
crashes chrome.   From the comments in the code, it looks like the clientWidth 
can sometimes not be valid so the code tries to grab the width into a variable 
at init time.  In this version of chrome, the width isn't valid at init time 
either, so a zero gets cached.

This is the first time I've ever looked at javascript, so I'm afraid I can't 
say how to wait for the clientWidth of cursor to be valid, but I've worked up a 
small patch that checks for the zero width and tries to deal with it.  This is 
probably not the right way to do it, but it gets the shellinabox code back up 
and running for me.

Original comment by mala...@jeffrika.com on 24 Nov 2013 at 6:08

Attachments:

GoogleCodeExporter commented 8 years ago
Same problem here
ShellInABox version 2.10 (revision 239)
Google Chrome Version 31.0.1650.57 

Not sure how to apply that diff file. If I look at it's contents it would 
appear that the file is attempting to modify vt100.jspp from the following 
location?

+++ /home/malakai/mud/shellinabox/shellinabox/shellinabox/vt100.jspp 

however I can't find a vt100.jspp file on my box at all to run this patch 
against. 

Original comment by rckclmb...@gmail.com on 26 Nov 2013 at 7:44

GoogleCodeExporter commented 8 years ago
Same issue here.

Original comment by facemelt...@gmail.com on 27 Nov 2013 at 1:56

GoogleCodeExporter commented 8 years ago
Dear #5:

I have tested the patch and found it satisfactory ;)

Thanks!

Dear #6:

What I did (Ubuntu 12.04):

$ git clone https://code.google.com/p/shellinabox/
$ cd shellinabox
$ wget <url of the patch on a pastebin>
$ patch -p1 --dry-run < my.diff
< check that everything applied ok >
$ patch -p1 < my.diff
$ dpkg-buildpackage -b
$ sudo dpkg -i ../shellinabox-2.14-1
$ sudo service restart shellinabox

Obviously, YMMV depending on your distro and/or installed packages.

Original comment by rani...@argentini.net on 27 Nov 2013 at 12:13

GoogleCodeExporter commented 8 years ago
Thanks #8 that gave me enough info to apply the fix #6 posted 

For any other linux nobs I would add the following 

probably not necessary but;
$ sudo apt-get remove shellinabox

after applying patch be sure to check dependencies first. I was missing quite a 
few
$ sudo dpkg-checkbuilddeps

so for the full script as follows;

$ sudo apt-get remove shellinabox
$ git clone https://code.google.com/p/shellinabox/
$ cd shellinabox
$ wget <url of the patch on a pastebin>
$ patch -p1 --dry-run < my.diff
< check that everything applied ok >
$ patch -p1 < my.diff
$ sudo dpkg-checkbuilddeps
# install any missing dep: sudo apt-get install [dep]
$ dpkg-buildpackage -b
$ sudo dpkg -i ../shellinabox_2.14-1[arch]

be sure to change /etc/defaults/shellinabox 
SHELLINABOX_PORT=[port]
SHELLINABOX_ARGS="--no-beep -s /:SSH:[ip of host]"

$ sudo service restart shellinabox

and thanks again #6

Original comment by rckclmb...@gmail.com on 27 Nov 2013 at 6:24

GoogleCodeExporter commented 8 years ago
Windows 7 Professional
Chrome Version 31.0.1650.57 m
ShellInABox version 2.10 (revision 239)

I had the same problem, I found that I had blocked Popups in chrome.
Working ShellInABox in Chrome: 
http://i.imgur.com/KpQtTPC.jpg

Original comment by ali...@gmail.com on 30 Nov 2013 at 8:19

GoogleCodeExporter commented 8 years ago
Awesome. The patch worked for me too. Thanks!

Original comment by pyron...@gmail.com on 16 Dec 2013 at 5:39

GoogleCodeExporter commented 8 years ago
Patch works for me too.

I also added the following to remove the invalid XHR setRequestHeader calls:

Index: shellinabox-2.14/shellinabox/shell_in_a_box.jspp                         

===================================================================             

--- shellinabox-2.14.orig/shellinabox/shell_in_a_box.jspp       2013-12-17 
09:39:19.190292733 +1100               
+++ shellinabox-2.14/shellinabox/shell_in_a_box.jspp    2013-12-17 
09:40:15.897295997 +1100                       
@@ -172,7 +172,7 @@                                                             

                                (this.session ? '&session=' +                                                     
                                 encodeURIComponent(this.session) : '&rooturl='+                                  
                                 encodeURIComponent(this.rooturl));                                               
-  request.setRequestHeader('Content-Length', content.length);                  

+//  request.setRequestHeader('Content-Length', content.length);                

   request.onreadystatechange = function(shellInABox) {                                                           
     return function() {                                                                                          
@@ -230,7 +230,7 @@                                                             

                                  '&height=' + this.terminalHeight +                                              
                                  '&session=' +encodeURIComponent(this.session)+                                  
                                  '&keys=' + encodeURIComponent(keys);                                            
-    request.setRequestHeader('Content-Length', content.length);                

+//    request.setRequestHeader('Content-Length', content.length);              

     request.onreadystatechange = function(shellInABox) {                                                         
       return function() {                                                                                        
                try {                                                                                             

Original comment by t...@dack.com.au on 16 Dec 2013 at 11:05

GoogleCodeExporter commented 8 years ago
Im having this exact same problem but I dont understand how to apply the patch. 
#8 and #9, where is the shellinabox directory Im supposed to start at?

I guess Ill just created a directory named shellinabox for now. But now when I 
try doing "patch -p1 --dry-run < my.diff" I get this:

can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- shellinabox-2.14/shellinabox/vt100.jspp    2012-04-21 10:30:44.000000000 
-0700
|+++ /home/malakai/mud/shellinabox/shellinabox/shellinabox/vt100.jspp   
2013-11-23 20:43:24.531934272 -0800
--------------------------

It then asks me to choose a file to patch.. ok.. so I pick 
shellinabox_2.14-1_amd64.deb which is in the same directory as everything else. 
After this, it gives me the output:

patching file shellinabox_2.14-1_amd64.deb
Hunk #1 FAILED at 175.
Hunk #2 FAILED at 1157.
Hunk #3 FAILED at 1531.
3 out of 3 hunks FAILED -- saving rejects to file 
shellinabox_2.14-1_amd64.deb.rej

And lastly, dpkg-checkbuilddeps isnt even a usable command... Im using debian 
linux 7.2 64x.

Please help! These instructions make no sense :(  

Original comment by solanmca...@gmail.com on 6 Jan 2014 at 3:26

GoogleCodeExporter commented 8 years ago
I applied the patch given by #5  without any modifications, on archlinux, and 
it didn't fix the blank screen issue for me, in Chrome 32.0.1700 (windows 7,) 
and with shellinabox 2.10 (revision 239.)

Does anyone have any advice here? Were the modifications given by other users 
necessary? Wasn't sure how to make them so I just used the orignal .diff..

Original comment by bensutto...@gmail.com on 16 Jan 2014 at 11:24

GoogleCodeExporter commented 8 years ago
Correction, I'm using 2.14, but shellinaboxd --version outputs:

  "ShellInABox version 2.10 (revision 239)"

For some reason.

Original comment by bensutto...@gmail.com on 16 Jan 2014 at 11:36

GoogleCodeExporter commented 8 years ago
just added a package to my ppa that includes both patches. Currently for Ubuntu 
Saucy https://launchpad.net/~managementboy/+archive/ppa/+packages

Original comment by manageme...@gmail.com on 21 Jan 2014 at 11:38

GoogleCodeExporter commented 8 years ago
I've a patched repo with the pre-built debian package binary for those 
interested. It includes this my.diff.
https://github.com/anilgulecha/shellinabox
https://github.com/anilgulecha/shellinabox/releases

Original comment by a...@hackerrank.com on 7 Jul 2014 at 2:00