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

silently failing when blocked by uMatrix #105

Closed
anarcat opened this issue Oct 14, 2017 · 7 comments
Closed

silently failing when blocked by uMatrix #105

anarcat opened this issue Oct 14, 2017 · 7 comments

Comments

@anarcat
Copy link

anarcat commented Oct 14, 2017

Hi,

I'm trying to see how to make this work in my setup, as a replacement for the obsolete It's all text. I have installed the extension from the Mozilla add-ons site (version GhostText 17.6.1.407) and I have installed the Emacs extension as well (atomic-chrome 20161213.730). I'm using GNU Emacs 25.1.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.11) of 2017-09-15, modified by Debian, in Debian stretch.

I have also tested the "atomic chrome" extension in Chrome itself, to no avail: nothing happens on the Emacs side at all. I can confirm port 4001 is open on Emacs' side and that the same port is configured in the Firefox extension:

[998]anarcat@curie:anarc.at$ lsof -i tcp:4001
COMMAND   PID    USER   FD   TYPE  DEVICE SIZE/OFF NODE NAME
emacs   32395 anarcat   15u  IPv4 7026340      0t0  TCP localhost:4001 (LISTEN)

Nothing in the Messages buffer and no traffic flowing on port 4001 according to tcpdump. When I disable the uMatrix extension, traffic flows however, so it seems that local XHR requests are blocked by uMatrix. When I fix that, the extension mostly works.

It would be nice if GhostText would notice it cannot send XHR requests because of some block and pop an error message instead of just silently failing. It doesn't say anything in the Javascript console either.

@fregante
Copy link
Owner

True, most of the time the error message is not very useful. Would you be mind sending a PR to improve it?

@anarcat
Copy link
Author

anarcat commented Oct 25, 2017

not sure where i would start - any suggestions?

@fregante
Copy link
Owner

Are you sure you don't get any error like this in the console?

screen shot 2017-10-25 at 20 26 27

@anarcat
Copy link
Author

anarcat commented Oct 25, 2017

yup, no error. it looks like the XHR calls just hang because when i re-allow localhost in umatrix, emacs pops right back up.

@fregante
Copy link
Owner

The fetch is being made from background.js so you'd have to enable the developer mode and inspect the background script to see any errors. Honestly I'm very surprised that an extension is able to block another extension's network request, AFAIK this wasn't possible.

chrome settings

I'm not sure what you can do about it either, fetch probably fails without much information so maybe it can't be detected.

@fregante
Copy link
Owner

Can you test the new version? It hasn't been published to the stores yet: #172

The connection is now being done from background.js, which I don't think is covered by uMatrix. However there's still a lot of communication between the various parts of the extension itself.

@fregante
Copy link
Owner

If you still have this problem, hand me a red pill in the comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants