atlas-engineer / nyxt

Nyxt - the hacker's browser.
https://nyxt-browser.com/
9.88k stars 413 forks source link

Next freezes in EXWM #184

Closed BonfaceKilz closed 5 years ago

BonfaceKilz commented 5 years ago

I tried out Next from a the Emacs subreddit when someone suggested that it would be a nice fit to EXWM's environment. Next freezes(there's a blank screen) whenever I try to follow a link. I have downloaded Next from ArchLinux's AUR repositories. Any help fixing this would be highly appreciated.

Ambrevar commented 5 years ago

Can you run M-x NEXT-VERSION and report the result?

I also use EXWM and it works fine by me. Can you share an offending website and the link on which you click that make Next go blank?

BonfaceKilz commented 5 years ago

The Next version I'm using is: Version 1.2.0-7a62fa2

The blank page appeared from the QuickStart guide when I tried to open the user manual link. In the morning, the issue was still there, but now (tbh I have no idea what has changed) links are working. Imo this is weird. Is there a way that Next logs errors in some log file?

Ambrevar commented 5 years ago

Next logs errors in /tmp/next-$USER/next-gtk-webkit.log.

I've experienced this issues a few times but only very rarely. This might be the same as #182.

@jmercouris, thoughts?

jmercouris commented 5 years ago

maybe the page isn’t loading because of your internet, does the minibuffer ever appear and say “loading”? or does it just stay the same?

BonfaceKilz commented 5 years ago

I've restarted Next and it's frozen. @jmercouris I don't think the problem is the internet. Next has been frozen for the past 10 minutes now. Here's the log:

