all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#23290: 25.1.50; eww: Symbol’s value as variable is void: url-http-response-status
@ 2016-04-14 19:08 Michael Heerdegen
  2016-04-15 17:20 ` Tao Fang
  0 siblings, 1 reply; 9+ messages in thread
From: Michael Heerdegen @ 2016-04-14 19:08 UTC (permalink / raw
  To: 23290; +Cc: Lars Ingebrigtsen, Tao Fang


Hello,

since some time, I often get this error when surfing with eww:

  error in process filter:
  url-http-content-length-after-change-function:
  Symbol’s value as variable is void: url-http-response-status

I guess this is related to (sorry if I'm wrong)

  3c623c26ae7d695746e05d8a2e16a67a6256b024
  Author:     Tao Fang <fangtao0901@gmail.com>
  AuthorDate: Mon Apr 4 22:21:21 2016 +0200
  Commit:     Lars Magne Ingebrigtsen <larsi@gnus.org>
  CommitDate: Mon Apr 4 22:21:34 2016 +0200
  
  Allow URL using HTTPS proxies using CONNECT

Here is a URL for that I can reproduce the problem:

  https://lite.qwant.com/?t=images&q=test


Thanks,

Michael.



In GNU Emacs 25.1.50.7 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9)
 of 2016-04-11 built on drachen
Repository revision: d6ea6453f3d1696b9e6cd0a0222fc77dc646365c
Windowing system distributor 'The X.Org Foundation', version 11.0.11803000
System Description:	Debian GNU/Linux testing (stretch)

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND DBUS GSETTINGS NOTIFY
LIBXML2 FREETYPE XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11

Important settings:
  value of $LC_ALL: de_DE.utf8
  value of $LC_COLLATE: C
  value of $LC_TIME: C
  value of $LANG: de_DE.utf8
  locale-coding-system: utf-8-unix






^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#23290: 25.1.50; eww: Symbol’s value as variable is void: url-http-response-status
  2016-04-14 19:08 bug#23290: 25.1.50; eww: Symbol’s value as variable is void: url-http-response-status Michael Heerdegen
@ 2016-04-15 17:20 ` Tao Fang
  2016-04-16 14:08   ` Michael Heerdegen
  0 siblings, 1 reply; 9+ messages in thread
From: Tao Fang @ 2016-04-15 17:20 UTC (permalink / raw
  To: Michael Heerdegen; +Cc: larsi, 23290

Hi, Michael

> I guess this is related to (sorry if I'm wrong)
No, you don't. It's a reasonable doubt. Thanks for your report!

> Here is a URL for that I can reproduce the problem:
>
>   https://lite.qwant.com/?t=images&q=test
I'm assuming the reproduce step of this issue is: using eww open that
url directly after starting up emacs with "emacs -Q" ?

> Configured features:
> XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND DBUS GSETTINGS NOTIFY
> LIBXML2 FREETYPE XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11
I've noticed that your configure doesn't have "GNUTLS" support, if
you're using "url-proxy-services", it will produce message like "error:
gnutls support needed" in buffer "*Messages*" (which I got when trying
to reproduce this with same configure).

> Repository revision: d6ea6453f3d1696b9e6cd0a0222fc77dc646365c
I've compiled emacs with git commit
d6ea6453f3d1696b9e6cd0a0222fc77dc646365c and configure
"--without-gnutls" but didn't reproduce this.
And I had also tried to set up a proxy
(https://github.com/tinyproxy/tinyproxy), and still no luck with some
simple test.

Can you provide more information about this? With following settings:
    (setq debug-on-error t)
    (setq url-debug 1)
and when the problem occurs, save the content of buffer "*Messages*"
and "*Backtrace*", then paste it here?

There is also a bug report bug#23225, I don't know if it's related to
this commit, but I will try to work it out.

Thanks!

-- 
Emacs/Gnus





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#23290: 25.1.50; eww: Symbol’s value as variable is void: url-http-response-status
  2016-04-15 17:20 ` Tao Fang
