Sneezry / authenticator

This repository has moved to https://github.com/Authenticator-Extension/Authenticator
Apache License 2.0
172 stars 95 forks source link

Not able to add via scan #53

Closed preraksola closed 8 years ago

preraksola commented 8 years ago

Hello,

I created an extension using your code. But the scanning feature does not work on some web pages. It says, "cannot capture. Please refresh the page". But at the same time, if I use your extension, it works. Any idea what may be leading to this behavior?

My extension is not been published on the Chrome Store yet. Can that be an issue?

Thanks!

Prerak

Sneezry commented 8 years ago

Hi @preraksola ,

You need give a response in content script. Listen 'capture' action, and callback 'beginCapture'. See the code at https://github.com/Sneezry/authenticator/blob/master/javascript/content.js#L107

preraksola commented 8 years ago

I am already doing that, but on some tabs it is not returning beginCapture. On Friday for a particular tab, it was showing the error but today for the same tab, it's working.

That's a bit weird!

Sneezry commented 8 years ago

Hi @preraksola ,

Does it work fine today? You need reload all tabs after you load your extension, so that content script can be injected :)

preraksola commented 8 years ago

Yeah, I tried that too. On some machine it's working but on some it's still showing the error to reload the page. Unfortunately I am not able to reproduce that behavior on my machine but it's showing the error on my colleague's machine.

preraksola commented 8 years ago

Hi @Sneezry ,

I found the method to reproduce the error on each machine.

What I have seen so far is, if the URL of the tab is starting with file:/// it is throwing the error. I also added the sample image in a HTML file and opened that file in the browser, but still it showed the same message. (Here also, the URL start with file:///) But, if I add that file on my local Apache server and open it via localhost, it is able to scan it. (Here the URL starts with http://localhost/).

The behavior is same, if I download your extension from the Chrome web store. So, is there anything that can be done to resolve this?

preraksola commented 8 years ago

I managed to solve the issue. It was a simple mistake form my side. I had not checked the Allow access to file URLs check-box in the chrome://extensions page.