** Message: 13:50:12.557: Method result(s): callback id 5
** Message: 13:50:12.558: Method name: window.active
** Message: 13:50:12.558: Method parameter(s): 0
** Message: 13:50:12.559: XML-RPC message: BUFFER-JAVASCRIPT-CALL-BACK (buffer id, javascript, callback id) = (0, ..., 5)
** Message: 13:50:12.559: Method name: window.set.minibuffer.height
** Message: 13:50:12.559: Method parameter(s): window id 0, minibuffer height 200
** Message: 13:50:12.559: Window 0 resizes its minibuffer to 200
** Message: 13:50:12.559: Method result(s): minibuffer preferred height 200
** Message: 13:50:12.560: Method name: window.active
** Message: 13:50:12.560: Method parameter(s): 0
** Message: 13:50:12.562: Method name: window.active
** Message: 13:50:12.562: Method parameter(s): 0
** Message: 13:50:12.563: Method name: window.set.title
** Message: 13:50:12.563: Method parameter(s): 0, Next - Next - undefined
** Message: 13:50:12.573: Method name: window.active
** Message: 13:50:12.573: Method parameter(s): 0
** Message: 13:50:12.574: Method name: window.set.title
** Message: 13:50:12.574: Method parameter(s): 0, Next - undefined - https://next.atlas.engineer/quickstart
** Message: 13:50:12.577: Method name: window.active
** Message: 13:50:12.578: Method parameter(s): 0
** Message: 13:50:12.579: Method name: window.active
** Message: 13:50:12.579: Method parameter(s): 0
** Message: 13:50:12.580: Method name: minibuffer.evaluate.javascript
** Message: 13:50:12.581: Method parameter(s): window id 0
** Message: 13:50:12.581: Method result(s): callback id 6
** Message: 13:50:12.583: Method name: window.active
** Message: 13:50:12.583: Method parameter(s): 0
** Message: 13:50:12.583: XML-RPC message: BUFFER-JAVASCRIPT-CALL-BACK (buffer id, javascript, callback id) = (0, ..., 6)
** Message: 13:50:12.587: Method name: minibuffer.evaluate.javascript
** Message: 13:50:12.587: Method parameter(s): window id 0
** Message: 13:50:12.587: Method result(s): callback id 7
** Message: 13:50:12.588: XML-RPC message: BUFFER-JAVASCRIPT-CALL-BACK (buffer id, javascript, callback id) = (0, ..., 7)
** Message: 13:50:12.589: Method name: window.active
** Message: 13:50:12.589: Method parameter(s): 0
** Message: 13:50:12.590: Method name: minibuffer.evaluate.javascript
** Message: 13:50:12.590: Method parameter(s): window id 0
** Message: 13:50:12.590: Method result(s): callback id 8
** Message: 13:50:12.592: Method name: window.active
** Message: 13:50:12.592: Method parameter(s): 0
** Message: 13:50:12.593: XML-RPC message: BUFFER-JAVASCRIPT-CALL-BACK (buffer id, javascript, callback id) = (0, ..., 8)
** Message: 13:50:12.593: Method name: window.set.minibuffer.height
** Message: 13:50:12.594: Method parameter(s): window id 0, minibuffer height 200
** Message: 13:50:12.594: Window 0 resizes its minibuffer to 200
** Message: 13:50:12.594: Method result(s): minibuffer preferred height 200
** Message: 13:50:12.595: Method name: window.active
** Message: 13:50:12.595: Method parameter(s): 0
** Message: 13:50:12.598: Method name: window.active
** Message: 13:50:12.598: Method parameter(s): 0
** Message: 13:50:12.599: Method name: window.set.title
** Message: 13:50:12.599: Method parameter(s): 0, Next - <ul></ul> - undefined
** Message: 13:50:14.529: XML-RPC message: PUSH-KEY-EVENT (keycode, keyval, modifiers, window id) = (43, 'D', ['s'], '0')
** Message: 13:50:14.532: XML-RPC message: CONSUME-KEY-SEQUENCE, window id 0
** Message: 13:50:14.535: Method name: window.active
** Message: 13:50:14.536: Method parameter(s): 0
** Message: 13:50:14.537: Method name: minibuffer.evaluate.javascript
** Message: 13:50:14.538: Method parameter(s): window id 0
** Message: 13:50:14.538: Method result(s): callback id 9
** Message: 13:50:14.541: XML-RPC message: BUFFER-JAVASCRIPT-CALL-BACK (buffer id, javascript, callback id) = (0, ..., 9)
** Message: 13:50:15.157: XML-RPC message: PUSH-KEY-EVENT (keycode, keyval, modifiers, window id) = (36, '\r', @as [], '0')
** Message: 13:50:15.160: XML-RPC message: CONSUME-KEY-SEQUENCE, window id 0
** Message: 13:50:15.163: Method name: window.active
** Message: 13:50:15.163: Method parameter(s): 0
** Message: 13:50:15.165: Method name: window.set.minibuffer.height
** Message: 13:50:15.165: Method parameter(s): window id 0, minibuffer height 0
** Message: 13:50:15.165: Window 0 resizes its minibuffer to 0
** Message: 13:50:15.165: Method result(s): minibuffer preferred height 0
** Message: 13:50:15.179: Method name: window.active
** Message: 13:50:15.180: Method parameter(s): 0
** Message: 13:50:15.181: Method name: buffer.make
** Message: 13:50:15.181: Method parameter(s): /home/bonface/.local/share/next/cookies.txt
** Message: 13:50:15.182: Method result(s): buffer id 1
** Message: 13:50:15.184: Method name: window.set.active.buffer
** Message: 13:50:15.184: Method parameter(s): window id 0, buffer id 1
** Message: 13:50:15.184: Window 0 switches from buffer 0 to 1
** Message: 13:51:29.789: XML-RPC message: PUSH-KEY-EVENT (keycode, keyval, modifiers, window id) = (116, 'Down', @as [], '0')

** (next-gtk-webkit:25926): WARNING **: 13:51:29.792: Malformed XML-RPC response: The slot NEXT::MODE is unbound in the object #<BUFFER {10055C19E3}>.
** Message: 13:51:30.609: XML-RPC message: PUSH-KEY-EVENT (keycode, keyval, modifiers, window id) = (116, 'Down', @as [], '0')

** (next-gtk-webkit:25926): WARNING **: 13:51:30.612: Malformed XML-RPC response: The slot NEXT::MODE is unbound in the object #<BUFFER {10055C19E3}>.
** Message: 13:51:32.525: XML-RPC message: PUSH-KEY-EVENT (keycode, keyval, modifiers, window id) = (116, 'Down', @as [], '0')

** (next-gtk-webkit:25926): WARNING **: 13:51:32.528: Malformed XML-RPC response: The slot NEXT::MODE is unbound in the object #<BUFFER {10055C19E3}>.
** Message: 13:51:33.497: XML-RPC message: PUSH-KEY-EVENT (keycode, keyval, modifiers, window id) = (116, 'Down', @as [], '0')