@ 2016-04-16 14:08   ` Michael Heerdegen
  2016-04-16 17:14     ` Michael Heerdegen
  2016-04-16 17:19     ` Tao Fang
  0 siblings, 2 replies; 9+ messages in thread
From: Michael Heerdegen @ 2016-04-16 14:08 UTC (permalink / raw
  To: Tao Fang; +Cc: larsi, 23290

Tao Fang <fangtao0901@gmail.com> writes:

> > Here is a URL for that I can reproduce the problem:
> >
> >   https://lite.qwant.com/?t=images&q=test
> I'm assuming the reproduce step of this issue is: using eww open that
> url directly after starting up emacs with "emacs -Q" ?

Yes.

> > Configured features:
> > XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND DBUS GSETTINGS NOTIFY
> > LIBXML2 FREETYPE XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11
> I've noticed that your configure doesn't have "GNUTLS" support, if
> you're using "url-proxy-services", it will produce message like "error:
> gnutls support needed" in buffer "*Messages*" (which I got when trying
> to reproduce this with same configure).

Maybe my OS (Debian testing) is missing some dev packages?  FWIW, I
don't see this error in the emacs-25 branch.


> > Repository revision: d6ea6453f3d1696b9e6cd0a0222fc77dc646365c
> I've compiled emacs with git commit
> d6ea6453f3d1696b9e6cd0a0222fc77dc646365c and configure
> "--without-gnutls" but didn't reproduce this.  And I had also tried to
> set up a proxy (https://github.com/tinyproxy/tinyproxy), and still no
> luck with some simple test.

AFAICT, there is nothing special with my system, since I don't know much
about such stuff.  I'm not using a proxy.

> Can you provide more information about this? With following settings:
>     (setq debug-on-error t)
>     (setq url-debug 1)
> and when the problem occurs, save the content of buffer "*Messages*"
> and "*Backtrace*", then paste it here?

Sure, I have to bootstrap master for that again (I'm currently not
working with master since it has some more bugs bothering me too much).

> There is also a bug report bug#23225, I don't know if it's related to
> this commit, but I will try to work it out.

Ok, will have a look.


Regards,

Michael.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#23290: 25.1.50; eww: Symbol’s value as variable is void: url-http-response-status
  2016-04-16 14:08   ` Michael Heerdegen
@ 2016-04-16 17:14     ` Michael Heerdegen
  2016-04-16 17:19     ` Tao Fang
  1 sibling, 0 replies; 9+ messages in thread
