bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#51966: url-retrieve freeze when connecting to identity.xero.com


From: Rui Yang
Subject: bug#51966: url-retrieve freeze when connecting to identity.xero.com
Date: Mon, 29 Nov 2021 09:22:13 +1100

Hi Lars,

I have tried in another Mac and with the same OS but I cannot reproduce it. I don't know what's impacting it in my working laptop. So I don't know how to reproduce it exactly.

Please close the ticket and thanks again for your time in looking into this matter.

Regards,
Rui

On Mon, Nov 22, 2021 at 11:06 PM Rui Yang <ryang.sei@gmail.com> wrote:
Hi Lars,

FYI. I tried it on my personal Mac with Old Version (10.13.6), it seemed to work fine for the Mac build of Emacs. I'll try to upgrade my macos to the latest to see if it makes a difference. If it still works, I suspect it could be an issue with the software setup in my working Mac Laptop (the one with the issue, might be some wierd config done by IT).

I will keep you posted.

Regards,
Rui

On Sun, Nov 21, 2021 at 10:49 PM Rui Yang <ryang.sei@gmail.com> wrote:
Hi Lars,

Sorry the response for the terminal version should be:
image.png

Please also note that URL tried is https://identity.xero.com/connect/token

Regards,
Rui

On Sun, Nov 21, 2021 at 10:45 PM Rui Yang <ryang.sei@gmail.com> wrote:
Hi Lars,

Thanks for looking into this.
I did the following, pls help to see if it helps.

1. Emacs from Homebrew Install Emacs using Homebrew in MacOS Big Sur.
- Install using
brew install emacs
- Got an Emacs in Terminal withou GUI
- Pasted the following
(setq url-debug t)

(defun http-handle-response (status method &optional url bufname raw stay-in-window)
  "Switch to the buffer returned by `url-retreive'.
The buffer contains the raw HTTP response sent by the server."
  (message (format "%s" raw)))

(display-buffer
 (let* ((url "https://identity.xero.com/connect/token")
        (method "POST"))
   (url-retrieve url 'http-handle-response (append (list method url (format "*HTTP %s %s*" method url)) '())))
 t)
- Got response very quickly in the buffer displayed (expected behaviour)
(setq url-debug t)

(defun http-handle-response (status method &optional url bufname raw stay-in-window)
  "Switch to the buffer returned by `url-retreive'.
The buffer contains the raw HTTP response sent by the server."
  (message (format "%s" raw)))

(display-buffer
 (let* ((url "https://identity.xero.com/connect/token")
        (method "POST"))
   (url-retrieve url 'http-handle-response (append (list method url (format "*HTTP %s %s*" method url)) '())))
 t)

- start Emacs from command line with:
/Applications/Emacs.app/Contents/MacOS/Emacs --no-init
- execute the above script
- I got the following:
image.png
You could see that the *http... buffer is always empty and stay like that for some time (maybe 30s), and eventually, the mini buffer showed a nil.
image.png

Could this be an issue only for the binary from emacsformacosx?

Regards,
Rui


On Sat, Nov 20, 2021 at 8:49 PM Lars Ingebrigtsen <larsi@gnus.org> wrote:
Rui Yang <ryang.sei@gmail.com> writes:

> Emacs -Q
> ;; the following script hopefully will demonstrate the issue
> ;; after evaluating the code below, url-retrieve seems started a new
> ;; process to do the https call, that call should give a bad request with
> ;; json response {"error":"invalid_client"}
> ;; but it took a lot of time for the call back to be called
> ;; I suspect sth special about Xero domain’s certificate which caused
> ;; this issue. https://www.google.com.au is fine
> ;; tried starting with emacs option, --no-init

I'm unable to reproduce the issue with either Emacs 27.2 or the current
trunk -- with your test case I just get this page:

HTTP/1.1 301 Moved Permanently
Server: AkamaiGHost
Content-Length: 0
Location: https://login.xero.com/identity/user/login

Is there something else needed to reproduce the problem?

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]