** (next-gtk-webkit:25926): WARNING **: 13:51:33.500: Malformed XML-RPC response: The slot NEXT::MODE is unbound in the object #<BUFFER {10055C19E3}>.
** Message: 13:51:34.048: XML-RPC message: PUSH-KEY-EVENT (keycode, keyval, modifiers, window id) = (116, 'Down', @as [], '0')

** (next-gtk-webkit:25926): WARNING **: 13:51:34.051: Malformed XML-RPC response: The slot NEXT::MODE is unbound in the object #<BUFFER {10055C19E3}>.
** Message: 13:51:34.758: XML-RPC message: PUSH-KEY-EVENT (keycode, keyval, modifiers, window id) = (116, 'Down', @as [], '0')

** (next-gtk-webkit:25926): WARNING **: 13:51:34.761: Malformed XML-RPC response: The slot NEXT::MODE is unbound in the object #<BUFFER {10055C19E3}>.
** Message: 13:51:39.134: XML-RPC message: PUSH-KEY-EVENT (keycode, keyval, modifiers, window id) = (46, 'n', ['C'], '0')

** (next-gtk-webkit:25926): WARNING **: 13:51:39.138: Malformed XML-RPC response: The slot NEXT::MODE is unbound in the object #<BUFFER {10055C19E3}>.
** Message: 13:51:40.106: XML-RPC message: PUSH-KEY-EVENT (keycode, keyval, modifiers, window id) = (46, 'n', ['C'], '0')

** (next-gtk-webkit:25926): WARNING **: 13:51:40.109: Malformed XML-RPC response: The slot NEXT::MODE is unbound in the object #<BUFFER {10055C19E3}>.
** Message: 13:51:41.881: XML-RPC message: PUSH-KEY-EVENT (keycode, keyval, modifiers, window id) = (46, 'n', ['C'], '0')

** (next-gtk-webkit:25926): WARNING **: 13:51:41.884: Malformed XML-RPC response: The slot NEXT::MODE is unbound in the object #<BUFFER {10055C19E3}>.
** Message: 13:51:42.151: XML-RPC message: PUSH-KEY-EVENT (keycode, keyval, modifiers, window id) = (46, 'n', ['C'], '0')

** (next-gtk-webkit:25926): WARNING **: 13:51:42.154: Malformed XML-RPC response: The slot NEXT::MODE is unbound in the object #<BUFFER {10055C19E3}>.
jmercouris commented 5 years ago

Hi thank you for sharing, very interesting log. It seems at some point the buffer lost its mode. I'm not sure how that would happen. A buffer was created, but the mode of the buffer was lost.

** (next-gtk-webkit:25926): WARNING **: 13:51:29.792: Malformed XML-RPC response: The slot NEXT::MODE is unbound in the object #<BUFFER {10055C19E3}>. ** Message: 13:51:30.609: XML-RPC message: PUSH-KEY-EVENT (keycode, keyval, modifiers, window id) = (116, 'Down', @as [], '0')

This is very useful, we'll dig into the code and see if we can figure out how to recreate this issue consistently. Once again, thank you!

BonfaceKilz commented 5 years ago

@Ambrevar and @jmercouris I've started reading the code base(I'm getting into CLisp), and I noticed that there are zero tests. How do you guys test the browser?

jmercouris commented 5 years ago

We test the browser manually. It is changing too much to write significant test cases. When we hit a more solid API we’ll write some tests.

spiderbit commented 5 years ago

I also have much crashes with exwm/next especially if I try to follow a link with C-g

Message: 05:38:36.098: XML-RPC message: BUFFER-JAVASCRIPT-CALL-BACK (buffer id, javascript, callback id) = (0, ..., 19) Message: 05:38:36.598: XML-RPC message: PUSH-KEY-EVENT (keycode, keyval, modifiers, window id) = (36, '\r', @as [], '0') Message: 05:38:36.600: XML-RPC message: CONSUME-KEY-SEQUENCE, window id 0 Message: 05:38:36.603: Method name: window.active Message: 05:38:36.603: Method parameter(s): 0 Message: 05:38:36.604: Method name: window.set.minibuffer.height Message: 05:38:36.604: Method parameter(s): window id 0, minibuffer height 0 Message: 05:38:36.604: Window 0 resizes its minibuffer to 0 Message: 05:38:36.604: Method result(s): minibuffer preferred height 0 Message: 05:38:36.689: Method name: window.active Message: 05:38:36.689: Method parameter(s): 0 Message: 05:38:36.693: Method name: buffer.make Message: 05:38:36.693: Method parameter(s): /home/black/.local/share/next/cookies.txt Message: 05:38:36.695: Method result(s): buffer id 1 Message: 05:38:36.697: Method name: window.set.active.buffer Message: 05:38:36.698: Method parameter(s): window id 0, buffer id 1 Message: 05:38:36.698: Window 0 switches from buffer 0 to 1 Message: 05:38:40.623: XML-RPC message: WINDOW-WILL-CLOSE ('0',)