From: Michael Heerdegen @ 2016-04-16 17:14 UTC (permalink / raw
  To: Tao Fang; +Cc: larsi, 23290

Michael Heerdegen <michael_heerdegen@web.de> writes:

> Maybe my OS (Debian testing) is missing some dev packages?  FWIW, I
> don't see this error in the emacs-25 branch.

I have installed libgnutls28-dev now (I tried to install libgnutls-dev,
but failed due to conflicts).

Anyway, I rebuilt master.  configure said gnutls is supported now, and
the bug doesn't occur with the new build any more.

Does it still make sense to debug master with libgnutls28-dev
deinstalled?


Thanks,

Michael.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#23290: 25.1.50; eww: Symbol’s value as variable is void: url-http-response-status
  2016-04-16 14:08   ` Michael Heerdegen
  2016-04-16 17:14     ` Michael Heerdegen
@ 2016-04-16 17:19     ` Tao Fang
  2016-04-16 18:11       ` Michael Heerdegen
  2016-04-25 23:25       ` Lars Magne Ingebrigtsen
  1 sibling, 2 replies; 9+ messages in thread
From: Tao Fang @ 2016-04-16 17:19 UTC (permalink / raw
  To: Michael Heerdegen; +Cc: larsi, 23290

[-- Attachment #1: Type: text/plain, Size: 909 bytes --]

Hi, Michael

After some digging, I found a code bug in commit
3c623c26ae7d695746e05d8a2e16a67a6256b024 introduced by me and maybe
relavant to your report.

lisp/url/url-http.el:

  1319	(defun url-https-proxy-after-change-function (st nd length)
......
  1327	      (url-http-parse-response)
  1328	      (cond
......
  1360	       (t
  1361	        (url-http-activate-callback)
  1362	        (message "error response: %d" url-http-response-status))))))
......

When using url-http in eww and the above "cond" last clause succeed
(i.e. at first connecting to proxy response not HTTP 200), "url-http-activate-callback" will call
function "eww-render" which calls (kill-buffer), so the code next line
visit symbol url-http-response-status will cause the error: "Symbol’s
value as variable is void: url-http-response-status".

This can be fixed simplely transpose that two code lines:

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-fix-void-variable-url-http-response-status.patch --]
[-- Type: text/x-diff, Size: 968 bytes --]

From 323cf52e870f6f6a5965d22891ea27f87b971011 Mon Sep 17 00:00:00 2001
From: Tao Fang <fangtao0901@gmail.com>
Date: Sun, 17 Apr 2016 00:21:09 +0800
Subject: [PATCH] fix: (void-variable url-http-response-status)

---
 lisp/url/url-http.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index 1fe9ac2..5cf641d 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -1358,8 +1358,8 @@ The return value of this function is the retrieval buffer."
                (error "error: %s" e)))
           (error "error: gnutls support needed!")))
        (t
-        (url-http-activate-callback)
-        (message "error response: %d" url-http-response-status))))))
+        (message "error response: %d" url-http-response-status)
+        (url-http-activate-callback))))))
 
 (defun url-http-async-sentinel (proc why)
   ;; We are performing an asynchronous connection, and a status change
-- 
2.8.1


[-- Attachment #3: Type: text/plain, Size: 251 bytes --]


Can you help to apply the patch and test on that in your environment?

And I'm not sure about this, because only using https proxy will enter
this function(if I do it right?), I still need to find out about it.

Thanks for your help!

-- 
Emacs/Gnus

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* bug#23290: 25.1.50; eww: Symbol’s value as variable is void: url-http-response-status
  2016-04-16 17:19     ` Tao Fang
@ 2016-04-16 18:11       ` Michael Heerdegen
  2016-04-19 16:41         ` Tao Fang
  2016-04-25 23:25       ` Lars Magne Ingebrigtsen
  1 sibling, 1 reply; 9+ messages in thread
From: Michael Heerdegen @ 2016-04-16 18:11 UTC (permalink / raw
  To: Tao Fang; +Cc: larsi, 23290

Tao Fang <fangtao0901@gmail.com> writes:

> Can you help to apply the patch and test on that in your environment?
>
> And I'm not sure about this, because only using https proxy will enter
> this function(if I do it right?), I still need to find out about it.

You made me distrustful.  I have rebuilt master (without your patch) and
with the gnutls dev lib deinstalled (to get to the original environment
where I had discovered the problem) - and the problem is gone.  The
function you changed in your patch is not called at all.

Dunno what is different from some days ago.  Either there is a
difference with that url, or the daily upgrades of my Debian testing are
related (For what it's worth, for two days or so Emacs was building with
Lucid instead of Gtk, now, it builds with Gtk again.  I didn't specify
any configure options.  So a relation to my OS seems not preempted to
me.)

Hmm.  Anything more I can do?


Michael.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#23290: 25.1.50; eww: Symbol’s value as variable is void: url-http-response-status
  2016-04-16 18:11       ` Michael Heerdegen
@ 2016-04-19 16:41         ` Tao Fang
  2016-04-19 18:21           ` Michael Heerdegen
  0 siblings, 1 reply; 9+ messages in thread
From: Tao Fang @ 2016-04-19 16:41 UTC (permalink / raw
  To: Michael Heerdegen; +Cc: larsi, 23290

Michael Heerdegen <michael_heerdegen@web.de> writes:

> Tao Fang <fangtao0901@gmail.com> writes:
>
> You made me distrustful.  I have rebuilt master (without your patch) and
> with the gnutls dev lib deinstalled (to get to the original environment
> where I had discovered the problem) - and the problem is gone.  The
> function you changed in your patch is not called at all.

Yes, it won't trigger in your case (not using proxy), but it's a bug, I
think it should be fixed ASAP.

@Lars Ingebrigtsen: Can you help to check and push the fix to trunk?

> Dunno what is different from some days ago.  Either there is a
> difference with that url, or the daily upgrades of my Debian testing are
> related (For what it's worth, for two days or so Emacs was building with
> Lucid instead of Gtk, now, it builds with Gtk again.  I didn't specify
> any configure options.  So a relation to my OS seems not preempted to
> me.)

Back to the error message you provided in the beginning, the reason was
simlar to the above(I think?).

Maybe anybody familiar with this can help?

> Hmm.  Anything more I can do?

Here is my suggestion:
    (setq debug-on-error t)
    (setq url-debug 1)
    and when the problem occurs, save the content of buffer "*Messages*"
    and "*Backtrace*"
With more information, this bug can be located more quickly.

Thanks for your help!

-- 
Emacs/Gnus





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#23290: 25.1.50; eww: Symbol’s value as variable is void: url-http-response-status
  2016-04-19 16:41         ` Tao Fang
@ 2016-04-19 18:21           ` Michael Heerdegen
  0 siblings, 0 replies; 9+ messages in thread
From: Michael Heerdegen @ 2016-04-19 18:21 UTC (permalink / raw
  To: Tao Fang; +Cc: larsi, 23290

Tao Fang <fangtao0901@gmail.com> writes:

> > Hmm.  Anything more I can do?
>
> Here is my suggestion:
>     (setq debug-on-error t)
>     (setq url-debug 1)
>     and when the problem occurs, save the content of buffer "*Messages*"
>     and "*Backtrace*"
> With more information, this bug can be located more quickly.

When the problem occurs the next time, I'll do this.

For the next days however, I'll not use the master branch (until the
nasty org time stamp bug has been fixed).


Thanks,

Michael.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#23290: 25.1.50; eww: Symbol’s value as variable is void: url-http-response-status
  2016-04-16 17:19     ` Tao Fang
  2016-04-16 18:11       ` Michael Heerdegen
@ 2016-04-25 23:25       ` Lars Magne Ingebrigtsen
  1 sibling, 0 replies; 9+ messages in thread
From: Lars Magne Ingebrigtsen @ 2016-04-25 23:25 UTC (permalink / raw
  To: Tao Fang; +Cc: Michael Heerdegen, 23290

Tao Fang <fangtao0901@gmail.com> writes:

> -        (url-http-activate-callback)
> -        (message "error response: %d" url-http-response-status))))))
> +        (message "error response: %d" url-http-response-status)
> +        (url-http-activate-callback))))))

Thanks; applied to the trunk.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-04-25 23:25 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-14 19:08 bug#23290: 25.1.50; eww: Symbol’s value as variable is void: url-http-response-status Michael Heerdegen
2016-04-15 17:20 ` Tao Fang
2016-04-16 14:08   ` Michael Heerdegen
2016-04-16 17:14     ` Michael Heerdegen
2016-04-16 17:19     ` Tao Fang
2016-04-16 18:11       ` Michael Heerdegen
2016-04-19 16:41         ` Tao Fang
2016-04-19 18:21           ` Michael Heerdegen
2016-04-25 23:25       ` Lars Magne Ingebrigtsen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.