not sure that helps.

Ambrevar commented 5 years ago

I think this is #182 and I don't think EXWM is related to this.

Why do you think it freezes in EXWM in particular? Have you tried without EXWM?

spiderbit commented 5 years ago

Yeah sorry didn't test it outside exwm yet, will do that. But in the linked bug there is talk about spamming a key comb, I only try 1 C-g and it loads a white screen instead of the page selected.

Ambrevar commented 5 years ago

From which page and on which link?

spiderbit commented 5 years ago

Every page / every link or most.

Ambrevar commented 5 years ago

I've tried using Next without EXWM (with StumpWM), and I can reproduce the hangs / crashes. I don't think that EXWM has anything to do with this issue.

Ambrevar commented 5 years ago

This should be fixed in Next 1.2.1. Feel free to re-open if you still experience the issue.

flnth commented 5 years ago

Having been affected by this the first time I tried out next, I just came back to see if the issue was still persisting. Unfortunately, it is.

I tried both the current guix version, as well as the provided 1.2.2 from your website. As soon as I try to load some website using C-l, e.g. www.google.de, the browser freezes, showing me all but an open (expanded?) minibuffer which says "Loading: https://www.google.de.". The rest of the screen is blank.

The CPU is not being utilized. This is the output generated via --verbose:

  Key sequence ((NIL
                 RETURN)) bound to #<STANDARD-GENERIC-FUNCTION NEXT::RETURN-INPUT (1)>
<DEBUG> [17:36:42] next remote.lisp (%%generate-input-event remote-interface window key-chord) -
  Generate input (36 (R) 65293 (-1 -1)) for window 1
<DEBUG> [17:36:42] next remote.lisp () - Mouse button0, modifiers NIL
 <INFO> [17:36:42] next remote.lisp () -
  Forwarding https://www.google.de/ back to platform port
<DEBUG> [17:36:42] next remote.lisp () - Mouse , modifiers NIL
 <INFO> [17:36:42] next remote.lisp () -
  Forwarding https://www.google.de/ back to platform port
<DEBUG> [17:36:42] next remote.lisp () - Mouse button0, modifiers NIL
 <INFO> [17:36:42] next remote.lisp () -
  Forwarding https://consent.google.com/?hl=en&origin=https://www.google.de&continue=https://www.google.de/&if=1&l=0&m=0&pc=s&wp=-1&gl=DE back to platform port     

I see no log file in /tmp, so I can't output that content also.

It's unfortunate you don't do proper unit-testing - I'd very much like to give next a chance.

jmercouris commented 5 years ago

@flnth have you perchance tried to compile the latest from source? A lot has changed since the Guix pack available on our site. I am sorry to disappoint you. We try to package all dependencies and test, but we can't always get everything. With regards to unit tests, that would not help in this case as there are two programs interacting, we would have to write integration tests.

Ambrevar commented 5 years ago

For what it's worth, on master I can load google.de with no problem. If you can't compile master, 1.3 is coming soon and should be a deal changer, hopefully it will work for you :)

Thanks for your patience!

spiderbit commented 5 years ago

Yes I have to defend the next-browser devs here, the software itself is in a early status and then you have EXWM another software that not that many people use even for Linux standards :D you can't expect them writing for everything tests on top of that.

It's hard to have unit tests for everything or like @jmercouris said integration tests for everything, even if you are trying.

I did not do it for my recent software because it can be very time consuming for a project you do for free not justifiable imho.

flnth commented 5 years ago

Thanks for the answers, everyone. Unfortunately I can indeed not build next on my system at the moment:

/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libgio-2.0.so: undefined reference to `g_utf8_validate_len'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libwebkit2gtk-4.0.so: undefined reference to `cairo_font_options_set_variations'

Looks like I will have to wait for your 1.3.0 release. Looking forward to it.

Ambrevar commented 5 years ago

Make sure you've installed all the required libraries:

What's your OS? It needs to be "modern" enough, old networking / web libraries won't do.